arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2402.02172cs.SE
收藏

CodeAgent:用于代码审查的自主交互式智能体

CodeAgent: Autonomous Communicative Agents for Code Review

Xunzhu Tang, Kisub Kim, Yewei Song, Cedric Lothritz, Bei Li, Saad Ezzini, Haoye Tian, Jacques Klein, Tegawende F. Bissyande

AI总结:

针对现有自动化代码审查缺乏协作性的问题,提出多智能体LLM系统CodeAgent,通过引入监督智能体QA-Checker确保贡献质量,在多项关键代码审查任务上实现了当前最优性能。

摘要:

代码审查旨在确保软件的整体质量和可靠性,是软件开发的基石。遗憾的是,尽管代码审查至关重要,但它是一个劳动密集型的过程,研究社区正致力于将其自动化。现有的自动化方法依赖单一输入输出生成模型,因此通常难以模拟代码审查的协作本质。本研究提出了CodeAgent,一个用于代码审查自动化的新型多智能体大型语言模型(LLM)系统。CodeAgent引入了监督智能体QA-Checker,以确保所有智能体的贡献都能解决最初的审查问题。我们在关键的代码审查任务上评估了CodeAgent:(1) 检测代码更改与提交信息之间的不一致性,(2) 识别引入的漏洞,(3) 验证代码风格的遵循情况,以及(4) 建议代码修订。结果证明了CodeAgent的有效性,为代码审查自动化贡献了新的当前最优水平。我们的数据和代码已公开可用。

英文摘要:

Code review, which aims at ensuring the overall quality and reliability of software, is a cornerstone of software development. Unfortunately, while crucial, Code review is a labor-intensive process that the research community is looking to automate. Existing automated methods rely on single input-output generative models and thus generally struggle to emulate the collaborative nature of code review. This work introduces \tool{}, a novel multi-agent Large Language Model (LLM) system for code review automation. CodeAgent incorporates a supervisory agent, QA-Checker, to ensure that all the agents' contributions address the initial review question. We evaluated CodeAgent on critical code review tasks: (1) detect inconsistencies between code changes and commit messages, (2) identify vulnerability introductions, (3) validate code style adherence, and (4) suggest code revision. The results demonstrate CodeAgent's effectiveness, contributing to a new state-of-the-art in code review automation. Our data and code are publicly available (\url{https://github.com/Code4Agent/codeagent}).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑