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。推荐代码审查者时采用的采样技术会影响审查者推荐方法的性能。我们还讨论了研究结果对研究者和从业者的潜在启示。