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 条
  • [41] Detection Based Local Feature Context for Image Classification
    Sun, Tao
    PROCEEDINGS 2013 INTERNATIONAL CONFERENCE ON MECHATRONIC SCIENCES, ELECTRIC ENGINEERING AND COMPUTER (MEC), 2013, : 1355 - 1358
  • [42] Fast pedestrian detection based on feature of local model
    Gu, Lingkang
    JOURNAL OF COMPUTATIONAL METHODS IN SCIENCES AND ENGINEERING, 2015, 15 (03) : 387 - 393
  • [43] Deep Learning Based Feature Envy Detection Boosted by Real-World Examples
    Liu, Bo
    Liu, Hui
    Li, Guangjie
    Niu, Nan
    Xu, Zimao
    Wang, Yifan
    Xia, Yunni
    Zhang, Yuxia
    Jiang, Yanjie
    PROCEEDINGS OF THE 31ST ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2023, 2023, : 908 - 920
  • [44] Global feature integration based salient region detection
    Lin, Mingqiang
    Zhang, Chenbin
    Chen, Zonghai
    NEUROCOMPUTING, 2015, 159 : 1 - 8
  • [45] A LOCAL FEATURE BASED BLURRING DETECTION FOR IRIS RECOGNITION
    Wang, Q.
    Chu, Y. N.
    Cai, Z. L.
    Zhang, X. D.
    BASIC & CLINICAL PHARMACOLOGY & TOXICOLOGY, 2016, 119 : 24 - 24
  • [46] Multiscale Local and Global Feature Fusion for the Detection of Steel Surface Defects
    Zhang, Li
    Fu, Zhipeng
    Guo, Huaping
    Sun, Yange
    Li, Xirui
    Xu, Mingliang
    ELECTRONICS, 2023, 12 (14)
  • [47] Global Feature Guided Local Pooling
    Kobayashi, Takumi
    2019 IEEE/CVF INTERNATIONAL CONFERENCE ON COMPUTER VISION (ICCV 2019), 2019, : 3364 - 3373
  • [48] LGFDR: local and global feature denoising reconstruction for unsupervised anomaly detection
    Chen, Yichi
    Chen, Bin
    Xian, Weizhi
    Wang, Junjie
    Huang, Yao
    Chen, Min
    VISUAL COMPUTER, 2024, 40 (12): : 8881 - 8894
  • [49] Deception Detection Algorithm Based on Global and Local Feature Fusion with Multi-head Attention
    Kang, Jian
    Qu, Wen
    Cui, Shaoxing
    Feng, Xiaoyi
    2024 3RD INTERNATIONAL CONFERENCE ON IMAGE PROCESSING AND MEDIA COMPUTING, ICIPMC 2024, 2024, : 162 - 168
  • [50] A Local Texture-Based Superpixel Feature Coding for Saliency Detection Combined with Global Saliency
    Nan, Bingfei
    Mu, Zhichun
    Chen, Long
    Cheng, Jian
    APPLIED SCIENCES-BASEL, 2015, 5 (04): : 1528 - 1546