TraceFixer: Execution Trace-Driven Program Repair
Not on the map. Why?
Abstract (arXiv)
When debugging unintended program behavior, developers can often identify the point in the execution where the actual behavior diverges from the desired behavior. For example, a variable may get assigned a wrong value, which then negatively influences the remaining computation. Once a developer identifies such a divergence, how to fix the code so that it provides the desired behavior? This paper presents TraceFixer, a technique for predicting how to edit source code so that it does not diverge from the expected behavior anymore. The key idea is to train a neural program repair model that not only learns from source code edits but also exploits excerpts of runtime traces. The input to the model is a partial execution trace of the incorrect code, which can be obtained automatically through code instrumentation, and the correct state that the program should reach at the divergence point, which the user provides, e.g., in an interactive debugger. Our approach fundamentally differs from current program repair techniques, which share a similar goal but exploit neither execution traces nor information about the desired program state. We evaluate TraceFixer on single-line mistakes in Python code. After training the model on hundreds of thousands of code edits created by a neural model that mimics real-world bugs, we find that exploiting execution traces improves the bug-fixing ability by 13% to 20% (depending on the dataset, within the top-10 predictions) compared to a baseline that learns from source code edits only. Applying TraceFixer to 20 real-world Python bugs shows that the approach successfully fixes 10 of them.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). First posted on arXiv 25 Apr 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 1; 2025: 1; 2026: 2.
4 papers.
- 2024NExT: Teaching Large Language Models to Reason about Code Executioncited by 63
- 2025Revisit Self-Debugging with Self-Generated Tests for Code Generationcited by 22
- 2026Empowering Autonomous Debugging Agents with Efficient Dynamic Analysiscited by 1
- 2026Multi-Perspective Agentic Program Repair via Code Property Graphs and Temporal Execution Graphscited by 1
- 2026Multi-Perspective Agentic Program Repair via Code Property Graphs and Temporal Execution Graphs14 Jul 2026
- 2026Empowering Autonomous Debugging Agents with Efficient Dynamic Analysis27 Apr 2026
- 2025Revisit Self-Debugging with Self-Generated Tests for Code Generation22 Jan 2025
- 2024NExT: Teaching Large Language Models to Reason about Code Execution23 Apr 2024