一句话:提出显著类定位方法,将被重点修改并引发其他类改动的类识别为二分类问题,帮助审查者理解代码变更。
代码审查需要投入大量人力来理解代码变更,因为审查所需信息往往分散在审查者不熟悉的多个文件中,而变更通常以 commit 为单位组织提交。作者发现大多数 commit 中存在一个“显著类”:它被显著修改,并导致同一 commit 中其余类的改动。用户研究证实,识别出 commit 中的显著类有助于审查者理解代码变更。为此,作者将显著类识别建模为二分类问题,从 commit 中抽取多种具有判别力的特征来刻画类的显著性。初步实验结果表明,所提方法能够提升审查者理解代码变更的效率。
Code review involves a significant amount of human effort to understand the code change, because the information required to inspect code changes may distribute across multiple files that reviewers are not familiar with. Code changes are often organized as commits for review. In this paper, we found that most of the commits contain a salient class, which is saliently modified and causes the modification of the rest classes in a commit. Our user studies confirmed that identifying the salient class in a commit can facilitate reviewers in understanding code change. We model the salient class identification as a binary classification problem and extract a number of discriminative features from commit to characterize the salience of a class. The initial experiment result shows that the proposed approach can improve the efficiency of reviewers understanding code changes in code review.
DOI 原文 ·
@inproceedings{paperbot4583,
title = {Salient-class location: help developers understand code change in code review},
author = {Yuan Huang and Nan Jia and Xiangping Chen and Kai Hong and Zibin Zheng},
booktitle = {FSE},
year = {2018},
doi = {10.1145/3236024.3264841}
}