Feature Envy detection based on Bi-LSTM with self-attention mechanism

Hongze Wang, Jing Liu, Jiexiang Kang, Wei Yin, Haiying Sun, Hui Wang

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

19 Scopus citations

Abstract

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.

Original languageEnglish
Title of host publicationProceedings - 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
EditorsJia Hu, Geyong Min, Nektarios Georgalas, Zhiwei Zhao, Fei Hao, Wang Miao
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages448-457
Number of pages10
ISBN (Electronic)9781665414852
DOIs
StatePublished - Dec 2020
Event18th 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 - Virtual, Exeter, United Kingdom
Duration: 17 Dec 202019 Dec 2020

Publication series

NameProceedings - 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

Conference

Conference18th 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
Country/TerritoryUnited Kingdom
CityVirtual, Exeter
Period17/12/2019/12/20

Keywords

  • Bi-LSTM
  • Code smell
  • Feature Envy Detection
  • Self-Attention Mechanism

Fingerprint

Dive into the research topics of 'Feature Envy detection based on Bi-LSTM with self-attention mechanism'. Together they form a unique fingerprint.

Cite this