CodeAgent:用于代码审查的自主交互智能体
软件工程
2024-09-26 v5
摘要
代码审查旨在确保软件的整体质量和可靠性,是软件开发的基石。遗憾的是,尽管代码审查至关重要,但它是一个劳动密集型过程,研究社区正寻求将其自动化。现有的自动化方法依赖于单输入输出生成模型,因此通常难以模拟代码审查的协作本质。本工作引入了 \tool{},一个用于代码审查自动化的新颖多智能体大语言模型(LLM)系统。CodeAgent 包含一个监督智能体 QA-Checker,以确保所有智能体的贡献都能解决最初的审查问题。我们在关键的代码审查任务上评估了 CodeAgent:(1) 检测代码更改与提交信息之间的不一致性,(2) 识别漏洞引入,(3) 验证代码风格合规性,以及 (4) 建议代码修订。结果证明了 CodeAgent 的有效性,为代码审查自动化贡献了新的 SOTA。我们的数据和代码已公开可用(\url{https://github.com/Code4Agent/codeagent})。
引用
@article{arxiv.2402.02172,
title = {CodeAgent: Autonomous Communicative Agents for Code Review},
author = {Xunzhu Tang and Kisub Kim and Yewei Song and Cedric Lothritz and Bei Li and Saad Ezzini and Haoye Tian and Jacques Klein and Tegawende F. Bissyande},
journal= {arXiv preprint arXiv:2402.02172},
year = {2024}
}