基于大语言模型的多智能体协作代码评审人推荐
CSTR:
作者:
作者单位:

作者简介:

通讯作者:

李青山,E-mail:qshli@mail.xidian.edu.cn

中图分类号:

TP311

基金项目:

国家自然科学基金(U21B2015,62372351,62402038);陕西省科协青年人才托举计划项目(20220113);西安电子科技大学杭州研究院概念验证基金项目(XJ2023230039);江苏省自然科学基金(BK202302028)


Multi-Agent Collaboration Code Reviewer Recommendation Based on Large Language Models
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    基于拉取请求(Pull Requests, PRs)的软件开发机制是开源软件中的重要实践.合适的代码评审人能够通过代码审查帮助贡献者及时发现PR中的潜在错误,为持续开发和集成过程提供质量保障.然而,代码变更内容的复杂性以及评审行为固有的多样性增加了评审人推荐的难度.现有方法主要聚焦于从PR中挖掘变更代码的语义信息,或基于审查历史构建评审人画像,并通过多种静态策略组合进行推荐.这些研究受限于模型训练语料的丰富性以及交互类型的复杂性,导致推荐性能不佳.鉴于此,本文提出一种基于智能体间相互协作的代码评审人推荐方法.该方法利用先进的大语言模型,精确捕捉PR和评审人丰富的文本语义信息.此外,AI智能体强大的规划、协作和决策能力使其能够集成不同交互类型的信息,具有高度的灵活性和适应性.基于真实数据集进行实验分析,与基线评审人推荐方法相比,本文方法性能提升了4.45%至26.04%.此外,案例研究证明,本文所提方法在可解释性方面表现突出,进一步验证了其在实际应用中的有效性和可靠性.

    Abstract:

    The pull request (PR)-based software development mechanism is a crucial practice in open-source software development. Effective code reviewers play a vital role in helping contributors identify potential errors in PRs through code reviews, thereby ensuring quality assurance for the continuous development and integration process. However, the complexity of code changes and the inherent diversity of review behaviors significantly increase the difficulty of recommending appropriate reviewers. Existing methods primarily focus on extracting semantic information from PRs or constructing reviewer profiles based on review history, subsequently recommending reviewers through various static strategy combinations. These approaches are limited by the richness of model training corpora and the complexity of interaction types, resulting in suboptimal recommendation performance. In response to these limitations, this paper proposes a novel code reviewer recommendation method based on inter-agent collaboration. This method leverages advanced large language models to accurately capture the rich textual semantics of PRs and reviewers. Furthermore, the robust planning, collaboration, and decision-making capabilities of AI agents enable the integration of diverse interaction types of information, providing high flexibility and adaptability. Experimental analysis based on real-world datasets demonstrates that the proposed method outperforms baseline reviewer recommendation approaches, with performance improvements ranging from 4.45% to 26.04%. Additionally, case studies highlight the exceptional interpretability of the proposed method, further validating its effectiveness and reliability in practical applications.

    参考文献
    相似文献
    引证文献
引用本文

王路桥,周洋涛,李青山,王铭康,徐子轩,崔笛,王璐,罗懿行.基于大语言模型的多智能体协作代码评审人推荐.软件学报,2025,36(6):0

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2024-08-25
  • 最后修改日期:2024-10-14
  • 录用日期:
  • 在线发布日期: 2024-12-10
  • 出版日期:
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号