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

基于TextualContent和文件定位特征的代码评审补丁链接自动检测

Automatic Patch Linkage Detection in Code Review Using TextualContent and File Location Features

Dong Wang, Raula Gaikovina Kula, Takashi Ishio, Kenichi Matsumoto

摘要:

背景:当代的代码审查工具是软件质量保证的流行选择。使用这些工具,评审员能够在评审讨论期间发布两个补丁之间的链接。使用审查然后提交模型的大型开发团队可能没有意识到这些联系。目的:我们的目标是首先探讨补丁链接如何影响审查过程。然后,我们提出和评估模型,检测补丁链接的基础上现实的时间间隔。方法:首先,我们对三个开源项目进行了探索性研究,使用942个手动分类的链接进行链接影响分析。其次,我们提出了两种技术,使用文本和文件位置相似性来构建检测模型,并评估其性能。结果:该研究提供了链接通知延迟的证据。我们表明,一个补丁与替代解决方案的联系(即,与其他链接类型相比,实现类似功能的补丁)会经历更快的审查,并避免在通知团队后进行额外的修订。我们的检测模型实验显示,替代解决方案链接的召回率很有希望(从32%到95%),但精度还有改进的空间。结论:补丁链接检测是有前途的,可能会改善,如果张贴链接的做法变得更加普遍。从我们的影响,本文奠定了基础,为未来的研究如何提高补丁链接意识,以促进有效的审查。

英文摘要:

Context: Contemporary code review tools are a popular choice for software quality assurance. Using these tools, reviewers are able to post a linkage between two patches during a review discussion. Large development teams that use a review-then-commit model risk being unaware of these linkages. Objective: Our objective is to first explore how patch linkage impacts the review process. We then propose and evaluate models that detect patch linkage based on realistic time intervals. Method: First, we carry out an exploratory study on three open source projects to conduct linkage impact analysis using 942 manually classified linkages. Second, we propose two techniques using textual and file location similarity to build detection models and evaluate their performance. Results: The study provides evidence of latency in the linkage notification. We show that a patch with the Alternative Solution linkage (i.e., patches that implement similar functionality)undergoes a quicker review and avoids additional revisions after the team has been notified, compared to other linkage types. Our detection model experiments show promising recall rates for the Alternative Solution linkage (from 32% to 95%), but precision has room for improvement. Conclusion: Patch linkage detection is promising, with likely improvements if the practice of posting linkages becomes more prevalent. From our implications, this paper lays the groundwork for future research on how to increase patch linkage awareness to facilitate efficient reviews.

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

↑