spot_img
HomeResearch & DevelopmentEnhancing Automated Program Repair with Intelligent Filtering Policies

Enhancing Automated Program Repair with Intelligent Filtering Policies

TLDR: This research introduces “Abstain and Validate,” a dual-LLM policy framework to reduce noise in agentic Automated Program Repair (APR) systems. It consists of a bug abstention policy that predicts if a bug is fixable before attempting repair, and a patch validation policy that assesses the correctness of generated patches. When combined, these policies significantly increase the success rate of patches shown to human developers, improving efficiency and trust in AI-driven code changes for industrial-scale deployment.

Software development often involves the challenging and time-consuming task of identifying and fixing bugs. While Automated Program Repair (APR) systems, especially those powered by advanced Large Language Models (LLMs), have shown great promise in tackling complex bugs, their output still requires human review. This human review process can be inefficient if developers are presented with many patches that are unlikely to be correct, leading to wasted time and reduced trust in automated tools.

To address this challenge, researchers from Google and Meta have introduced a novel dual-LLM policy framework called “Abstain and Validate.” This framework aims to significantly reduce the “noise” – the number of unproductive or incorrect patches – that developers have to sift through, thereby making agentic APR systems more practical for industrial use. The core idea is to apply two complementary LLM-based policies: bug abstention and patch validation.

Bug Abstention: Deciding When Not to Repair

The first policy, bug abstention, acts as a gatekeeper before any repair attempt is even made. It uses an LLM to predict whether the APR system is likely to successfully fix a given bug, based solely on the bug report information. If the predicted probability of success falls below a certain threshold, the system “abstains” from attempting the repair. This proactive filtering mechanism prevents the system from wasting computational resources on bugs that are highly unlikely to be fixed and, more importantly, prevents developers from ever seeing patches for these intractable issues.

The researchers found that providing the LLM with specific guidelines, in addition to the bug’s title and description, significantly improved its ability to predict success. This guided abstention policy was much better at aligning its predictions with the actual success rates observed in experiments, effectively concentrating on bugs with a higher likelihood of repair.

Patch Validation: Ensuring Patch Quality

Once a bug has passed the abstention filter and the agentic APR system generates candidate patches, the second policy, patch validation, comes into play. This multi-stage policy evaluates whether a generated patch is a good and correct fix for the given bug. It combines deterministic checks, such as running tests, with an LLM-based filtering process.

A key innovation in patch validation is the generation of a “fix specification.” An LLM creates this guideline for a correct fix by analyzing the bug description and the original source files, without any knowledge of the actual ground-truth solution. A second LLM then uses this specification, along with the agent’s repair trajectory and test results, to make a judgment: whether the patch fixed the bug, an explanation for its decision, and a confidence score. This confidence score is particularly useful, allowing for more aggressive filtering by prioritizing patches with higher scores.

Also Read:

The Power of Combination: A Configurable Funnel

The true strength of this framework lies in combining both policies. The bug abstention policy first screens out bugs unlikely to be fixed. Then, for the remaining, more promising bugs, the APR system generates patches, which are subsequently filtered by the patch validation policy. This creates a configurable “funnel” that significantly enhances the quality of patches presented to human developers.

In evaluations on a set of 174 human-reported bugs from Google’s codebase, the combined approach demonstrated remarkable improvements. While the baseline APR system had a success rate of about 11% (meaning 1 in 10 patches were correct), a moderately permissive setting of the dual-policy funnel raised this to 35%. A stricter configuration, which narrowed the intake to fewer bugs, boosted the success rate to an impressive 53% – meaning developers could expect a correct patch in 1 out of every 2 cases presented for review. This drastically reduces developer noise and builds trust in automated code changes.

The patch validation policy also showed significant gains for machine-reported bugs, such as Null Pointer Exceptions (NPEs) and sanitizer-reported bugs, improving acceptance rates by up to 24 percentage points for NPEs and up to 15 percentage points for sanitizer bugs over baselines using reproduction tests.

This dual-policy framework offers a practical and effective path toward the reliable, industrial-scale deployment of agentic APR systems. By intelligently filtering out both unfixable bugs and incorrect patches, it transforms the developer experience, making AI-powered program repair a more trustworthy and efficient tool in the software development lifecycle. For more technical details, you can refer to the full research paper: Abstain and Validate: A Dual-LLM Policy for Reducing Noise in Agentic Program Repair.

Karthik Mehta
Karthik Mehtahttps://blogs.edgentiq.com
Karthik Mehta is a data journalist known for his data-rich, insightful coverage of AI news and developments. Armed with a degree in Data Science from IIT Bombay and years of newsroom experience, Karthik merges storytelling with metrics to surface deeper narratives in AI-related events. His writing cuts through hype, revealing the real-world impact of Generative AI on industries, policy, and society. You can reach him out at: [email protected]

- Advertisement -

spot_img

Gen AI News and Updates

spot_img

- Advertisement -