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.
翻译:代码审查是软件开发中常见的实践,通常在代码更改合并到代码库之前进行。为了匹配这样的代码更改到相关的审查者,已经提出了许多自动推荐适当审查者的方法。然而,这些方法是通用的,即它们不针对代码审查过程中特定的问题类型。在本文中,我们提出了一种方法,专注于架构违规,这是代码审查过程中最为关键的问题类型之一。具体而言,我们旨在基于对代码更改进行的审查来自动推荐有资格审查架构违规的代码审查员。为此,我们选择了三种常见的相似性检测方法,以测量代码提交的文件路径相似性和审查评论的语义相似性。我们通过评估和比较这些相似性检测方法单独和组合使用下的基线审查者推荐方法RevFinder,进行了一系列实验来查找适当的审查者。结果表明,通用的相似性检测方法能够产生可接受的性能分数,并且实现了比RevFinder更好的性能。用于推荐代码审查者的抽样技术可以影响审查人推荐方法的性能。我们还讨论了研究人员和实践者在实践方面的潜在影响。