arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.05450cs.SE
收藏

哪些类型的代码评审评论最常被开发者解决?

What Types of Code Review Comments Do Developers Most Frequently Resolve?

The University of Melbourne(墨尔本大学);Atlassian;Monash University(蒙纳士大学)
Saul Goldman, Hong Yi Lin, Jirat Pasuksmit, Patanamon Thongtanunam, Kla Tantithamthavorn, Zhe Wang, Ray Zhang, Ali Behnaz, Fan Jiang, Michael Siers, Ryan Jiang,… 展开作者

Saul Goldman, Hong Yi Lin, Jirat Pasuksmit, Patanamon Thongtanunam, Kla Tantithamthavorn, Zhe Wang, Ray Zhang, Ali Behnaz, Fan Jiang, Michael Siers, Ryan Jiang, Mike Buller, Minwoo Jeong, Ming Wu

AI总结:

本研究利用LLM作为评判者分类评审评论,发现LLM与人类评审者各有优劣,且可读性、缺陷和维护性相关评论的解决率高于设计类评论,表明多数LLM生成评论具有可执行性。

摘要:

基于大语言模型(LLM)的代码评审自动化工具已被引入,用于生成代码评审评论。然而,并非所有生成的评论都会推动代码变更。理解哪些类型的生成评论可能触发代码变更,对于识别可执行的评论至关重要。在本文中,我们着手研究(1)人类和LLM撰写的评审评论的类型,以及(2)开发者最常解决的生成评论的类型。为此,我们开发了一个LLM作为评判者的方法,基于我们自有的五类分类法自动对评审评论进行分类。我们的实证研究证实:(1)LLM评审者和人类评审者根据项目上下文展现出不同的优势和劣势;(2)与可读性、缺陷和维护性相关的评论,其解决率高于那些关注代码设计的评论。这些结果表明,相当比例的LLM生成评论是可执行的,并能被开发者解决。我们的工作凸显了LLM与人类评审者之间的互补性,并为提高LLM驱动的代码评审工具的实际有效性提供了建议。

英文摘要:

Large language model (LLM)-powered code review automation tools have been introduced to generate code review comments. However, not all generated comments will drive code changes. Understanding what types of generated review comments are likely to trigger code changes is crucial for identifying those that are actionable. In this paper, we set out to investigate (1) the types of review comments written by humans and LLMs, and (2) the types of generated comments that are most frequently resolved by developers. To do so, we developed an LLM-as-a-Judge to automatically classify review comments based on our own taxonomy of five categories. Our empirical study confirms that (1) the LLM reviewer and human reviewers exhibit distinct strengths and weaknesses depending on the project context, and (2) readability, bugs, and maintainability-related comments had higher resolution rates than those focused on code design. These results suggest that a substantial proportion of LLM-generated comments are actionable and can be resolved by developers. Our work highlights the complementarity between LLM and human reviewers and offers suggestions to improve the practical effectiveness of LLM-powered code review tools.

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

↑