# Machine Learning-Based Methods for Code Smell Detection: A Survey
## 4 Findings and Discussion
### Insightful Discussion  
This section discusses various SLR study findings, which will help software developers to find key points to improve software quality. New researchers can enhance their knowledge for their upcoming research studies. The insights gained from this research include the most effective metrics and dataset languages, the most commonly used datasets, \begin{table}
\begin{tabular}{c c c} \hline
**Performance Measures** & **Description** & **Research Articles** \\ \hline \multirow{4}{*}{Accuracy} & \multirow{4}{*}{Out of all projections, how many have been accurate overall?} & ARTN1, ARTN2, ARTN6, ARTN7, ARTN9, ARTN15, ARTN18, ARTN20, ARTN22, ARTN24, ARTN27, ARTN29, ARTN32, ARTN33, ARTN34, ARTN35, ARTN36, ARTN37, ARTN38, ARTN40, ARTN41, ARTN42 \\ \hline \multirow{4}{*}{Precision} & \multirow{4}{*}{It provides data on how well the classifier performs in terms of false positives.} & ARTN12, ARTN3, ARTN4, ARTN5, ARTN8, ARTN10, ARTN11, ARTN12, ARTN13, ARTN14, ARTN16, ARTN17, ARTN18, ARTN19, ARTN22, ARTN28, ARTN30, ARTN39, ARTN41, ARTN42 \\ \hline \multirow{4}{*}{Recall} & \multirow{4}{*}{It provides data on how well the classifier performs in avoiding false negatives.} & ARTN2, ARTN3, ARTN4, ARTN4, ARTN18, ARTN10, ARTN11, ARTN12, ARTN13, ARTN14, ARTN16, ARTN17, ARTN18, ARTN19, ARTN21, ARTN25, ARTN28, ARTN30, ARTN39, ARTN41, ARTN42 \\ \hline \multirow{4}{*}{F-measure} & \multirow{4}{*}{A single score that combines recall and precision.} & ARTN13, ARTN14, ARTN15, ARTN16, ARTN17, ARTN19, ARTN29, ARTN30, ARTN32, ARTN33, ARTN34, ARTN35, ARTN36, ARTN37, ARTN38, ARTN40, ARTN41, ARTN42 \\ \hline \multirow{4}{*}{AUC ROC} & \multirow{4}{*}{The curve between specificity and recall. It calculates the effectiveness.} & ARTN15, ARTN29, ARTN32, ARTN35, ARTN37, ARTN42 \\ \hline \multirow{4}{*}{G-mean (G-mean 1, G-mean 2)} & \multirow{4}{*}{It combines a true positive rate and a true negative rate.} & ARTN38 \\ \hline \multirow{4}{*}{MSE} & \multirow{4}{*}{An average of the square of the differences between the predicted and actual value.} & ARTN26 \\ \cline{1-1} \cline{3-3}  & & \\ \cline{1-1} \cline{3-3}  & & \\ \cline{1-1} \cline{3-3}  & & \\ \cline{1-1} \cline{3-3}  & & \\ \hline RMSE & It is the MSE value’s square root. & ARTN23 \\ \hline \multirow{4}{*}{Miscellaneous} & \multirow{4}{*}{It includes Hamming Score, Exact Match Ratio, time complexity, standard deviations, effectiveness, and utility.} & ARTN7, ARTN8, ARTN10, ARTN23, ARTN24, ARTN26, ARTN30, ARTN31, ARTN35, ARTN37 \\ \cline{1-1} \cline{3-3}  & & \\ \cline{1-1} \cline{3-3}  & & \\ \hline \end{tabular}
\end{table} 
Table 6: Analyzing performance indicators across studies. and the performance measurements of different ML algorithms, all of which can guide future research and software development practices. **RQ-1** categorizes ML algorithms into Decision Tree, ensemble learning, Bayesian learning, Rule-Based Learning, SVM, neural network, and miscellaneous. Decision Trees, SVM, ensemble learning, and their subclasses Random Forest, J48, SVM, Naive Bayes, and Multilayer Perceptron are frequently used to identify code smells. This study found that 27 of 42 research articles used Decision Tree algorithms to identify code smells, as shown in Table 5. Most research studies employ this method because of its excellent performance and widespread availability of relevant software. This study reveals a need for Rule-Based Learning applications to deal with software smells, as only 3 of 42 research articles used this algorithm. More research studies are needed in this area, and future studies may need to use and explore the capability of this algorithm to detect code smells. **RQ-2** discovered that the various researchers employed over 30 code smells more than 140 times in their investigation. Data Class, Feature Envy, God Class, and Long Method are the most frequently used code smells and are given more consideration in recent research, as shown in Figure 7. These code smells may be chosen for the following reasons:  
* Many different design concerns are covered.