Generating key points…
Answers are grounded in this paper and cite their sources.
Automated Program Repair (APR) has recently benefited from the strong code understanding and generation capabilities of Large Language Models (LLMs). Among existing LLM-based APR techniques, feedback-based approaches have shown promising results by iteratively refining candidate patches according to test execution feedback. However, most of these approaches rely primarily on outcome-level failure symptoms, e.g., stack traces, which indicate how failures are observed but fail to expose the intermediate runtime states that are often critical for root-cause analysis. As a result, LLMs must infer bug causes without access to such intermediate runtime evidence, often leading to incorrect patches. To address this limitation, we propose DebugRepair, a self-directed debugging framework for LLM-based APR. The key idea of DebugRepair is to enhance patch refinement with intermediate runtime evidence collected through simulated debugging, rather than relying solely on outcome-level failure symptoms. Specifically, DebugRepair consists of three components. First, test semantic purification extracts the minimal failure-triggering test context, thereby removing noise in both tests and follow-up debugging logs. Second, simulated instrumentation enables the LLM to insert targeted debugging statements into buggy functions to collect runtime traces. A rule-based fallback mechanism is invoked when LLM-instrumented code fails to compile or semantically introduces inconsistencies. Third, debugging-driven conversational repair organizes patch generation into a hierarchical, iterative process, in which the LLM progressively refines candidate patches using both prior repair attempts and newly observed runtime states. We evaluate DebugRepair on four widely used benchmarks across two Programming Languages (PLs), e.g., Java and Python. Extensive experiments demonstrate the State-Of-The-Art (SOTA) performance of DebugRepair against 15 representative approaches. For example, with GPT-3.5 as the backbone model, DebugRepair correctly fixes 224 bugs on Defects4J, achieving an average improvement of 26.2% over SOTA LLM-based approaches. With DeepSeek-V3, DebugRepair correctly fixes 295 Defects4J bugs, exceeding the second-best baseline by 59 correct fixes. Across six backbone LLMs of different families and sizes, DebugRepair improves repair performance by 48.4% on average over their vanilla settings, demonstrating its model-agnostic effectiveness. Further ablation studies confirm that all components of DebugRepair contribute effectively to the overall repair performance.
No takes yet. Share an insight, caveat, or question.
Wu et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: