论文标题
评论评论:代码审查和文档符合何处的评论
Comments on Comments: Where Code Review and Documentation Meet
论文作者
论文摘要
代码审查的核心功能是增加理解;帮助审阅者理解代码更改有助于知识转移和查找错误。代码中的评论在很大程度上达到了类似的目的,可以帮助未来的读者了解该计划。因此,研究这两种形式的理解形式发生了什么,这是很自然的。我们问:审稿人会发表哪些与文档相关的评论,以及它们如何影响对贡献的理解?我们分析了对2,000(Java和Python)GitHub项目的CA.700K审查评论,并提出了几个过滤器,以确定哪些评论可能是针对文档变化和/或要求进行此类更改的评论。我们确定了65K此类情况。接下来,我们在此类“评论评论”背后提出了审阅者意图的分类学。我们发现,对代码有共同的理解是关键:审阅者评论最常专注于澄清,然后指出要解决的问题,例如错别字和过时的评论。奇怪的是,审稿人经常提出澄清评论(通常是逐渐的),这表明希望在代码审查期间坚持他们获得的理解。最后,我们讨论了我们的评论 - 计算数据集的含义,以进行改进代码审查的研究,包括自动化代码审查的潜在好处。
A central function of code review is to increase understanding; helping reviewers understand a code change aids in knowledge transfer and finding bugs. Comments in code largely serve a similar purpose, helping future readers understand the program. It is thus natural to study what happens when these two forms of understanding collide. We ask: what documentation-related comments do reviewers make and how do they affect understanding of the contribution? We analyze ca.700K review comments on 2,000 (Java and Python) GitHub projects, and propose several filters to identify which comments are likely to be either in response to a change in documentation and/or call for such a change. We identify 65K such cases. We next develop a taxonomy of the reviewer intents behind such "comments on comments". We find that achieving a shared understanding of the code is key: reviewer comments most often focused on clarification, followed by pointing out issues to fix, such as typos and outdated comments. Curiously, clarifying comments were frequently suggested (often verbatim) by the reviewer, indicating a desire to persist their understanding acquired during code review. We conclude with a discussion of implications of our comments-on-comments dataset for research on improving code review, including the potential benefits for automating code review.