LLM-Powered Test Case Generation for Detecting Bugs in Plausible Programs
Kaibo Liu, Zhenpeng Chen, Yiyang Liu, Jie M. Zhang, Mark Harman, Yudong Han, Yun Ma, Yihong Dong, Ge Li, Gang Huang

TL;DR
This paper introduces TrickCatcher, an LLM-based method for generating test cases to detect elusive bugs in plausible programs, significantly outperforming existing approaches in accuracy and reliability.
Contribution
It presents a novel three-stage LLM-powered approach for bug detection in plausible programs, combining variant generation, input synthesis, and inconsistency detection.
Findings
Achieves higher recall, precision, and F1 scores than baselines.
Effective on both human-written and AI-generated programs.
Demonstrates the potential of LLMs in automated bug detection.
Abstract
Detecting tricky bugs in plausible programs, those that pass existing test suites yet still contain bugs, remains a significant challenge in software testing. To address this problem, we propose TrickCatcher, an LLM-powered approach to generating test cases for uncovering bugs in plausible programs. TrickCatcher operates in three stages: First, it uses an LLM to generate program variants based on the program under test (PUT) and its specification. Second, it employs an LLM to construct an input generator from the specification for producing test inputs. Finally, these inputs are executed on both the PUT and its program variants to detect inconsistencies in their outputs. We evaluate TrickCatcher on two datasets, TrickyBugs and EvalPlus, which include 366 human-written and 151 AI-generated plausible programs with tricky bugs. TrickCatcher achieves recall, precision, and F1 scores that…
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.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsElectrostatic Discharge in Electronics · Hemiptera Insect Studies · Phytoplasmas and Hemiptera pathogens
MethodsSparse Evolutionary Training
