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 条
  • [1] Research on Question Answering System Based on Bi-LSTM and Self-attention Mechanism
    Xiang, Hao
    Gu, Jinguang
    [J]. 2020 IEEE 7TH INTERNATIONAL CONFERENCE ON INDUSTRIAL ENGINEERING AND APPLICATIONS (ICIEA 2020), 2020, : 726 - 730
  • [2] Social Network Spam Detection Based on ALBERT and Combination of Bi-LSTM with Self-Attention
    Xu, Guangxia
    Zhou, Daiqi
    Liu, Jun
    [J]. SECURITY AND COMMUNICATION NETWORKS, 2021, 2021
  • [3] VMD and self-attention mechanism-based Bi-LSTM model for fault detection of optical fiber composite submarine cables
    Lu, Jie
    Feng, Wenjiang
    Li, Yuan
    Zhang, Juntao
    Zou, Yongqi
    Li, Jingfu
    [J]. EURASIP JOURNAL ON ADVANCES IN SIGNAL PROCESSING, 2023, 2023 (01)
  • [4] VMD and self-attention mechanism-based Bi-LSTM model for fault detection of optical fiber composite submarine cables
    Jie Lu
    Wenjiang Feng
    Yuan Li
    Juntao Zhang
    Yongqi Zou
    Jingfu Li
    [J]. EURASIP Journal on Advances in Signal Processing, 2023
  • [5] Self-Attention Bi-LSTM Networks for Radar Signal Modulation Recognition
    Wei, Shunjun
    Qu, Qizhe
    Zeng, Xiangfeng
    Liang, Jiadian
    Shi, Jun
    Zhang, Xiaoling
    [J]. IEEE TRANSACTIONS ON MICROWAVE THEORY AND TECHNIQUES, 2021, 69 (11) : 5160 - 5172
  • [6] The Joy of Dressing Is an Art: Outfit Generation Using Self-attention Bi-LSTM
    Madan, Manchit
    Chouragade, Ankur
    Vempati, Sreekanth
    [J]. MACHINE LEARNING AND KNOWLEDGE DISCOVERY IN DATABASES, ECML PKDD 2021: APPLIED DATA SCIENCE TRACK, PT V, 2021, 12979 : 218 - 233
  • [7] Sentiment analysis for user reviews using Bi-LSTM self-attention based CNN model
    Bhuvaneshwari, P.
    Rao, A. Nagaraja
    Robinson, Y. Harold
    Thippeswamy, M. N.
    [J]. MULTIMEDIA TOOLS AND APPLICATIONS, 2022, 81 (09) : 12405 - 12419
  • [8] Sentiment analysis for user reviews using Bi-LSTM self-attention based CNN model
    P. Bhuvaneshwari
    A. Nagaraja Rao
    Y. Harold Robinson
    M. N. Thippeswamy
    [J]. Multimedia Tools and Applications, 2022, 81 : 12405 - 12419
  • [9] Entity Relationship Extraction Based on Bi-LSTM and Attention Mechanism
    Wei, Ming
    Xu, Zhipeng
    Hu, Jiwei
    [J]. PROCEEDINGS OF 2021 2ND INTERNATIONAL CONFERENCE ON ARTIFICIAL INTELLIGENCE AND INFORMATION SYSTEMS (ICAIIS '21), 2021,
  • [10] EEG-based sleep staging via self-attention based capsule network with Bi-LSTM model
    Chen, Jin
    Han, Zhihui
    Qiao, Heyuan
    Li, Chang
    Peng, Hu
    [J]. BIOMEDICAL SIGNAL PROCESSING AND CONTROL, 2023, 86