让大模型持续学习修复代码缺陷,提升复现率。
LLMs as Continuous Learners: Improving the Reproduction of Defective Code in Software Issues
- 采用多智能体框架与反思机制,动态优化代码复现策略。
- 在真实数据集上复现率提升20%,显著优于现有方法。
- 适合需要长期维护和自适应修复的软件项目团队。
复现有缺陷的代码是解决软件问题的第一步,有助于定位根本原因并验证修复补丁的有效性。尽管已有诸多方法被提出,但它们主要针对常见、广泛存在的错误,难以适应特定代码库中独特且不断演化的缺陷。为此,我们提出EvoCoder,一种用于问题代码复现的多智能体连续学习框架。EvoCoder采用反思机制,使大语言模型能够从过往已解决的问题中持续学习,并动态调整策略以应对新出现的挑战。为防止经验膨胀,EvoCoder引入一种新型分层经验池,支持对通用经验和仓库特异性经验的自适应更新。实验结果表明,相比现有最先进方法,其问题复现率提升20%。此外,集成该复现机制可显著提高现有问题修复流水线的整体准确率。
原文摘要 · Abstract (English)
Reproducing buggy code is the first and crucially important step in issue resolving, as it aids in identifying the underlying problems and validating that generated patches resolve the problem. While numerous approaches have been proposed for this task, they primarily address common, widespread errors and struggle to adapt to unique, evolving errors specific to individual code repositories. To fill this gap, we propose EvoCoder, a multi-agent continuous learning framework for issue code reproduction. EvoCoder adopts a reflection mechanism that allows the LLM to continuously learn from previously resolved problems and dynamically refine its strategies to new emerging challenges. To prevent experience bloating, EvoCoder introduces a novel hierarchical experience pool that enables the model to adaptively update common and repo-specific experiences. Our experimental results show a 20\% improvement in issue reproduction rates over existing SOTA methods. Furthermore, integrating our reproduction mechanism significantly boosts the overall accuracy of the existing issue-resolving pipeline.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。