# Machine Learning-Based Methods for Code Smell Detection: A Survey
## 6 Conclusions  
This study conducted an SLR to analyze and show different aspects of code smell detection with ML algorithms. The SLR covers the class-wise distribution of ML algorithms, a unique aspect not yet present in the literature, providing up-to-date knowledge to researchers for future studies. The class-wise distribution of ML algorithms is significant as it provides insights into the popularity and effectiveness of different ML algorithms in code smell detection. This study offers detailed insights into code smells, primarily focusing on ML algorithms and software metrics applied in studies, which have been found to be beneficial. The review procedure is framed with five research questions. Table 13 shows the evaluation of research articles and their score. Section 3.3 reports various categories of research articles; 36 are above average, and 6 are below average. Tables 14-15 presents the attributes used to identify the articles. This study aims to facilitate a better understanding of code smell detection with ML algorithms and help researchers identify the popular methods and the methods that perform better. This SLR summarizes different ML algorithms, performance measures, datasets, and software metrics for detecting code smells. Some main conclusions are as follows:  
* Decision Trees, Ensemble Learners, Bayesian Learners, Rule-Based Learning, Support Vector Machines, neural networks, and other miscellaneous ML algorithms are used to detect code smells. The most frequently used ML algorithms from other classes are Naive Bayes, JRip, J48, Random Forest, and SVM. * This study examined many datasets, some of which are open-source and a few of which are industrial datasets. The datasets are written in different languages, such as C#, JAVA, and XML; of these, JAVA language datasets are more popular. * A massive range of datasets has been utilized. Xerces, ArgoUML, Gantt Project, Azureus, Eclipse, and object-oriented metrics datasets are frequently used. Apache Ant, Fluid Tool, iPlasma, PMD, etc., are also used in this area. * Popularly used performance measures are precision, recall, accuracy, and F-measure. MCC, MAE, Hamming score, etc., are also used for performance assessment but are used less frequently than the rest. This study is a valuable resource for software developers, providing a comprehensive discussion of code smell detection. It enhances developers' understanding of code smells, equipping them with the knowledge to identify and eliminate them. This understanding can be applied to improve software quality and resolve issues. The practical implications of this study's findings are significant, as they can directly impact the quality and maintainability of software, a key concern for developers. Better code can be written with an understanding of code smells. Over 30 code smells are discussed in this study. The findings of this research study provide insight into how to enhance its quality and maintainability. Software engineers can better apply the most efficient methods of code smell detection by keeping up with the latest developments in this area. This study covers a survey utilizing ML algorithms from 2005 to 2024. Well-known ML algorithms and practical software metrics are included in this research. LOC, WMC, DIT, LCOM, CC, and NoC are the most used metrics for spotting code smells, and 27 articles applied Decision Tree techniques. In this study, the definition, causes, and effects of code smells are provided for the reader. Methods for the detection of code smells are also covered. This knowledge will empower software developers to create more stable and maintainable programs and allow them to identify and fix code smells before releasing them to the public. The following are future recommendations for software professionals and researchers working in code smell detection. These recommendations are not just suggestions but are crucial for the advancement of code smell detection.