一句话:在 ING 实践中检验机器学习模型推荐 Extract Method 重构的准确率,并对照专家判断。
识别重构机会仍是软件工程中的开放问题,已有研究表明机器学习模型可以推荐需要执行特定重构的方法。本文在大型金融机构 ING 的实际语境下开展此类实验,目标是识别应当进行 Extract Method(提取方法)重构的方法。研究包括:比较模型所用代码度量特征在开源系统与 ING 系统之间的分布差异;测量多种机器学习模型推荐 Extract Method 重构的准确率;将模型推荐结果与 ING 专家的意见进行对比。结果表明,ING 系统与开源系统的特征分布存在一定差异,机器学习模型能够以较高准确率推荐 Extract Method 重构,且专家总体上赞同模型给出的大部分推荐。
The sound identification of refactoring opportunities is still an open problem in software engineering. Recent studies have shown the effectiveness of machine learning models in recommending methods that should undergo different refactoring operations. In this work, we experiment with such approaches to identify methods that should undergo an Extract Method refactoring, in the context of ING, a large financial organization. More specifically, we (i) compare the code metrics distributions, which are used as features by the models, between open-source and ING systems, (ii) measure the accuracy of different machine learning models in recommending Extract Method refactorings, (iii) compare the recommendations given by the models with the opinions of ING experts. Our results show that the feature distributions of ING systems and open-source systems are somewhat different, that machine learning models can recommend Extract Method refactorings with high accuracy, and that experts tend to agree with most of the recommendations of the model.
@inproceedings{paperbot6289,
title = {Data-driven extract method recommendations: a study at ING},
author = {David van der Leij and Jasper Binda and Robbert van Dalen and Pieter Vallen and Yaping Luo and Maurício Aniche},
booktitle = {FSE},
year = {2021},
doi = {10.1145/3468264.3473927}
}