Title:
A study for method-level code smells detection using machine learning algorithms

dc.contributor.authorRajwant Singh Rao
dc.contributor.authorSeema Dewangan
dc.contributor.authorAlok Mishra
dc.contributor.authorManjari Gupta
dc.date.accessioned2026-02-19T05:59:54Z
dc.date.issued2025
dc.description.abstractMotivation: Code smells reflect poor design decisions that degrade software quality and maintainability. Although several machine learning algorithms have been proposed to detect code smells, the impact of feature selection and cross-validation on certain method-level smells, specifically Long Parameter List and Switch Statements, has not been adequately explored in prior research. Methodology: This study employs a rigorous methodology to investigate the detection of four method-level code smells—Long Parameter List (LPL), Switch Statement (SS), Feature Envy (FE), and Long Method (LM) using twenty machine learning algorithms. We apply the Information Gain feature selection algorithm and the Equal Width Discretization (EWD) class balancing method. Performance is evaluated using 10-fold cross-validation across multiple metrics: accuracy, precision, recall, F-measure, MCC, ROC-area, and PRC-area. Key Findings: The proposed framework achieved a remarkable 99.77% accuracy for the Long Method dataset using the Filtered Classifier with feature selection and class balancing. Importantly, this study is the first to demonstrate the effect of feature selection and cross-validation on the LPL and SS datasets, where significant performance improvements are also observed. Contributions: A comprehensive comparative analysis of 20 machine learning algorithms on four method-level code smell datasets. © 2025 The Author(s)
dc.identifier.doi10.1016/j.sasc.2025.200346
dc.identifier.urihttps://doi.org/10.1016/j.sasc.2025.200346
dc.identifier.urihttps://dl.bhu.ac.in/bhuir/handle/123456789/63142
dc.publisherAcademic Press
dc.subjectClass balancer technique
dc.subjectCode smell detection
dc.subjectInformation Gain feature selection algorithm
dc.subjectMachine learning algorithms
dc.subjectMethod level smells
dc.titleA study for method-level code smells detection using machine learning algorithms
dc.typePublication
dspace.entity.typeArticle

Files

Collections