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

针对架构违规的代码审查者推荐:一项探索性研究

Code Reviewer Recommendation for Architecture Violations: An Exploratory Study

Ruiyin Li, Peng Liang, Paris Avgeriou

AI总结:

针对代码审查中架构违规缺乏专门审查者推荐的问题,本文结合文件路径与审查评论语义相似性检测方法开展实验,证明其性能优于基线 RevFinder。

摘要:

代码审查是软件开发中的常见实践,通常在代码变更合并到代码仓库之前进行。为了将此类代码变更与合适的审查者匹配,人们已经提出了许多自动推荐适当审查者的方法。然而,这些方法是通用的,即它们并不关注代码审查期间的特定问题类型。在本文中,我们提出了一种关注架构违规的方法,架构违规是代码审查期间发现的最关键问题类型之一。具体而言,我们旨在基于代码变更的审查,自动推荐可能有资格审查架构违规的代码审查者。为此,我们选择了三种常见的相似性检测方法,用于度量代码提交的文件路径相似性和审查评论的语义相似性。我们开展了一系列实验,通过将这些相似性检测方法分别以及组合起来,与基线审查者推荐方法 RevFinder 进行评估和比较,以寻找合适的审查者。结果表明,常见的相似性检测方法能够产生可接受的性能分数,并取得优于 RevFinder 的性能。用于推荐代码审查者的采样技术会影响审查者推荐方法的性能。我们还讨论了研究结果对研究人员和从业者的潜在启示。

英文摘要:

Code review is a common practice in software development and often conducted before code changes are merged into the code repository. A number of approaches for automatically recommending appropriate reviewers have been proposed to match such code changes to pertinent reviewers. However, such approaches are generic, i.e., they do not focus on specific types of issues during code reviews. In this paper, we propose an approach that focuses on architecture violations, one of the most critical type of issues identified during code review. Specifically, we aim at automating the recommendation of code reviewers, who are potentially qualified to review architecture violations, based on reviews of code changes. To this end, we selected three common similarity detection methods to measure the file path similarity of code commits and the semantic similarity of review comments. We conducted a series of experiments on finding the appropriate reviewers through evaluating and comparing these similarity detection methods in separate and combined ways with the baseline reviewer recommendation approach, RevFinder. The results show that the common similarity detection methods can produce acceptable performance scores and achieve a better performance than RevFinder. The sampling techniques used in recommending code reviewers can impact the performance of reviewer recommendation approaches. We also discuss the potential implications of our findings for both researchers and practitioners.

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

↑