{"ID":2847094,"CreatedAt":"2026-06-01T04:54:23.091178241Z","UpdatedAt":"2026-06-01T04:54:23.091178241Z","DeletedAt":null,"paper_url":"https://arxiv.org/abs/2511.01047","arxiv_id":"2511.01047","title":"HAFixAgent: History-Aware Program Repair Agent","abstract":"Automated program repair (APR) has recently shifted toward large language models and agent-based systems, yet most systems rely on local snapshot context, overlooking repository history. Prior work shows that repository history helps repair single-line bugs, since the last commit touching the buggy line is often the bug-introducing one. In this paper, we investigate whether repository history can also improve agentic APR systems at scale, especially for complex multi-hunk bugs. We present HAFixAgent, a History-Aware Bug-Fixing Agent that injects blame-derived repository heuristics into its repair loop. A preliminary study on 854 Defects4J (Java) and 501 BugsInPy (Python) bugs motivates our design, showing that bug-relevant history is widely available across both benchmarks. Using the same LLM (DeepSeek-V3.2-Exp) for all experiments, including replicated baselines, we show: (1) Effectiveness: HAFixAgent outperforms RepairAgent (+56.6\\%) and BIRCH-feedback (+47.1\\%) on Defects4J. Historical context further improves repair by +4.4\\% on Defects4J and +38.6\\% on BugsInPy, especially on single-file multi-hunk (SFMH) bugs. (2) Robustness: under noisy fault localization (+1/+3/+5 line shifts), history provides increasing resilience, maintaining 40 to 56\\% success on SFMH bugs where the non-history baseline collapses to 0\\%. (3) Efficiency: history does not significantly increase agent steps or token costs on either benchmark.","short_abstract":"Automated program repair (APR) has recently shifted toward large language models and agent-based systems, yet most systems rely on local snapshot context, overlooking repository history. Prior work shows that repository history helps repair single-line bugs, since the last commit touching the buggy line is often the bu...","url_abs":"https://arxiv.org/abs/2511.01047","url_pdf":"https://arxiv.org/pdf/2511.01047v3","authors":"[\"Yu Shi\",\"Hao Li\",\"Bram Adams\",\"Ahmed E. Hassan\"]","published":"2025-11-02T18:45:34Z","proceeding":"cs.SE","tasks":"[\"cs.SE\",\"cs.AI\"]","methods":"[\"Large Language Model\",\"Language Model\"]","has_code":false}
