📝 Original Info
- Title: DynaFix: Iterative Automated Program Repair Driven by Execution-Level Dynamic Information
- ArXiv ID: 2512.24635
- Date: 2025-12-31
- Authors: Zhili Huang, Ling Xu, Chao Liu, Weifeng Sun, Xu Zhang, Yan Lei, Meng Yan, Hongyu Zhang
📝 Abstract
Automated Program Repair (APR) aims to generate correct patches for buggy programs automatically. Recent approaches leveraging large language models (LLMs) have shown promise but face notable limitations. Most existing methods rely solely on static analysis, ignoring the runtime behaviors of programs. Although some studies attempt to incorporate dynamic signals, most methods either restrict it to the training or fine-tuning phase, or inject it only once into the repair prompt, without leveraging it iteratively throughout the repair process. This limited usage fails to fully capture program execution. In addition, current iterative repair frameworks typically rely on coarse-grained feedback, such as pass/fail results or exception types, without effectively utilizing fine-grained execution-level information. This makes it difficult for models to simulate the stepwise debugging process of human developers, resulting in limited effectiveness in multi-step reasoning and complex bug repair. To address these challenges, we propose DynaFix, an execution-level dynamic information-driven APR method that iteratively leverages runtime information to refine the repair process. In each repair round, DynaFix captures detailed execution-level dynamic information such as variable states, control-flow paths, and call stacks, transforming them into structured prompts to guide LLMs in generating candidate patches. If a patch fails validation, DynaFix re-executes the modified program to collect new execution information, which informs the next repair attempt. This iterative loop incrementally improves patches based on updated executionlevel feedback, similar to the stepwise debugging practices of human developers. We evaluate DynaFix on the Defects4J v1.2 and v2.0 benchmarks. DynaFix repairs 186 single-function bugs, a 10% improvement over state-of-the-art baselines, including 38 bugs previously unrepaired. It achieves correct patches within at most 35 attempts, reducing the patch search space by 70% compared with existing methods, thereby demonstrating both effectiveness and efficiency in repairing complex bugs.
💡 Deep Analysis
📄 Full Content
DynaFix: Iterative Automated Program Repair Driven by
Execution-Level Dynamic Information
ZHILI HUANG∗, Chongqing University, China
LING XU, School of Big Data & Software Engineering, Chongqing University, China
CHAO LIU, Chongqing University, China
WEIFENG SUN, Chongqing University, China
XU ZHANG, Chongqing University, China
YAN LEI, Chongqing University, China
MENG YAN, Chongqing University, China
HONGYU ZHANG, Chongqing University, China
Automated Program Repair (APR) aims to generate correct patches for buggy programs automatically. Recent
approaches leveraging large language models (LLMs) have shown promise but face notable limitations. Most
existing methods rely solely on static analysis, ignoring the runtime behaviors of programs. Although some
studies attempt to incorporate dynamic signals, most methods either restrict it to the training or fine-tuning
phase, or inject it only once into the repair prompt, without leveraging it iteratively throughout the repair
process. This limited usage fails to fully capture program execution. In addition, current iterative repair
frameworks typically rely on coarse-grained feedback, such as pass/fail results or exception types, without
effectively utilizing fine-grained execution-level information. This makes it difficult for models to simulate the
stepwise debugging process of human developers, resulting in limited effectiveness in multi-step reasoning
and complex bug repair.
To address these challenges, we propose DynaFix, an execution-level dynamic information-driven APR
method that iteratively leverages runtime information to refine the repair process. In each repair round,
DynaFix captures detailed execution-level dynamic information such as variable states, control-flow paths,
and call stacks, transforming them into structured prompts to guide LLMs in generating candidate patches. If a
patch fails validation, DynaFix re-executes the modified program to collect new execution information, which
informs the next repair attempt. This iterative loop incrementally improves patches based on updated execution-
level feedback, similar to the stepwise debugging practices of human developers. We evaluate DynaFix on
the Defects4J v1.2 and v2.0 benchmarks. DynaFix repairs 186 single-function bugs, a 10% improvement over
state-of-the-art baselines, including 38 bugs previously unrepaired. It achieves correct patches within at most
35 attempts, reducing the patch search space by 70% compared with existing methods, thereby demonstrating
both effectiveness and efficiency in repairing complex bugs.
1
Introduction
Software systems underpin virtually every critical domain of modern society, such as manufacturing,
aerospace, energy, and healthcare. As these systems grow in scale and complexity, they inevitably
introduce a large number of bugs. Program repair is essential for maintaining stability and security
throughout the software lifecycle. Prior studies show that developers spend 35%–50% of their
time fixing bugs manually [41]. To reduce this cost, researchers have extensively investigated
∗Corresponding author.
Authors’ Contact Information: Zhili Huang, huangzhili@stu.cqu.edu.cn, Chongqing University, Chongqing, China; Ling
Xu, xuling@cqu.edu.cn, School of Big Data & Software Engineering, Chongqing University, Chongqing, China; Chao
Liu, liu.chao@cqu.edu.cn, Chongqing University, Chongqing, China; Weifeng Sun, weifeng.sun@cqu.edu.cn, Chongqing
University, Chongqing, China; Xu Zhang, zhangx@stu.cqu.edu.cn, Chongqing University, Chongqing, China; Yan Lei,
yanlei@cqu.edu.cn, Chongqing University, Chongqing, China; Meng Yan, mengy@cqu.edu.cn, Chongqing University,
Chongqing, China; Hongyu Zhang, hyzhang@cqu.edu.cn, Chongqing University, Chongqing, China.
2026. ACM XXXX-XXXX/2026/1-ART
https://doi.org/10.1145/nnnnnnn.nnnnnnn
, Vol. 1, No. 1, Article . Publication date: January 2026.
arXiv:2512.24635v1 [cs.SE] 31 Dec 2025
2
Zhili Huang, Ling Xu, Chao Liu, Weifeng Sun, Xu Zhang, Yan Lei, Meng Yan, and Hongyu Zhang
APR techniques, which aim to automatically generate patches that automatically correct faulty
code [12].
Traditional APR approaches can be broadly categorized into heuristic-based [17, 25, 26, 35, 49, 56,
58], constraint-based [24, 34, 39, 60], and template-based methods [13, 15, 16, 31, 33, 38]. Heuristic
methods search a large patch space but often suffer from efficiency degradation as the space expands.
Constraint-based methods provide formal guarantees but struggle to scale to complex programs.
Template-based methods, which are widely regarded as the most representative [1, 13, 32], depend
on high-quality templates that are costly to construct and limit general applicability. To address
these limitations, deep learning–based APR methods have emerged, typically formulating patch
generation as a neural machine translation (NMT) task [46], trained on large corpora of bug–fix
pairs [65]. However, their effectiveness heavily relies on training data quality and drops s
Reference
This content is AI-processed based on open access ArXiv data.