PracRepair: LLM-Empowered Automated Program Repair Inspired by Human-Like Debugging Practices

📅 2026-06-16
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Current large language model (LLM)-based automated program repair approaches fail to effectively leverage dynamic execution information—such as failure traces and fine-grained validation feedback—thereby limiting their repair performance. This work proposes PracRepair, a novel framework that systematically integrates human-like debugging practices into the LLM repair pipeline for the first time. PracRepair jointly utilizes static code and dynamic execution context to generate problem-driven repair hypotheses and iteratively refines patches based on trace-level behavioral changes and validation diagnostics. Evaluated on Defects4J V1.2 and V2.0, PracRepair successfully repairs 162 and 171 bugs, respectively, using GPT-4o, substantially outperforming existing methods. Moreover, it demonstrates strong generalization capability on the real-world benchmark RWB dataset.
📝 Abstract
As software systems grow in scale and complexity, debugging and repair remain costly and time-consuming. Large language models (LLMs) have advanced automated program repair (APR), but existing LLM-based APR approaches still largely rely on static or retrieved context, error messages, and coarse-grained validation outcomes. As a result, they underutilize dynamic information for failure understanding and repair, including failure-execution dynamics and patch-validation dynamics. Effectively leveraging such information, however, is challenging: failure-execution traces are large and noisy, raw static-dynamic context is not self-explanatory, and patch-validation dynamics are often reduced to coarse feedback. To address these challenges, we propose \textsc{PracRepair}, a fully automated LLM-based APR framework inspired by human-like debugging practices. \textsc{PracRepair} constructs an on-demand static-dynamic context from buggy programs and failure executions, performs question-driven failure diagnosis to formulate explicit repair hypotheses, and iteratively refines candidate patches using validation diagnostics and trace-level behavioral changes. Experimental results on Defects4J V1.2 and V2.0 show that \textsc{PracRepair} consistently outperforms state-of-the-art baselines. Specifically, under GPT-3.5, \textsc{PracRepair} correctly fixes 139/136 bugs on Defects4J V1.2/V2.0, while under GPT-4o it further improves to 162/171. Moreover, \textsc{PracRepair} generalizes effectively to RWB (Real-World Bugs), achieving the best performance across multiple foundation models.
Problem

Research questions and friction points this paper is trying to address.

Automated Program Repair
Large Language Models
Dynamic Information
Failure Diagnosis
Patch Validation
Innovation

Methods, ideas, or system contributions that make the work stand out.

Automated Program Repair
Large Language Models
Dynamic Execution Traces
Failure Diagnosis
Patch Validation