TY - GEN
T1 - Local and global feature based explainable feature envy detection
AU - Yin, Xin
AU - Shi, Chongyang
AU - Zhao, Shuxin
N1 - Publisher Copyright:
© 2021 IEEE.
PY - 2021/7
Y1 - 2021/7
N2 - 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.
AB - 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.
KW - Deep learning
KW - Feature envy
KW - Software refactoring
UR - http://www.scopus.com/inward/record.url?scp=85115867718&partnerID=8YFLogxK
U2 - 10.1109/COMPSAC51774.2021.00127
DO - 10.1109/COMPSAC51774.2021.00127
M3 - Conference contribution
AN - SCOPUS:85115867718
T3 - Proceedings - 2021 IEEE 45th Annual Computers, Software, and Applications Conference, COMPSAC 2021
SP - 942
EP - 951
BT - Proceedings - 2021 IEEE 45th Annual Computers, Software, and Applications Conference, COMPSAC 2021
A2 - Chan, W. K.
A2 - Claycomb, Bill
A2 - Takakura, Hiroki
A2 - Yang, Ji-Jiang
A2 - Teranishi, Yuuichi
A2 - Towey, Dave
A2 - Segura, Sergio
A2 - Shahriar, Hossain
A2 - Reisman, Sorel
A2 - Ahamed, Sheikh Iqbal
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 45th IEEE Annual Computers, Software, and Applications Conference, COMPSAC 2021
Y2 - 12 July 2021 through 16 July 2021
ER -