TY - GEN
T1 - Feature Envy detection based on Bi-LSTM with self-attention mechanism
AU - Wang, Hongze
AU - Liu, Jing
AU - Kang, Jiexiang
AU - Yin, Wei
AU - Sun, Haiying
AU - Wang, Hui
N1 - Publisher Copyright:
© 2020 IEEE.
PY - 2020/12
Y1 - 2020/12
N2 - Code Smell refers to suboptimal or harmful structures in the source code that may impede the maintainability of software. It serves as an effective way to detect refactoring opportunities. As the most prevailing smell, Feature Envy and its detection has been deeply explored for many years, which produces massive automated detection methods. Nevertheless, the heuristic-based approach cannot reach a satisfying level, and the machine learning approach still needs further optimization. Recent advances in deep learning inspire the birth of deep learning based approach. In this paper, we define a simpler distance metric as numerical feature and we collect class name and method name as text feature. Then we leverage Bidirectional Long-Short Term Memory (Bi-LSTM) Network with self-attention mechanism to extract semantic distance information in the text part, and we adopt embedding technology to enhance the structure distance information in the numerical part. Combined with the two sophisticatedly designed modules and the final classification module, a more reliable and accurate model is presented. Experimental results on seven open-source Java projects show that our model significantly outperforms existing methods.
AB - Code Smell refers to suboptimal or harmful structures in the source code that may impede the maintainability of software. It serves as an effective way to detect refactoring opportunities. As the most prevailing smell, Feature Envy and its detection has been deeply explored for many years, which produces massive automated detection methods. Nevertheless, the heuristic-based approach cannot reach a satisfying level, and the machine learning approach still needs further optimization. Recent advances in deep learning inspire the birth of deep learning based approach. In this paper, we define a simpler distance metric as numerical feature and we collect class name and method name as text feature. Then we leverage Bidirectional Long-Short Term Memory (Bi-LSTM) Network with self-attention mechanism to extract semantic distance information in the text part, and we adopt embedding technology to enhance the structure distance information in the numerical part. Combined with the two sophisticatedly designed modules and the final classification module, a more reliable and accurate model is presented. Experimental results on seven open-source Java projects show that our model significantly outperforms existing methods.
KW - Bi-LSTM
KW - Code smell
KW - Feature Envy Detection
KW - Self-Attention Mechanism
UR - https://www.scopus.com/pages/publications/85108027397
U2 - 10.1109/ISPA-BDCloud-SocialCom-SustainCom51426.2020.00082
DO - 10.1109/ISPA-BDCloud-SocialCom-SustainCom51426.2020.00082
M3 - 会议稿件
AN - SCOPUS:85108027397
T3 - Proceedings - 2020 IEEE International Symposium on Parallel and Distributed Processing with Applications, 2020 IEEE International Conference on Big Data and Cloud Computing, 2020 IEEE International Symposium on Social Computing and Networking and 2020 IEEE International Conference on Sustainable Computing and Communications, ISPA-BDCloud-SocialCom-SustainCom 2020
SP - 448
EP - 457
BT - Proceedings - 2020 IEEE International Symposium on Parallel and Distributed Processing with Applications, 2020 IEEE International Conference on Big Data and Cloud Computing, 2020 IEEE International Symposium on Social Computing and Networking and 2020 IEEE International Conference on Sustainable Computing and Communications, ISPA-BDCloud-SocialCom-SustainCom 2020
A2 - Hu, Jia
A2 - Min, Geyong
A2 - Georgalas, Nektarios
A2 - Zhao, Zhiwei
A2 - Hao, Fei
A2 - Miao, Wang
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 18th IEEE International Symposium on Parallel and Distributed Processing with Applications, 10th IEEE International Conference on Big Data and Cloud Computing, 13th IEEE International Symposium on Social Computing and Networking and 10th IEEE International Conference on Sustainable Computing and Communications, ISPA-BDCloud-SocialCom-SustainCom 2020
Y2 - 17 December 2020 through 19 December 2020
ER -