Generating key points…
Answers are grounded in this paper and cite their sources.
Automated program repair (APR) with large language models (LLMs) is a promising but challenging direction: LLMs lack precise knowledge of fault location and are stateless across repair attempts, causing them to revisit ineffective patches without learning from prior failures. We present an iterative repair framework for C programs (and, by extension, any language with equivalent coverage tooling) that addresses both limitations by combining three heterogeneous feedback signals, spectrum‐based fault localization (SBFL), structured runtime test outcomes and a compact history of prior repair attempts, into a structured Chain‐of‐Thought prompting loop. In each iteration, the model receives a prompt that leads it through a fixed reasoning sequence: analyse failing tests, inspect SBFL‐ranked suspicious lines, review prior patch outcomes, hypothesize a fix and generate a candidate patch. Execution results are then fed back into the next iteration, enabling progressive patch refinement without exceeding practical context limits. We consider a repair successful when the generated patch passes all test cases. We evaluate the framework on 3902 single‐hunk C bugs (i.e., bugs fixable by modifying one contiguous block of code) from the Codeflaws benchmark, a controlled setting of competitive‐programming tasks with ground‐truth test oracles, and report 44.93 % repair accuracy, a 3.61 % absolute improvement over a strong LLM baseline (GPT‐4 with CoT). Per‐signal ablations show that SBFL guidance contributes independently to this gain; iterative repair‐history retention further improves accuracy when combined with multi‐iteration refinement. These results provide controlled evidence that structured, multi‐signal feedback can guide LLM‐based repair more effectively than single‐pass or unstructured re‐prompting in this setting.
No takes yet. Share an insight, caveat, or question.
Farzandway et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: