通过注释预测缩减代码评审变更集的工业案例研究
An Industrial Case Study on Shrinking Code Review Changesets through Remark Prediction
摘要:
基于变更的代码审查在工业软件开发中得到了广泛的应用。因此,研究有助于评审员实现更好评审绩效的工具可以产生很大的影响。我们分析了一种可能性,为评审者提供认知支持:确定变更部分对评审的重要性,特别是确定代码变更的哪些部分可以在评审中排除而不会造成伤害。为了确定变更部分的重要性,我们从软件存储库中提取数据,并根据这些数据构建评审评论的预测模型。详细讨论了该方法。为了收集输入数据,我们提出了一种新的算法来跟踪评论的触发器。我们将我们的方法应用于一家中型软件公司。在这家公司,我们可以避免对25%的更改部分和23%的更改Java源代码行进行评审,而只遗漏了大约1%的评审备注。尽管如此,我们也观察到这种尝试方法的严重局限性:大部分节省是由于简单的语法规则,数据中的噪音阻碍了寻找更好的预测模型,并且案例公司中的一些开发人员反对所采取的方法。除了挖掘和预测的触发评论评论的主要成果,我们贡献了经验,一种新的,多目标和交互式的规则挖掘方法。公司提供的匿名数据集以及设计算法的实现都是可用的。
英文摘要:
Change-based code review is used widely in industrial software development. Thus, research on tools that help the reviewer to achieve better review performance can have a high impact. We analyze one possibility to provide cognitive support for the reviewer: Determining the importance of change parts for review, specifically determining which parts of the code change can be left out from the review without harm. To determine the importance of change parts, we extract data from software repositories and build prediction models for review remarks based on this data. The approach is discussed in detail. To gather the input data, we propose a novel algorithm to trace review remarks to their triggers. We apply our approach in a medium-sized software company. In this company, we can avoid the review of 25% of the change parts and of 23% of the changed Java source code lines, while missing only about 1% of the review remarks. Still, we also observe severe limitations of the tried approach: Much of the savings are due to simple syntactic rules, noise in the data hampers the search for better prediction models, and some developers in the case company oppose the taken approach. Besides the main results on the mining and prediction of triggers for review remarks, we contribute experiences with a novel, multi-objective and interactive rule mining approach. The anonymized dataset from the company is made available, as are the implementations for the devised algorithms.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。