arrow
Return

DeepCSS: severity classification for code smell based on deep learning

delete2025-05-01
delete0
PRE
AI
张杨 cover
张杨 (Yang Zhang) *
张春辉 cover
张春辉 (Chunhui Zhang)
K
Kun Zheng
G
Grant Meredith
DOI:10.1007/s10664-025-10637-xdelete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Code smell severity refers to the different levels of impact extent that smelly instances may have upon a specific project when more than one kind of code smell exists. Severity classification helps developers better understand a code smell and prioritize multiple refactoring operations more efficiently, thus improving the efficiency of software maintenance. However, existing studies on code smell severity assessment and classification suffer from insufficient quantitative evaluation and low accuracy. To this end, this paper proposes DeepCSS, a novel approach to classify code smell severity based on deep learning. To evaluate the severity of code smells reasonably and accurately, a quantitative evaluation framework is proposed to evaluate the importance of assessing each related metric. With this evaluation framework, datasets are constructed for four types of code smell (including data class, god class, long method, and feature envy) extracted from 100 real-world projects. DeepCSS acquires structural and semantic information from which features are extracted by leveraging BiLSTM-Attention and the improved CNN model. Then the final classification is done by a fully connected network containing the Attention mechanism and softmax functions. The experimental results show that DeepCSS can achieve an accuracy ranging from 95.11% to 98.97%. Compared to other studies, DeepCSS obtained an average improvement of 6.97% and 1.39% in MCC, demonstrating its effectiveness.
Keywords:
Code smell
Severity classification
Deep learning
Pre-training model
FSM quality model

Journal

Empirical Software Engineering cover
Empirical Software Engineering
IF:
3.6
Papers:
2.0K
Citations:
5.3K

Organization

F
Federation University Australia
Scholars:
2.0K
Papers: 2.3K
Citations: 17