TY - GEN
T1 - Deep learning based feature envy detection
AU - Liu, Hui
AU - Xu, Zhifeng
AU - Zou, Yanzhen
N1 - Publisher Copyright:
© 2018 Copyright held by the owner/author(s).
PY - 2018/9/3
Y1 - 2018/9/3
N2 - 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.
AB - 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.
KW - Code smells
KW - Deep learning
KW - Feature envy
KW - Software refactoring
UR - http://www.scopus.com/inward/record.url?scp=85056520897&partnerID=8YFLogxK
U2 - 10.1145/3238147.3238166
DO - 10.1145/3238147.3238166
M3 - Conference contribution
AN - SCOPUS:85056520897
T3 - ASE 2018 - Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering
SP - 385
EP - 396
BT - ASE 2018 - Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering
A2 - Kastner, Christian
A2 - Huchard, Marianne
A2 - Fraser, Gordon
PB - Association for Computing Machinery, Inc
T2 - 33rd IEEE/ACM International Conference on Automated Software Engineering, ASE 2018
Y2 - 3 September 2018 through 7 September 2018
ER -