The Midas Touch: Triggering the Capability of LLMs for RM-API Misuse Detection
Yi Yang, Jinghua Liu, Kai Chen, and Miaoqian Lin

TL;DR
This paper introduces ChatDetector, an LLM-based system that automates the detection of RM-API misuse by understanding documentation, extracting constraints, and accurately pairing APIs, significantly improving detection precision and coverage.
Contribution
The paper presents ChatDetector, a novel LLM-empowered approach that automates RM-API misuse detection through documentation understanding, constraint retrieval, and API pairing, outperforming existing methods.
Findings
Achieves 98.21% precision in RM-API pairing.
Retrieves 47% more RM sentences and 80.85% more constraints than benchmarks.
Identifies 115 security bugs in real applications.
Abstract
In this paper, we propose an LLM-empowered RM-API misuse detection solution, ChatDetector, which fully automates LLMs for documentation understanding which helps RM-API constraints retrieval and RM-API misuse detection. To correctly retrieve the RM-API constraints, ChatDetector is inspired by the ReAct framework which is optimized based on Chain-of-Thought (CoT) to decompose the complex task into allocation APIs identification, RM-object (allocated/released by RM APIs) extraction and RM-APIs pairing (RM APIs usually exist in pairs). It first verifies the semantics of allocation APIs based on the retrieved RM sentences from API documentation through LLMs. Inspired by the LLMs' performance on various prompting methods,ChatDetector adopts a two-dimensional prompting approach for cross-validation. At the same time, an inconsistency-checking approach between the LLMs' output and the…
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.
