Prediction of Code Smell from Source Code: A Hybrid Approach
Ritu Sarker Puja, Taniz Fatema, Nazneen Akhter, Afrina Khatun · 2023
A code smell is one of the main reasons for generating low-quality software. To make the software scalable, manageable, and reusable code smell detection is required. In this work, a hybrid model using SVM and GridSearch is suggested to identify the four code smells namely Swiss Army Knife (SAK), Spaghetti Code (SC), Functional Decomposition (FD), and Blob. This work shows that applying GridSearch with SVM can remove the over-fitting and under-fitting problems by tuning the best parameters of it. To enhance the performance, two feature selection techniques namely wrapper and mutual information have been used. This hybrid model with wrapper feature selection technique performed the best in terms of accuracy which is 99.76% for Azureus BLOB.