论文标题

示例驱动的代码审查说明

Example Driven Code Review Explanation

论文作者

Rahman, Shadikur, Koana, Umme Ayman, Nayebi, Maleknaz

论文摘要

背景:代码审查是软件开发的重要组成部分,以确保软件质量。但是,审核任务的丰富和工作量的强度会对评论的质量产生负面影响。简短的审核文本通常是无与伦比的,这需要审阅者与开发人员之间的进一步互动。在动态团队中,对于不太熟悉评论者和观点的新团队成员而言,这个问题变得更加至关重要。目的:我们提出了示例驱动的审查说明(EDRE)方法,以通过示例添加其他说明来促进代码审核过程。埃德(Edre)建议提供类似的代码评论,以进一步解释评论,并帮助开发人员了解沟通开销较少的收到的评论。方法:通过在工业环境中的一项实证研究,并通过分析三个开源项目的3,722个代码评论,我们比较了五种数据检索,文本分类和文本建议的方法。结果:EDRE使用TF-IDF单词嵌入以及SVM分类器可以为每个代码审查提供92%的F评分和90%精度的实际示例。结论:基于示例的解释是一种既定方法,用于协助专家解释决策。 Edre是根据相同的理念开发的,可以准确提供一组特定于上下文的示例,以促进软件团队中的代码审核过程。

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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源