# Machine Learning-Based Methods for Code Smell Detection: A Survey
## 4 Findings and Discussion
### Rationalize the Research Questions  
#### 4.2.1 RQ1: Which ML Algorithms Are Used to Detect Code Smells? The different ML algorithms used are shown below. 1. Decision Trees;
2. Ensemble Learners;
3. Bayesian Learners;
4. Rule-Based Learning;
5. Support Vector Machines;
6. Neural networks. Figure 4 illustrates different ML algorithms used to detect code smells. The ML algorithms are divided into subcategories. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Name of Publication** & **Type** & **ISSN Number** & **Impact Factor** & **No of Studies** \\ \hline International Conference on Enterprise & & & & \\ Information Systems (ICES 2017) & Conference & NA & NA & 1 \\ \hline International Conference on Computer Science & & & & \\ and Information Technology (CSIT) & Conference & NA & NA & 1 \\ \hline International Conference on Advanced & & & & \\ Information Networking and Applications & Conference & NA & NA & 1 \\ \hline IEEE Transactions on Software Engineering & Conference & NA & NA & 1 \\ \hline IEEE International Conference on Software & & & & \\ Maintenance & & & & \\ \hline IEEE & Conference & NA & NA & 6 \\ \hline Conference on Software Maintenance and & & & & \\ Reengineering & & & & \\ \hline Conference on Reverse Engineering & & & NA & 1 \\ \hline ASE’16, 3–7 September 2016, Singapore, & & & & \\ Singapore & & & & \\ Singapore & & & & \\ \hline ASE’12, 3–7 September 2012, Essen, Germany & & & & \\ \hline
2019 IEEE/ACM 27 th International Conference & & & & \\ on Program Comprehension (ICPC) & & & & \\ \hline IEEE 24 th International Conference on Program & & & & \\ Comprehension (ICPC) & & & & \\ \hline International Conference on the Quality of & & & & \\ Information and Communications Technology & & & & \\ \hline IEEE ASE 2013, Palo Alto, USA & & & & \\ \hline Conference on Reverse Engineering & & & & \\ \hline Grand Total & & & & \\ \hline \hline \end{tabular} Note: NA means ’Not Available’.  
\end{table} 
Table 4: _Cont._Table 5 shows the different categories of ML algorithms, the number of studies, and their percentage out of 42 (total number of selected articles for this SLR). For example, ensemble learning is used in 21 research articles out of the selected research articles, and their percentage out of 42 is 50%. It also indicates that Decision Tree, SVM, and ensemble learning techniques are often used in code smell detection. Some methods are more often used, so the total percentage is more than 100 in the table, and the number of studies in the table is more than the total number of research articles considered for this study. [PERSON] et al. [7] applied J48, Random Forest, Naive Bayes, LIBSVM, JRip, ADABOOST, and Sequential Minimal Optimization over 74 software systems. [PERSON] et al. [10] used Naive Bayes, J48, Random Forest, JRip, and SVM over JAVA projects and found optimal results. Figures 5 and 6 illustrate the ML algorithms used in code smell detection. Figure 5 indicates the different methods applied in research studies: Decision Tree, Ensemble Learners, Bayesian Learners, Rule-Based Learning, Support Vector Machines, neural networks, and miscellaneous. The number of studies on Decision Trees, ensemble learning, Bayesian learning, Rule-Based Learning, SVM, neural networks, and miscellaneous based on code smell detection methods are shown in Figure 5a-g. Figure 6 shows the ML algorithms used in code smell detection. The research studies that make use of subclass techniques of the Decision Tree, ensemble learning, Bayesian learning, SVM, and neural network approaches are J48 (29%), Random Forest (71%), Naive Bayes (72%), SVM (54%), and Multilayer Perceptron (72%). These findings indicate the  
Figure 4: Different ML algorithms used for detecting code smells.