一句话:提出基于深度学习与自动标注数据的特性依恋检测方法,显著优于现有技术并推荐重构目标。
软件重构需要识别代码坏味,特性依恋是常见坏味之一。现有方法依赖人工设计的启发式,将手动选择的代码度量映射为预测,难以选取最佳特征(尤其是文本特征)并构造最优启发式。本文提出基于深度学习的特性依恋检测方法,利用深度神经网络自动选择源代码特征(特别是文本特征),并自动建立特征与预测之间的复杂映射。同时提出无需人工干预的自动标注训练数据生成方法。在开源应用上的评估表明,该方法在检测特性依恋坏味以及为有坏味的方法推荐重构目标方面均显著优于现有技术。
Software refactoring is widely employed to improve software quality. A key step in software refactoring is to identify which part of the software should be refactored. To facilitate the identification, a number of approaches have been proposed to identify certain structures in the code (called code smells) that suggest the possibility of refactoring. Most of such approaches rely on manually designed heuristics to map manually selected source code metrics to predictions. However, it is challenging to manually select the best features, especially textual features. It is also difficult to manually construct the optimal heuristics. To this end, in this paper we propose a deep learning based novel approach to detecting feature envy, one of the most common code smells. The key insight is that deep neural networks and advanced deep learning techniques could automatically select features (especially textual features) of source code for feature envy detection, and could automatically build the complex mapping between such features and predictions. We also propose an automatic approach to generating labeled training data for the neural network based classifier, which does not require any human intervention. Evaluation results on open-source applications suggest that the proposed approach significantly improves the state-of-the-art in both detecting feature envy smells and recommending destinations for identified smelly methods.
DOI 原文 ·
@inproceedings{paperbot4796,
title = {Deep learning based feature envy detection},
author = {Hui Liu and Zhifeng Xu and Yanzhen Zou},
booktitle = {ASE},
year = {2018},
doi = {10.1145/3238147.3238166}
}