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

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

中图分类号:

TP311

基金项目:

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


Multi-agent Collaborative Code Reviewer Recommendation Based on Large Language Model
Author:
  • 摘要
  • | |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • | |
  • 文章评论
    摘要:

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

    Abstract:

    The pull request (PR)-based software development mechanism is of great significance in the practice of open-source software. Appropriate code reviewers can assist contributors in detecting potential errors in PRs through code review, thus providing quality assurance for the continuous development and integration process. However, the complexity of code change content and the inherent diversity of review behaviors enhance the difficulty of reviewer recommendation. The existing methods mainly concentrate on mining the semantic information of changed codes from PRs or constructing reviewer portraits based on review history and then making recommendations through various static strategy combinations. These studies are restricted by the richness of model training corpora and the complexity of interaction types, leading to unsatisfactory recommendation performance. Given this, this study proposes a novel code reviewer recommendation method based on inter-agent collaboration. This method utilizes advanced large language models to accurately capture the rich textual semantics information of PRs and reviewers. Moreover, the powerful planning, collaboration, and decision-making capabilities of AI agents enable the integration of information from different interaction types, possessing high flexibility and adaptability. The experimental analysis based on real datasets shows that compared with the baseline reviewer recommendation methods, the performance of the proposed method is improved by 4.45% to 26.04%. In addition, the case study proves that the proposed method has outstanding performance in interpretability, further verifying its effectiveness and reliability in practical applications.

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

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

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

京公网安备 11040202500063号