Local and Global Feature Based Explainable Feature Envy Detection

被引:8
|
作者
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 条
  • [1] Feature Envy Factor A Metric for Automatic Feature Envy Detection
    Nongpong, Kwankamol
    [J]. 2015 7TH INTERNATIONAL CONFERENCE ON KNOWLEDGE AND SMART TECHNOLOGY (KST), 2015, : 7 - 12
  • [2] Deep Learning Based Feature Envy Detection
    Liu, Hui
    Xu, Zhifeng
    Zou, Yanzhen
    [J]. PROCEEDINGS OF THE 2018 33RD IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMTED SOFTWARE ENGINEERING (ASE' 18), 2018, : 385 - 396
  • [3] Feature envy detection based on cross-graph local semantics matching
    Yang, Quanxin
    Yu, Dongjin
    Chen, Xin
    Xu, Yihang
    Yan, Wangliang
    Hu, Bin
    [J]. INFORMATION AND SOFTWARE TECHNOLOGY, 2024, 174
  • [4] A Feature Envy Detection Method Based on Dataflow Analysis
    Chen, Woei-Kae
    Liu, Chien-Hung
    Li, Bo-Hong
    [J]. 2018 IEEE 42ND ANNUAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE (COMPSAC 2018), VOL 2, 2018, : 14 - 19
  • [5] Fall detection algorithm based on global and local feature extraction
    Li, Bin
    Li, Jiangjiao
    Wang, Peng
    [J]. PATTERN RECOGNITION LETTERS, 2024, 185 : 31 - 37
  • [6] An explainable intrusion detection system based on feature importance
    Liao, Peixin
    Huang, Xvxin
    Huang, Qiangbo
    Liang, Yanming
    Wang, Zhongxiao
    Zhang, Denghui
    [J]. 2023 IEEE 12TH INTERNATIONAL CONFERENCE ON CLOUD NETWORKING, CLOUDNET, 2023, : 389 - 397
  • [7] Pre-trained Model Based Feature Envy Detection
    Ma, Wenhao
    Yu, Yaoxiang
    Ruan, Xiaoming
    Cai, Bo
    [J]. 2023 IEEE/ACM 20TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES, MSR, 2023, : 430 - 440
  • [8] Salient detection via local and global feature
    Cai, Qiang
    Hao, Jia-Yun
    Cao, Jian
    Li, Hai-Sheng
    [J]. Guangxue Jingmi Gongcheng/Optics and Precision Engineering, 2017, 25 (03): : 772 - 778
  • [9] Local and Global Feature Fusion Based Visual Concept Detection in Images
    Patil, Sanjay M.
    Bhoyar, Kishor K.
    [J]. 2018 INTERNATIONAL CONFERENCE ON ADVANCED COMPUTATION AND TELECOMMUNICATION (ICACAT), 2018,
  • [10] Visual Relationship Detection Based on Local Feature and Context Feature
    Han, Yuping
    Xu, Yajing
    Liu, Shishuo
    Gao, Sheng
    Li, Si
    [J]. PROCEEDINGS OF 2018 INTERNATIONAL CONFERENCE ON NETWORK INFRASTRUCTURE AND DIGITAL CONTENT (IEEE IC-NIDC), 2018, : 420 - 424