论文精选

AdaRepair-Mem:自适应经验编排用于代码库级程序修复

AdaRepair-Mem: Adaptive Experience Orchestration for Repository-Level Program Repair

精选理由

这是篇关于代码修复的论文,提出了AdaRepair-Mem框架,通过更智能地检索和利用历史修复经验来提升LLM的代码修复能力,解决了现有方法中记忆资源不均衡、记忆量与效果不匹配以及记忆阶段不匹配的问题。

最近,基于记忆的代码库级程序修复方法通过重用历史修复经验来提升LLM的代码修复能力。然而,我们的分析发现现有方法存在三个问题:一是不同代码库的记忆资源严重不均衡,资源匮乏的库支持不足;二是记忆量越多并不一定修复成功率越高,相关性、质量和冗余度比记忆总量更重要;三是记忆积累阶段不匹配,库中可能包含大量复现经验但缺少补丁或优化经验。为此,我们提出自适应经验检索框架AdaRepair-Mem,包含覆盖感知检索(当同库记忆不足时转向跨库或按修复类型检索)、质量感知选择(根据相关性、历史效用、特异性和冗余度排序记忆)和阶段感知路由(为复现、定位、补丁生成、补丁优化和验证等阶段分别检索记忆)。在SWE-Bench-Lite和SWE-Bench-Verified基准上,该框架提升了资源匮乏库的修复性能,减少了噪声记忆检索,并更好地支持了补丁优化。结果表明,记忆增强修复的关键在于为不同修复情境检索合适的经验,而非单纯积累更多经验。

原文 · arXiv cs.AI

AdaRepair-Mem: Adaptive Experience Orchestration for Repository-Level Program Repair

Recent memory-augmented repository-level program repair methods reuse historical repair experiences to improve LLM-based issue resolution. However, our analysis reveals three limitations in existing repository-level memory retrieval. First, episodic memory is highly imbalanced across repositories, leaving low-resource repositories with little effective support. Second, more memory does not monotonically lead to higher repair success, suggesting that relevance, quality, and redundancy matter more than raw memory volume. Third, memory accumulation is phase-misaligned: repositories may contain many reproduction experiences but few patch or refinement experiences. To address these problems, we propose an adaptive experience retrieval framework for repository-level program repair. Our framework introduces coverage-aware retrieval, which falls back to cross-repository or repair-type-based memories when same-repository memory is insufficient; quality-aware selection, which ranks memories by relevance, historical utility, specificity, and redundancy; and stage-aware routing, which separates and retrieves memories for reproduction, localization, patch generation, patch refinement, and validation. Evaluated on SWE-Bench-Lite and SWE-Bench-Verified, the proposed framework improves repair performance on under-covered repositories, reduces noisy memory retrieval, and better supports failed-to-fixed patch refinement. Our results show that the key to memory-augmented repair is not simply accumulating more experiences, but retrieving the right experiences for the right repair context.