A Novel Approach for Enhancing Code Smell Detection Using Random Convolutional Kernel Transform.

Saved in:
Bibliographic Details
Title: A Novel Approach for Enhancing Code Smell Detection Using Random Convolutional Kernel Transform.
Authors: Abdelkader, Mostefai, Mansour, Mekour
Source: e-Informatica; 2025, Vol. 19 Issue 1, p1-32, 32p
Subject Terms: SOFTWARE engineering, DEEP learning, MACHINE learning, EMPIRICAL research, SIGNAL detection, DEFECT tracking (Computer software development), FEATURE selection
Abstract: Context: In software engineering, the presence of code smells is closely associated with increased maintenance costs and complexities, making their detection and remediation an important concern. Objective: Despite numerous deep learning approaches for code smell detection, many still heavily rely on feature engineering processes (metrics) and exhibit limited performance. To address these shortcomings, this paper introduces CSDXR, a novel approach for enhancing code smell detection based on Random Convolutional Kernel Transform - a state-of-the-art technique for time series classification. The proposed approach does not rely on a manual feature engineering process and follows a three-step process: first, it converts code snippets into numerical sequences through tokenization; second, it applies Random Convolutional Kernel Transform to generate pooled models from these sequences; and third, it constructs a classifier from the pooled models to identify code smells. Method: The proposed approach was evaluated on four real-world datasets and compared against four state-of-the-art methods - DeepSmells, AE-Dense, AE-CNN, and AE-LSTM - in detecting Complex Method, Multifaceted Abstraction, Feature Envy, and Complex Conditional smells. Results: Empirical results demonstrate that CSDXR outperformed the four state-of-the-art methods - DeepSmells, AE-Dense, AE-CNN, and AE-LSTM - in detecting Complex Method and Multifaceted Abstraction smells. Specifically, the enhancement rates in terms of F1-score were 1.99% and 6.09% for Complex Method and Multifaceted Abstraction smells, respectively. In terms of MCC, the improvement rates were 0.82% and 35.64% for these two smells, respectively. The results also show that while DeepSmells achieves superior overall performance on Feature Envy and Complex Conditional smells, CSDXR surpasses AE-Dense, AE-CNN, and AE-LSTM in detecting these two types of smells. Conclusions: The paper concludes that the proposed approach, CSDXR, demonstrates significant potential for effectively detecting various types of code smells. [ABSTRACT FROM AUTHOR]
Copyright of e-Informatica is the property of Oficyna Wydawnicza Politechniki Wroclawskiej and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)
Database: Complementary Index
Description
Abstract:Context: In software engineering, the presence of code smells is closely associated with increased maintenance costs and complexities, making their detection and remediation an important concern. Objective: Despite numerous deep learning approaches for code smell detection, many still heavily rely on feature engineering processes (metrics) and exhibit limited performance. To address these shortcomings, this paper introduces CSDXR, a novel approach for enhancing code smell detection based on Random Convolutional Kernel Transform - a state-of-the-art technique for time series classification. The proposed approach does not rely on a manual feature engineering process and follows a three-step process: first, it converts code snippets into numerical sequences through tokenization; second, it applies Random Convolutional Kernel Transform to generate pooled models from these sequences; and third, it constructs a classifier from the pooled models to identify code smells. Method: The proposed approach was evaluated on four real-world datasets and compared against four state-of-the-art methods - DeepSmells, AE-Dense, AE-CNN, and AE-LSTM - in detecting Complex Method, Multifaceted Abstraction, Feature Envy, and Complex Conditional smells. Results: Empirical results demonstrate that CSDXR outperformed the four state-of-the-art methods - DeepSmells, AE-Dense, AE-CNN, and AE-LSTM - in detecting Complex Method and Multifaceted Abstraction smells. Specifically, the enhancement rates in terms of F1-score were 1.99% and 6.09% for Complex Method and Multifaceted Abstraction smells, respectively. In terms of MCC, the improvement rates were 0.82% and 35.64% for these two smells, respectively. The results also show that while DeepSmells achieves superior overall performance on Feature Envy and Complex Conditional smells, CSDXR surpasses AE-Dense, AE-CNN, and AE-LSTM in detecting these two types of smells. Conclusions: The paper concludes that the proposed approach, CSDXR, demonstrates significant potential for effectively detecting various types of code smells. [ABSTRACT FROM AUTHOR]
ISSN:18977979
DOI:10.37190/e-Inf250106