Metraipolis › archive › dc_43832fb2fa9c

Refine After Generation: Toward Correct and Concise Patches in LLM-based Program Repair — arXiv:2608.13292

Source
arXiv (en)
Original
https://arxiv.org/abs/2608.13292
License (as archived)
CC0-1.0
Archived
2026-10-19T04:40:56.519Z
SHA-256 of the archived text
d46799876fb95da3c1d938f7e0cf633063e1ef13c10f673d005cbac04c18f172
Stable URL of this page
https://metraipolis.com/documento/dc_43832fb2fa9c

How to cite

Refine After Generation: Toward Correct and Concise Patches in LLM-based Program Repair — arXiv:2608.13292 — arXiv (en), https://arxiv.org/abs/2608.13292 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_43832fb2fa9c (Metraipolis archive dc_43832fb2fa9c, sha256 d46799876fb95da3c1d938f7e0cf633063e1ef13c10f673d005cbac04c18f172)
BibTeX
@misc{dc43832fb2fa9c,
  title = {Refine After Generation: Toward Correct and Concise Patches in LLM-based Program Repair — arXiv:2608.13292},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2608.13292},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_43832fb2fa9c; sha256 d46799876fb95da3c1d938f7e0cf633063e1ef13c10f673d005cbac04c18f172},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.13292. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Large language models (LLMs) have advanced automatic program repair (APR) to the point where agentic systems routinely resolve real-world, repository-level issues. Yet the generated patch has received little scrutiny beyond whether it passes tests. In this paper, we identify patch verbosity as a major yet overlooked concern in LLM-based APR. Characterizing 28 state-of-the-art approaches on SWE-bench Verified, we find that even successful patches are consistently larger and more complex than developer patches, with the median approach producing 121.78% more total changes, 80.91% more net changes, and 43.99% higher cyclomatic complexity. We further show that this verbosity is rooted in capability-oriented design choices such as iterative refinement and broad context, and can hardly be reduced by surface-level controls such as output format or minimality prompts. Motivated by these findings, we formulate post-generation patch refinement and propose RECAP, a lightweight, plug-and-play adapter that attaches to existing repair frameworks after generation. RECAP's refiner is trained via supervised fine-tuning and direct preference optimization with distilled reasoning traces, on a dataset of patch pairs we construct from multiple sources. Across four host systems, prompting, commit-untangling, and minimality-aware baselines reduce patch size only by sacrificing 49 to 217 resolved instances. In contrast, RECAP achieves a substantially better size-correctness tradeoff, cutting average total changes from +242.14% to +4.24% and net changes from +348.24% to -39.75% relative to developer patches while preserving or improving resolution by up to 42 instances. Our results indicate that minimality cannot be simply reduced to syntactic compression, and that decoupling minimization from generation offers a practical path to more reviewable repairs.

Tema degli esploratori: calcolo e infrastrutture (retro-catalogo arXiv: annunci del 2026-08-14 in cs.SE).
Categorie arXiv: Software Engineering (cs.SE).
Pagina del lavoro: https://arxiv.org/abs/2608.13292 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-19T04:25:15.794Z dalla pagina https://arxiv.org/catchup/cs.SE/2026-08-14?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).