Background: Code reviewing is an essential part of software development to ensure software quality. However, the abundance of review tasks and the intensity of the workload for reviewers negatively impact the quality of the reviews. The short review text is often unactionable, which needs further interaction between the reviewer and the developer. The problem becomes more critical in dynamic teams and in the case of new team members who are less familiar with their reviewers and perspectives. Aims: We are proposing the Example Driven Review Explanation (EDRE) method to facilitate the code review process by adding additional explanations through examples. EDRE recommends similar code reviews as examples to further explain a review and help a developer to understand the received reviews with less communication overhead. Method: Through an empirical study in an industrial setting and by analyzing 3,722 code reviews across three open-source projects, we compared five methods of data retrieval, text classification, and text recommendation. Results: EDRE using TF-IDF word embedding along with an SVM classifier can provide practical examples for each code review with 92% F-score and 90% Accuracy. Conclusions: The example-based explanation is an established method for assisting experts in explaining decisions. EDRE was developed based on the same philosophy and can accurately provide a set of context-specific examples to facilitate the code review process in software teams.
翻译:代码审查是软件开发的一个基本部分,以确保软件质量。然而,大量审评任务和审评员工作量的强度对审评质量产生消极影响。简短的审评文本往往不具有可诉性,需要审评员和开发商进一步互动。问题在动态团队和对审评员和观点不那么熟悉的新的团队成员中变得更为关键。目标:我们正在通过实例添加更多解释,为代码审评进程提供便利,提出 " 驱动示例审查解释 " 方法。EDRE建议类似的代码审查作为实例,进一步解释审评,帮助开发商理解收到的审评,减少通信间接费用。方法:通过在工业环境中进行实证研究,分析三个开放源项目中的3 722项代码审查,我们比较了数据检索、文本分类和文本建议的五种方法。结果:EDRE使用TF-IDF词嵌入S SVM分类器,为每项代码审评提供实际例子,92%的F-C-Corder和90%的准确性。结论:以实例为基础的解释是用于协助专家作出具体决定的既定哲学方法。