评估文件排序策略对代码审查流程的影响
Assessing the Impact of File Ordering Strategies on Code Review Process
AI总结:
本研究针对工业项目IntelliJ IDEA验证了代码审查中文件排序越靠后获审查投入越少、缺陷遗漏风险越高的结论,同时发现按代码差异排序的效果优于默认字母排序,指出需进一步探索更多排序策略。
摘要:
主流的现代代码审查工具(如Gerrit和GitHub)会按字母顺序对代码审查中的文件进行排序。此前一项(针对开源项目的)研究表明,变更文件在代码审查中的排序位置会影响审查流程,其结果显示,排序靠后的文件获得审查投入的概率低于其他文件,因此这些文件中遗漏缺陷的概率更高。本文针对知名工业项目IntelliJ IDEA的代码审查,探究了文件排序的影响。首先,我们在一个大型专有软件项目上验证了前述研究的结果。随后,我们探索了默认字母顺序的一种替代方案:根据代码差异(code diff)对变更文件排序。我们的结果证实了此前研究的结论,发现审查者对代码审查中排序更靠前的文件会留下更多评论。此外,结果表明,即便数据偏向字母顺序的情况,在将需要更多审查投入的问题文件排布到代码审查中更合适的位置方面,按代码差异对变更文件排序的表现优于标准字母顺序。这些结果证实,针对代码审查的各类排序策略仍需更多探索。
英文摘要:
Popular modern code review tools (e.g. Gerrit and GitHub) sort files in a code review in alphabetical order. A prior study (on open-source projects) shows that the changed files' positions in the code review affect the review process. Their results show that files placed lower in the order have less chance of receiving reviewing efforts than the other files. Hence, there is a higher chance of missing defects in these files. This paper explores the impact of file order in the code review of the well-known industrial project IntelliJ IDEA. First, we verify the results of the prior study on a big proprietary software project. Then, we explore an alternative to the default Alphabetical order: ordering changed files according to their code diff. Our results confirm the observations of the previous study. We discover that reviewers leave more comments on the files shown higher in the code review. Moreover, these results show that, even with the data skewed toward Alphabetical order, ordering changed files according to their code diff performs better than standard Alphabetical order regarding placing problematic files, which needs more reviewing effort, in the code review. These results confirm that exploring various ordering strategies for code review needs more exploration.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。