# Machine Learning-Based Methods for Code Smell Detection: A Survey
## 3 Procedures of Code Smell Detection Approaches
### Search Strategy  
A robust search strategy is essential for a comprehensive SLR. The search strategy functions as a detailed map, facilitating the identification and selection of relevant study articles. Our search is not only thorough but also comprehensive and accurate, using PICO (Population, Intervention, Comparison, and Outcome). PICO serves as a comprehensive framework for creating research queries. We also employed Boolean expressions 'AND' and 'OR' to expand the scope of our search. These expressions allow for the inclusion of multiple search terms and variations, increasing the likelihood of finding relevant articles. For example, a research query might include questions such as the following:  
What are the prevalent code smells [Outcomes/Result] detectable [Population/Space] utilizing ML algorithms? [Intervention]  
The alternate string/words of the search question are as follows. * The following possible words are included in search questions to find articles belonging to 'code smell'. Code Smells--('code smell' OR 'code smells' OR 'code bad smells' OR 'bad smells' OR 'bad code smells' OR 'anomalies' OR 'antipatterns' OR 'antipattern' OR 'design defect' OR 'design fault' OR 'design-smells' OR 'design flaw'). * The following possible words are included in search questions to find articles belonging to'machine learning'. Machine Learning--('machine learning' OR'supervised learning' OR 'classification' OR 'Machine Learning-based' OR'regression' OR 'unsupervised learning'). * The following possible words are included in search questions to find articles belonging to 'prediction'. Prediction--('prediction' OR 'detection' OR 'identification' OR 'prediction model' OR 'detection model' OR'model'). * All search strings are combined using Boolean operators to make the final search string:  
(('code smell' OR 'code smells' OR 'code bad smells' OR 'bad smells' OR 'anomalies' OR 'antipatterns' OR 'antipattern' OR 'design defect' OR 'design fault' OR 'design-smells' OR 'design flaw') AND/OR ('machine learning' OR'supervised learning' OR 'classification' OR 'Machine Learning-based' OR'regression' OR 'unsupervised learning') AND/OR ('prediction' OR 'detection' OR 'identification' OR 'prediction model' OR 'detection model' OR'model'))  
The final search string is searched in the following list of resources to select the research article for the literature review:  
1. Springer* ACM Digital Library
* IEEE Xplore
* Wiley Online Library
* Google Scholar
* Scopus
* Science Direct
* Web of Science  
The inclusion and exclusion of relevant articles are based on several selection and elimination rules. These are the following:  
**Selection rules:**  
* Experimental results are based on ML algorithms. * Results of studies based on non-ML algorithms. * Experimental results are based on comparing statistical techniques and are ML-based. **Elimination rules:**  
* Research articles on the ML algorithms without investigational study. * Research articles on ML algorithms other than code smell detection. * The research article results of the same author in a conference or journal are similar. The research article is placed if any of the conditions in the research article selection rule are met. If any conditions in the research article elimination rule are not met, the research article is not included. The complete selection or elimination rules required are shown in Table 3. This table has three possible values, 'No', 'Partly', and 'Yes', to examine the research papers and assign the score. This is further discussed in Section 3.3. Figure 2 shows the procedure for selecting the research articles from the listed resources. Initially, 311 articles are selected (2005 to 2024) through listed resources with the help of search strategies. In the next step, 265 articles are excluded by considering the articles' titles, abstracts, and conclusions. The remaining 46 articles (2005 to 2022) are focused on for full-text evaluation.