跳到正文
arXiv cs.AI· Yu Shi, Hao Li, Bram Adams, Ahmed E. Hassan·· 6 天前AI 评分26

HAFixAgent:历史感知的智能体程序修复

HAFixAgent: History-Aware Agentic Program Repair

AI 导读

HAFixAgent 将 blame 衍生的仓库历史上下文注入修复循环,在 854 个 Defects4J(Java)和 501 个 BugsInPy(Python)bug 上验证了历史信息对智能体程序修复的提升。

正文 · 原文

View PDF HTML (experimental)

Abstract:Automated program repair (APR) has recently shifted toward large language models and agent-based systems, while prior work shows that repository history can help repair single-line bugs. We conduct a large-scale empirical study of whether, how much, and under what conditions repository history improves agentic APR beyond this setting. We present HAFixAgent, a history-aware program repair agent that injects blame-derived repository context into its repair loop. Across 854 Defects4J (Java) and 501 BugsInPy (Python) bugs, we first show that bug-relevant history is widely available. We then evaluate HAFixAgent across three base models under perfect fault localization. The best history heuristic improves over non-history from +4.4% on Defects4J and +1.1% on BugsInPy with the strongest model to as much as +64.3% with weaker models. HAFixAgent also outperforms RepairAgent by +56.6% and BIRCH-feedback by +47.1% on the strongest model, showing that it is a strong repair agent independent of history. The three history heuristics are complementary: each repairs a different subset of bugs, so their hybrid significantly repairs more bugs than non-history (McNemar's test, p < 0.001), and this advantage persists under realistic spectrum-based fault localization. Individual history heuristics are generally no more expensive than non-history in agent steps or tokens under either localization setting, while the hybrid costs roughly twice a single run in a cascade setting.
Comments: Evaluation: on both realistic spectrum-based fault localization and perfect fault localization Benchmarks: Defects4J and BugsInPy Subject LLMs: DeepSeek-V3.2-Exp, Qwen3-Coder-Next, and Devstral-Small-2
Subjects: Software Engineering (cs.SE); Artificial Intelligence (cs.AI)
Cite as: arXiv:2511.01047 [cs.SE]
  (or arXiv:2511.01047v4 [cs.SE] for this version)
  https://doi.org/10.48550/arXiv.2511.01047

arXiv-issued DOI via DataCite

Submission history

From: Yu Shi [view email]
[v1] Sun, 2 Nov 2025 18:45:34 UTC (367 KB)
[v2] Wed, 5 Nov 2025 17:04:35 UTC (354 KB)
[v3] Wed, 1 Apr 2026 19:42:16 UTC (284 KB)
[v4] Thu, 8 Oct 2026 21:42:13 UTC (287 KB)

来源:arXiv cs.AI · arxiv.org