Research map / Image generation / Autoregressive and latent generation
Less Is More: Adaptive Program Repair with Bug Localization and Preference Learning
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Introduces the AdaPR task (program repair with minimal code modifications) and AdaPatcher, a two-stage Bug Locator + Program Modifier approach trained on a 52K-sample ACPR dataset from CodeNet.
Problem
Automated program repair usually generates correct patches while ignoring how far they deviate from the original buggy code; the paper targets adaptive repair that is both correct and minimally modified.
Approach
A diff-based Bug Locator trained with self-debug learning (execution traces as inline comments) marks buggy lines, then a Program Modifier is trained with location-aware repair learning, hybrid selective-reference training, and DPO-Positive-style adaptive preference learning that favors fewer edits.
Key results
- AdaPatcher_GC (GPT-4o localizer, CodeLlama modifier) reaches 33.81% Acc and 62.22% Consistency on ACPR versus 28.12% Acc and 51.16% Consistency for CodeLlama fine-tuning.
- AdaPatcher_CG (CodeLlama localizer, GPT-4o modifier) achieves 67.57% Acc and 12.83% FR, beating GPT-4o instruction at 62.77% Acc and 34.65% FR.
- Ablation shows removing location-aware repair learning drops CodeLlama-based Acc from 31.95% to 28.05%.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Use the two-stage AdaPatcher_CG framework instead of GPT-4o instruction prompting | CodeLlama-Instruct-7B repair with CodeLlama bug localization · ACPR test | Acc: 62.77 -> 67.57 | Helped |
| Use the two-stage AdaPatcher_GC framework instead of CodeLlama fine-tuning | CodeLlama-Instruct-7B repair · ACPR test | Consistency: 51.16 -> 62.22 | Helped |
| Add Self-Debug Learning (ablation) | AdaPatcher_CC · ACPR test | Acc: 31.89 -> 31.95 | Helped |
| Add Self-Debug Learning (ablation) | AdaPatcher_CC · ACPR test | Improve: 33.27 -> 33.74 | Helped |
| Add Self-Debug Learning (ablation) | AdaPatcher_CC · ACPR test | Consistency: 57.06 -> 57.18 | Helped |
| Add Location-Aware Repair Learning (ablation) | AdaPatcher_CC · ACPR test | Acc: 28.05 -> 31.95 | Helped |
| Add Location-Aware Repair Learning (ablation) | AdaPatcher_CC · ACPR test | Improve: 29.61 -> 33.74 | Helped |
| Add Location-Aware Repair Learning (ablation) | AdaPatcher_CC · ACPR test | Consistency: 54.39 -> 57.18 | Helped |
| Add Hybrid Training (ablation) | AdaPatcher_CC · ACPR test | Acc: 29.38 -> 31.95 | Helped |
| Add Hybrid Training (ablation) | AdaPatcher_CC · ACPR test | Improve: 31.03 -> 33.74 | Helped |
| Add Hybrid Training (ablation) | AdaPatcher_CC · ACPR test | Consistency: 54.35 -> 57.18 | Helped |
| Add Adaptive Preference Learning (ablation) | AdaPatcher_CC · ACPR test | Acc: 32.07 -> 31.95 | Hurt |
Surprising findings
- Removing adaptive preference learning slightly increased accuracy (32.07 vs 31.95) while lowering consistency, indicating a trade-off.
- Large models such as GPT-4o and Claude-3.5 tend to rewrite buggy code substantially, while the 7B CodeLlama often copies code without editing.
Limitations
- Evaluated only on Python; logical errors only, excluding time-limit and other error types.
- Preference learning can reduce correctness of generated code.
- Bug localization fails when failed test cases give insufficient information or bugs span complex call structures.
Experimental setup
Datasets: CodeNet AlphaCode test cases
Benchmarks: ACPR
Metrics: Acc Improve Consistency FR human localization categories (AL/PL/EL/NL)
Baselines: GPT-4o instruction GPT-4o chain-of-thought GPT-4o few-shot CodeLlama instruction CodeLlama chain-of-thought CodeLlama few-shot CodeLlama LoRA fine-tuning Claude-3.5 instruction
Builds on: DPO DPO-Positive LoRA CodeNet
Closest papers by meaning
- Counterexample Guided Program Repair Using Zero-Shot Learning and MaxSAT-based Fault Localization (AAAI 2025 · similarity 0.90)
- CoRNStack: High-Quality Contrastive Data for Better Code Retrieval and Reranking (ICLR 2025 · similarity 0.84)
- Is Self-Repair a Silver Bullet for Code Generation? (ICLR 2024 · similarity 0.84)
- Code Repair with LLMs gives an Exploration-Exploitation Tradeoff (NeurIPS 2024 · similarity 0.84)
- Co-PatcheR: Collaborative Software Patching with Component-specific Small Reasoning Models (NeurIPS 2025 · similarity 0.83)
- AuPair: Golden Example Pairs for Code Repair (ICML 2025 · similarity 0.83)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
