Automated Program Repair
Overview
Automated program repair studies how to find and correct bugs while preserving a program’s intended behavior. Approaches range from search-based patch generation and program analysis to language models that use fault localization, repository context, retrieved examples, and iterative agent workflows. Tests, runtime traces, static analysis, and formal methods can guide or verify repairs, with benchmarks spanning small functions, repositories such as those tested by SWE-bench, and security or hardware code. A central challenge is that compiling or passing available tests does not guarantee a secure, semantically correct, minimal fix, so stronger oracles must be balanced against context limits, cost, and generalization.
Latest papers
159 papers33 papers in the last four weeks, up 74% on the four weeks before. 0.2% of all new papers.
A Metamorphic Testing Approach to Diagnosing Memorization in LLM-Based Program Repair
Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMs
Project Prometheus: Bridging the Intent Gap in Agentic Program Repair via Reverse-Engineered Executable Specifications
Intent Gap'' -- the misalignment between the generated patch and the developer's original intent. Current solutions relying on natural language summaries or adversarial sampling often fail to provide the deterministic constraints required for surgical repairs. In this paper, we introduce Prometheus, a novel framework that bridges this gap by prioritizing *Specification Inference* over code generation. We employ Behavior-Driven Development (BDD) as an executable contract, utilizing a multi-agent architecture to reverse-engineer Gherkin specifications from runtime failure reports. To resolve the Hallucination of Intent,'' we propose a Requirement Quality Assurance (RQA) Loop, a mechanism that leverages ground-truth code as a proxy oracle to validate inferred specifications. We evaluated Prometheus on 680 defects from the Defects4J benchmark. The results are transformative: our framework achieved a total correct patch rate of 93.97% (639/680). More significantly, it demonstrated a Rescue Rate of 74.4%, successfully repairing 119 complex bugs that a strong blind agent failed to resolve. Qualitative analysis reveals that explicit intent guides agents away from structurally invasive over-engineering toward precise, minimal corrections. Our findings suggest that the future of APR lies not in larger models, but in the capability to align code with verified, Executable Specifications -- whether pre-existing or reverse-engineered.