计算机科学
特征(语言学)
人工智能
杠杆(统计)
Java
源代码
可维护性
重构代码
启发式
公制(单位)
编码(集合论)
嵌入
深度学习
机器学习
软件
程序设计语言
软件工程
运营管理
集合(抽象数据类型)
经济
哲学
语言学
作者
Hongze Wang,Jing Liu,Jiexiang Kang,Wei Yin,Haiying Sun,Hui Wang
标识
DOI:10.1109/ispa-bdcloud-socialcom-sustaincom51426.2020.00082
摘要
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.
科研通智能强力驱动
Strongly Powered by AbleSci AI