TY - GEN
T1 - Correlation Feature Mining Model Based on Dual Attention for Feature Envy Detection
AU - Zhao, Shuxin
AU - Shi, Chongyang
AU - Ren, Shaojun
AU - Mohsin, Hufsa
N1 - Publisher Copyright:
© 2022 Knowledge Systems Institute Graduate School. All rights reserved.
PY - 2022
Y1 - 2022
N2 - Feature Envy is a code smell due to the abnormal calling relationships between methods and classes, which adversely affects software scalability and maintainability. Existing methods mainly use various technologies to model abnormal relationships to detect feature envy. However, these methods only rely on local features such as entity names, which is not robust enough. Moreover, the mining depth of correlation features between entities involved in feature envy is limited. In this paper, we propose a correlation feature mining model based on dual attention to detect feature envy. Firstly, we propose a multi-view-based entity representation strategy, which enhanced the robustness of the model while improving the suitability of the correlation feature and model. Secondly, we add attention mechanism to the channel dimension and spatial dimension of CNN to control the flow of information and capture the correlation features between entities more accurately. Finally, the evaluation results on projects both with and without feature envy injected show that our proposed approach outperforms the state-of-the-art methods.
AB - Feature Envy is a code smell due to the abnormal calling relationships between methods and classes, which adversely affects software scalability and maintainability. Existing methods mainly use various technologies to model abnormal relationships to detect feature envy. However, these methods only rely on local features such as entity names, which is not robust enough. Moreover, the mining depth of correlation features between entities involved in feature envy is limited. In this paper, we propose a correlation feature mining model based on dual attention to detect feature envy. Firstly, we propose a multi-view-based entity representation strategy, which enhanced the robustness of the model while improving the suitability of the correlation feature and model. Secondly, we add attention mechanism to the channel dimension and spatial dimension of CNN to control the flow of information and capture the correlation features between entities more accurately. Finally, the evaluation results on projects both with and without feature envy injected show that our proposed approach outperforms the state-of-the-art methods.
KW - Attention Mechanism
KW - Code Smell
KW - Deep Learning
KW - Feature Envy
KW - Software Refactoring
UR - http://www.scopus.com/inward/record.url?scp=85137168457&partnerID=8YFLogxK
U2 - 10.18293/SEKE2022-009
DO - 10.18293/SEKE2022-009
M3 - Conference contribution
AN - SCOPUS:85137168457
T3 - Proceedings of the International Conference on Software Engineering and Knowledge Engineering, SEKE
SP - 634
EP - 639
BT - SEKE 2022 - Proceedings of the 34th International Conference on Software Engineering and Knowledge Engineering
PB - Knowledge Systems Institute Graduate School
T2 - 34th International Conference on Software Engineering and Knowledge Engineering, SEKE 2022
Y2 - 1 July 2022 through 10 July 2022
ER -