Abstain and Validate: A Dual-LLM Policy for Reducing Noise in Agentic Program Repair
This paper introduces a dual-LLM policy framework combining bug abstention and patch validation to significantly reduce noise and improve success rates in industrial-scale agentic Automated Program Repair by filtering out unlikely-to-be-fixed bugs and suboptimal patches before human review.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a very talented, but slightly over-eager, robot assistant named "Repair-Bot." Your job is to fix thousands of broken things in a giant warehouse (the company's codebase). Repair-Bot is great at trying to fix things, but it's also prone to making mistakes, wasting time, and suggesting fixes that don't actually work.
If you let Repair-Bot show you every single thing it tries to fix, you would be overwhelmed. You'd spend all day looking at broken suggestions, getting frustrated, and eventually stop trusting the robot.
This paper introduces a two-step "Gatekeeper" system to stop the noise before it reaches your desk. Think of it as a bouncer at a club and a quality inspector at a factory.
The Problem: Too Much Noise
In the world of software, "bugs" are mistakes in the code. Automated systems (called Agentic APR) try to fix them. But these systems often try to fix bugs that are too hard for them, or they generate "patches" (code changes) that look okay but are actually wrong.
- The Result: Developers waste time reviewing bad fixes.
- The Goal: Show the developer only the fixes that are likely to work.
The Solution: The Two-Gate System
The authors propose two policies that act like filters in a funnel.
Gate 1: The "Bug Abstention" (The Bouncer)
- What it does: Before the robot even tries to fix a bug, this gate looks at the bug report (the description of the problem).
- The Analogy: Imagine you are a bouncer at a club. You look at the person trying to get in (the bug). If the person looks too confused, the description is too vague, or the problem seems impossible to solve with the tools you have, you say, "Sorry, you can't come in."
- How it works: An AI model reads the bug report and asks, "Can our robot actually fix this?" If the answer is "probably not," the system abstains (refuses to try). It saves the robot's energy and, more importantly, saves the human developer from seeing a failed attempt.
- The Paper's Claim: By acting as a bouncer, this gate filters out the "impossible" bugs. It raises the success rate of the bugs that do get through from about 11% to 21% (using a specific set of guidelines).
Gate 2: The "Patch Validation" (The Quality Inspector)
- What it does: If the robot does try to fix a bug and produces a patch, this gate checks the result.
- The Analogy: Imagine the robot has built a new engine part. Before you install it, a quality inspector looks at the blueprint. The inspector doesn't just look at the part; they first write down a "recipe" for what a perfect part should look like based on the problem description. Then, they compare the robot's part against that recipe.
- How it works:
- The AI writes a "specification" (a set of rules for a correct fix) based on the bug report.
- A second AI looks at the robot's actual code change and the specification.
- It gives a score: "This looks good," "This looks bad," or "I'm not sure."
- If the score is too low, the patch is rejected.
- The Paper's Claim: This gate catches the robot's mistakes. Even if the robot tries to fix a bug, this gate can say, "No, that's not the right fix." This alone can raise the success rate of shown patches to about 29%.
The Magic Combo: The Funnel
When you use both gates together, they work like a highly efficient funnel.
- Gate 1 stops the impossible problems from entering the system.
- Gate 2 stops the bad solutions from leaving the system.
The Results:
- Baseline: Without any gates, developers see a working fix only 1 out of 10 times (11%).
- With Both Gates: If you set the gates to be strict (only showing the very best candidates), developers see a working fix 1 out of 2 times (53%).
- The Trade-off: You have to be okay with showing fewer bugs overall. The system filters out many bugs to ensure that the few it does show are high-quality.
What About Machine-Generated Bugs?
The paper also tested this on bugs found automatically by computers (like "Null Pointer Exceptions" or memory errors). These bugs usually come with clear instructions (like a stack trace).
- For these, they didn't need the "Bouncer" (Gate 1) because the computer already knows these are fixable.
- However, the "Quality Inspector" (Gate 2) still helped, raising the success rate of accepted patches significantly.
Summary
This paper doesn't claim to make the robot smarter at fixing bugs. Instead, it claims to make the process of showing fixes to humans much smarter. By using two AI "gatekeepers" to filter out the noise, developers stop wasting time on bad ideas and start trusting the automated system again.
In short: It's not about fixing more bugs; it's about fixing the right bugs so humans don't get tired of looking at the wrong ones.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.