Code Review plays a crucial role in software quality, by allowing reviewers to discuss and critique any new patches before they can be successfully integrated into the project code. Yet, it is unsure the extent to which coding pattern changes (i.e., repetitive code) from when a patch is first submitted and when the decision is made (i.e., during the review process). In this study, we revisit coding patterns in code reviews, aiming to analyze whether or not the coding pattern changes during the review process. Comparing prior submitted patches, we measure differences in coding pattern between pre-review~(i.e., patch before the review) and post-review~(i.e., patch after a review) from 27,736 reviewed OpenStack patches. Results show that patches after review, tend to conform to similar coding patterns of accepted patches, compared to when they were first submitted. We also find that accepted patches do have similar coding patterns to prior accepted patches. Our study reveals insights into the review process, supporting the potential for automated tool support for newcomers and lays the groundwork for work into understanding conformance and how it makes for an efficient code review process.
翻译:代码审查在软件质量方面发挥着关键作用,使审评员能够讨论和批评任何新的补丁,然后才能成功地将其纳入项目代码。然而,它不能确定从首次提交补丁和作出决定(即,在审评过程中)开始的27,736个经审查的 OpenStack 补丁的编码模式变化(即,重复代码)的程度。在本研究中,我们重新审视代码审查的编码模式,目的是分析在审评过程中编码模式的变化是否类似。比较先前提交的补丁,我们测量预评~(即,在审评前补丁)和后审评~(即,在审评后补丁)之间在编码模式模式上的差别。结果显示,与首次提交时相比,经过审查的补丁往往与被接受的补丁的编码模式相似。我们还发现,被接受的补丁的编码模式与以前被接受的补丁的补丁有相似的编码模式。我们的研究揭示了对审评过程的深入了解,支持为新来者提供自动化工具支持的可能性,并为高效率的编码进程奠定基础,从而理解。