arXiv:2508.12232cs.SEcs.AI2025-08被引 2

用智能代理自动链接代码提交与问题,提升软件追踪准确率。

LinkAnchor: An Autonomous LLM-Based Agent for Issue-to-Commit Link Recovery

  • 设计自主智能体,动态获取相关上下文数据,突破模型长度限制。
  • 在GitHub上将链接准确率从42.2%提升至更高水平(具体数值未提)。
  • 适合关注软件工程自动化、大型项目可追溯性的研究者与开发者。

软件仓库中问题到提交的链接恢复对软件可追溯性和项目管理至关重要,但仍是挑战性任务。先前研究表明,仅约42.2%的GitHub问题被正确关联到其提交,凸显了高效解决方案的必要性。现有工作探索了多种机器学习/深度学习方法,近期也引入了大语言模型(LLMs)。然而,这些方法存在两大局限:一是LLMs受制于有限的上下文窗口,无法同时处理长提交历史、广泛的问题讨论和大型代码库等多源数据;二是多数方法采用单对单的评估方式,独立评分某个提交与问题的相关性,忽略了修复行为的复杂关联性——一个问题通常由一系列连续提交共同解决,而非单一变更。忽略时间与父子依赖关系导致无法完整捕捉修复逻辑,可能误将中间提交识别为最终修复。此外,该策略在大型仓库中计算效率低下,需穷举大量候选对。为此,我们提出LinkAnchor,首个专为问题到提交链接恢复设计的自主式LLM智能体。LinkAnchor引入懒加载架构,使底层模型可动态检索最相关的上下文数据(如提交、评论、代码文件),避免超出令牌限制。

原文摘要 · Abstract (English)

Issue-to-commit link recovery in software repositories is fundamental to software traceability and project management, yet it remains a challenging task. Prior studies show that only about 42.2% of issues on GitHub are correctly linked to their commits, highlighting the need for more effective solutions. Existing work has explored a range of ML/DL approaches, and more recently, large language models (LLMs) have been applied to this problem. However, these methods face two major limitations. First, LLMs are restricted by limited context windows and cannot simultaneously process all available data sources, such as long commit histories, extensive issue discussions, and large code repositories. Second, most approaches operate on individual issue-commit pairs, where a model independently scores the relevance of a single commit to an issue. This pairwise formulation fails to account for the complex associativity of software fixes, where an issue is often resolved by an aggregate chain of commits rather than a single atomic change. By ignoring these temporal and parental dependencies, existing methods often fail to incorporate the complete resolution logic and might misidentify intermediate commits as final fixes. Furthermore, this strategy is computationally inefficient in large repositories, as it requires exhaustively evaluating an enormous number of candidate pairs. To address these challenges, we present LinkAnchor, the first autonomous LLM-based agent designed specifically for issue-to-commit link recovery. LinkAnchor introduces a lazy-access architecture that allows the underlying LLM to dynamically retrieve only the most relevant contextual data, such as commits, issue comments, and code files, without exceeding token limits.

软件工程LLM应用智能代理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。