Developer Tools

PracRepair: New LLM framework fixes 171 bugs by mimicking human debugging

Dynamic traces and iterative hypothesis testing boost GPT-4o repair rates by 28%

Deep Dive

Existing LLM-based automated program repair (APR) tools rely heavily on static context, error messages, and coarse validation outcomes—missing dynamic insights from failure execution and patch validation. To bridge this gap, researchers propose PracRepair, a fully automated APR framework that mimics human debugging practices. It first constructs an on-demand static-dynamic context from buggy programs and failing traces, then performs question-driven failure diagnosis to form explicit repair hypotheses. Patches are iteratively refined using validation diagnostics and trace-level behavioral changes, emulating how a developer would analyze runtime behavior and adjust fixes.

Evaluated on Defects4J V1.2 and V2.0, PracRepair with GPT-3.5 fixed 139 and 136 bugs respectively—outperforming previous state-of-the-art baselines. Under GPT-4o, performance jumped to 162 fixes (V1.2) and 171 fixes (V2.0), a significant improvement. The framework also generalized well to real-world bugs (RWB), achieving best-in-class results across multiple foundation models. By leveraging dynamic information rather than reducing it to coarse feedback, PracRepair demonstrates that human-like debugging strategies—context gathering, hypothesis formation, and iterative validation—can be effectively automated with LLMs, potentially reducing the cost and time of software maintenance.

Key Points
  • PracRepair uses dynamic execution traces and patch-validation dynamics to guide LLM-based repair, unlike prior approaches that rely only on static context.
  • Under GPT-4o, PracRepair correctly fixed 162 out of 171 bugs on Defects4J V2.0—a 28% improvement over GPT-3.5.
  • The framework generalizes to real-world bug (RWB) datasets, achieving top performance across multiple LLMs.

Why It Matters

PracRepair could slash debugging time by automating human-like reasoning, making software maintenance faster and more accurate.

📬 Get the top 10 AI stories daily