Boosting Static Resource Leak Detection via LLM-based Resource-Oriented Intention Inference
Chong Wang, Jianan Liu, Xin Peng, Yang Liu, Yiling Lou

TL;DR
This paper introduces InferROI, a novel approach that uses large language models to improve static resource leak detection by inferring resource intentions directly from code, leading to higher bug detection rates.
Contribution
InferROI leverages LLMs for resource intention inference combined with static analysis, addressing limitations of traditional methods and enhancing leak detection accuracy.
Findings
Achieves 59.3% and 62.5% bug detection rates on datasets
Detects 14-45 and 149-485 more bugs than existing tools
Identifies 29 new resource leak bugs in real-world projects
Abstract
Resource leaks, caused by resources not being released after acquisition, often lead to performance issues and system crashes. Existing static detection techniques rely on mechanical matching of predefined resource acquisition/release APIs and null-checking conditions to find unreleased resources, suffering from both (1) false negatives caused by the incompleteness of predefined resource acquisition/release APIs and (2) false positives caused by the incompleteness of resource reachability validation identification. To overcome these challenges, we propose InferROI, a novel approach that leverages the exceptional code comprehension capability of large language models (LLMs) to directly infer resource-oriented intentions (acquisition, release, and reachability validation) in code. InferROI first prompts the LLM to infer involved intentions for a given code snippet, and then incorporates a…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware System Performance and Reliability · Software Engineering Research · Cloud Computing and Resource Management
