arXiv · 2604.02647
From Guessing to Seeing: Enhancing LLM-Based Program Repair via Trace-Guided Multi-strategy Debate
Abstract
Automated Program Repair (APR) aims to resolve software bugs without human intervention, but complex logic errors and silent failures remain challenging. Existing LLM-based APR methods mainly rely on source code and coarse test feedback, making it difficult to capture runtime behaviors and dynamic data dependencies. Execution traces expose concrete state transitions, yet a single LLM interpreting them in isolation may commit to an incorrect repair hypothesis and produce test-overfitting patches. We therefore treat runtime evidence as shared constraints for validating repair hypotheses rather than merely as additional prompt context. We propose TraceRepair, a multi-agent framework in which a Probe Agent captures execution snapshots of critical variables, while specialized repair agents generate, compare, and iteratively refine candidate patches against the observed runtime evidence. A Judge Agent then arbitrates the remaining hypotheses and synthesizes the final patch. Evaluated on Defects4J, TraceRepair correctly fixes 392 defects and outperforms existing LLM-based approaches. Further experiments demonstrate improved efficiency and strong generalization on a newly constructed dataset of recent bugs, suggesting that the gains arise from dynamic reasoning rather than memorization.
Explore related subjects
Keep this discovery
Jiaqing Wu, Tong Wu, Manqing Zhang, Yunwei Dong, Bo Shen. 2026-04-03. From Guessing to Seeing: Enhancing LLM-Based Program Repair via Trace-Guided Multi-strategy Debate. https://doi.org/10.1145/3832783.3837458
Cite the original work for its findings. Save a collection to share your selection of sources.