Local and Global Feature Based Explainable Feature Envy Detection

被引:11
|
作者
Yin, Xin [1 ]
Shi, Chongyang [1 ]
Zhao, Shuxin [1 ]
机构
[1] Beijing Inst Technol, Sch Comp Sci, Beijing, Peoples R China
基金
中国国家自然科学基金;
关键词
Feature Envy; Deep Learning; Software Refactoring; CODE; SMELLS;
D O I
10.1109/COMPSAC51774.2021.00127
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
Code smell detection can help developers identify position of code smell in projects and enhance the quality of software system. Usually codes with similar semantic relationships have greater code dependencies, and most code smell detection methods ignore dependencies relationships within the source code. Thus, their detection results may be heavily influenced by inadequate code feature, which can lead to some code smell not being detected. In addition, existing methods cannot explain the correlation between detection results and code information. However, an explainable result can help developers make better judgments on code smell reconstruction. Accordingly, in this paper, we propose a local and global feature based explainable approach to detecting feature envy, one of the most common code smells. For the model to make the most of code information, we design different representation models for global code and local code respectively to extract different feature envy features, and automatically combine these features that are beneficial in terms of detection accuracy. We further design a code semantic dependency (CSD) to make the detection result easy to explain. The evaluation results of seven manual building code smell projects and three real projects show that the proposed approach improves on the state-of-the-art in detecting feature envy and boosting the explainability of results.
引用
收藏
页码:942 / 951
页数:10
相关论文
共 50 条
  • [21] Combining transformer global and local feature extraction for object detection
    Li, Tianping
    Zhang, Zhenyi
    Zhu, Mengdi
    Cui, Zhaotong
    Wei, Dongmei
    COMPLEX & INTELLIGENT SYSTEMS, 2024, 10 (04) : 4897 - 4920
  • [22] Feature selection based on fuzzy combination entropy considering global and local feature correlation
    Dai, Jianhua
    Liu, Qi
    Zou, Xiongtao
    Zhang, Chucai
    INFORMATION SCIENCES, 2024, 652
  • [23] Feature selection based on fuzzy combination entropy considering global and local feature correlation
    Dai, Jianhua
    Liu, Qi
    Zou, Xiongtao
    Zhang, Chucai
    Information Sciences, 2024, 652
  • [24] Local and global structure preserving based feature selection
    Ren, Yazhou
    Zhang, Guoji
    Yu, Guoxian
    Li, Xuan
    NEUROCOMPUTING, 2012, 89 : 147 - 157
  • [25] Global Enhancement but Local Suppression in Feature Based Attention
    Mueller, Matthias M.
    Forschack, Norman
    Andersen, Soeren
    PERCEPTION, 2016, 45 : 196 - 196
  • [26] Face Recognition Based on Global and Local Feature Fusion
    Zhou, You
    Liu, Yiyue
    Han, Guijin
    Zhang, Zichao
    2019 IEEE SYMPOSIUM SERIES ON COMPUTATIONAL INTELLIGENCE (IEEE SSCI 2019), 2019, : 2771 - 2775
  • [27] Fusion of global and local feature based iris recognition
    Zhang, PF
    Zhang, SS
    PROCEEDINGS OF THE 2004 INTERNATIONAL CONFERENCE ON INTELLIGENT MECHATRONICS AND AUTOMATION, 2004, : 922 - 926
  • [28] Multi-feature fusion based face forgery detection with local and global characteristics
    Ding, Yuanqing
    Bu, Fanliang
    Zhai, Hanming
    Hou, Zhiwen
    Wang, Yifan
    PLOS ONE, 2024, 19 (10):
  • [29] Interactive local and global feature coupling for EEG-based epileptic seizure detection
    Zhao, Yanna
    Chu, Dengyu
    He, Jiatong
    Xue, Mingrui
    Jia, Weikuan
    Xu, Fangzhou
    Zheng, Yuanjie
    BIOMEDICAL SIGNAL PROCESSING AND CONTROL, 2023, 81
  • [30] Global-local Feature Aggregation for Event-based Object Detection on EventKITTI
    Liang, Zichen
    Cao, Hu
    Yang, Chu
    Zhang, Zikai
    Chen, Guang
    2022 IEEE INTERNATIONAL CONFERENCE ON MULTISENSOR FUSION AND INTEGRATION FOR INTELLIGENT SYSTEMS (MFI), 2022,