arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2405.13565cs.SEcs.AI
收藏

AI辅助的现代代码审查中编码实践评估

AI-Assisted Assessment of Coding Practices in Modern Code Review

Google(谷歌);University of Washington(华盛顿大学)
Manushree Vijayvergiya, Małgorzata Salawa, Ivan Budiselić, Dan Zheng, Pascal Lamblin, Marko Ivanković, Juanjo Carin, Mateusz Lewko, Jovan Andonov, Goran Petrovi… 展开作者

Manushree Vijayvergiya, Małgorzata Salawa, Ivan Budiselić, Dan Zheng, Pascal Lamblin, Marko Ivanković, Juanjo Carin, Mateusz Lewko, Jovan Andonov, Goran Petrović, Daniel Tarlow, Petros Maniatis, René Just

AI总结:

本文介绍AutoCommenter,一个基于大型语言模型的系统,自动学习和执行编码最佳实践,在四种语言和大型工业环境中验证了其可行性和对开发者工作流的积极影响,并总结了部署挑战。

摘要:

现代代码审查是一个过程,在此过程中,代码作者所做的增量代码贡献在提交到版本控制系统之前,会由一位或多位同行进行审查。现代代码审查的一个重要元素是验证代码贡献是否符合最佳实践。虽然其中一些最佳实践可以自动验证,但验证其他实践通常留给人类审查者。本文报告了AutoCommenter的开发、部署和评估,这是一个由大型语言模型支持的系统,能够自动学习和执行编码最佳实践。我们为四种编程语言(C++、Java、Python和Go)实现了AutoCommenter,并在大型工业环境中评估了其性能和采用情况。我们的评估表明,一个用于学习和执行编码最佳实践的端到端系统是可行的,并且对开发者工作流程产生了积极影响。此外,本文还报告了将此类系统部署给数万名开发者所面临的挑战以及相应的经验教训。

英文摘要:

Modern code review is a process in which an incremental code contribution made by a code author is reviewed by one or more peers before it is committed to the version control system. An important element of modern code review is verifying that code contributions adhere to best practices. While some of these best practices can be automatically verified, verifying others is commonly left to human reviewers. This paper reports on the development, deployment, and evaluation of AutoCommenter, a system backed by a large language model that automatically learns and enforces coding best practices. We implemented AutoCommenter for four programming languages (C++, Java, Python, and Go) and evaluated its performance and adoption in a large industrial setting. Our evaluation shows that an end-to-end system for learning and enforcing coding best practices is feasible and has a positive impact on the developer workflow. Additionally, this paper reports on the challenges associated with deploying such a system to tens of thousands of developers and the corresponding lessons learned.

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

↑