Feature Envy Detection based on Bi-LSTM with Self-Attention Mechanism

被引:9
|
作者
Wang, Hongze [1 ]
Liu, Jing [1 ]
Kang, JieXiang [2 ]
Yin, Wei [2 ]
Sun, Haiying [1 ]
Wang, Hui [2 ]
机构
[1] East China Normal Univ, Shanghai Key Lab Trustworthy Comp, Shanghai, Peoples R China
[2] China Aeronaut Radio Elect Res Inst, Shanghai, Peoples R China
关键词
Code smell; Feature Envy Detection; Bi-LSTM; Self-Attention Mechanism; MACHINE LEARNING TECHNIQUES; CODE SMELLS;
D O I
10.1109/ISPA-BDCloud-SocialCom-SustainCom51426.2020.00082
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
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.
引用
收藏
页码:448 / 457
页数:10
相关论文
共 50 条
  • [21] An Improved Generating Energy Prediction Method Based on Bi-LSTM and Attention Mechanism
    He, Bo
    Ma, Runze
    Zhang, Wenwei
    Zhu, Jun
    Zhang, Xingyuan
    [J]. ELECTRONICS, 2022, 11 (12)
  • [22] Event Detection from Web Data in Chinese Based on Bi-LSTM with Attention
    Wu, Yuxin
    Xu, Zenghui
    Li, Hongzhou
    Gan, Yuquan
    Ying, Josh Jia-Ching
    Yu, Ting
    Zhang, Ji
    [J]. ADVANCED DATA MINING AND APPLICATIONS (ADMA 2022), PT I, 2022, 13725 : 93 - 105
  • [23] Attention-based Bi-LSTM Model for Anomalous HTTP Traffic Detection
    Yu, Yuqi
    Liu, Guannan
    Yan, Hanbing
    Li, Hong
    Guan, Hongchao
    [J]. 2018 15TH INTERNATIONAL CONFERENCE ON SERVICE SYSTEMS AND SERVICE MANAGEMENT (ICSSSM), 2018,
  • [24] 基于Self-Attention与Bi-LSTM的大学生情感倾向研究
    张颖
    [J]. 软件导刊, 2024, 23 (12) : 53 - 57
  • [25] TASSM_BS:基于Bi-LSTM和Self-Attention的藏文自动分句方法
    才让叁智
    多拉
    格桑多吉
    洛桑嘎登
    仁增多杰
    [J]. 中文信息学报, 2023, (05) : 44 - 52
  • [26] Recongnition of Distracted Driving Behavior Based on Improved Bi-LSTM Model and Attention Mechanism
    Wang, Zhanfeng
    Yao, Lisha
    [J]. IEEE ACCESS, 2024, 12 : 67711 - 67725
  • [27] Extraction and Classification of TCM Medical Records Based on BERT and Bi-LSTM With Attention Mechanism
    Hui, Ye
    Du, Lin
    Lin, Shuyuan
    Qu, Yiqian
    Cao, Dong
    [J]. 2020 IEEE INTERNATIONAL CONFERENCE ON BIOINFORMATICS AND BIOMEDICINE, 2020, : 1626 - 1631
  • [28] Forecasting Bus Passenger Flow Using Bi-LSTM with Attention Mechanism
    Chen, Tao
    Fang, Jie
    Liu, Zhijia
    Xiao, Pinghui
    [J]. CICTP 2021: ADVANCED TRANSPORTATION, ENHANCED CONNECTION, 2021, : 54 - 65
  • [29] Attention-Based Bi-LSTM for Anomaly Detection on Time-Series Data
    Mishra, Sanket
    Kshirsagar, Varad
    Dwivedula, Rohit
    Hota, Chittaranjan
    [J]. ARTIFICIAL NEURAL NETWORKS AND MACHINE LEARNING - ICANN 2021, PT I, 2021, 12891 : 129 - 140
  • [30] Sequence-Feature Detection of Small Targets in Sea Clutter Based on Bi-LSTM
    Wan, Hao
    Tian, Xiaoqing
    Liang, Jing
    Shen, Xiaofeng
    [J]. IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING, 2022, 60