Detection of code smells using artificial intelligence a systematic mapping study
Introduction: This article is the product of research on code smells developed by the Software Engineering for Education Research Group at the Autonomous University of Yucatán in 2025. This study, like others cited in the literature, has relied on artificial intelligence to expand research in Software Engineering.
Problem: Although previous studies have analyzed code smell detection using Machine Learning and Deep Learning independently, this research integrates both approaches to provide a more detailed analysis.
Objective: The objective of this study is to present the approach taken toward artificial intelligence and code smells.
Method: A systematic mapping study was employed as the research method. Based on a search string executed in five databases—ACM, Taylor & Francis, IEEE, Wiley, and SpringerLink—108 documents were retrieved, of which 35 were selected according to the established inclusion and exclusion criteria.
Results: Since 2018, a growing trend in this topic has been observed. Machine Learning is the predominant approach, mainly using the Random Forest algorithm, while CNN stands out in Deep Learning.
Conclusion: Despite their growing relevance, there are significant areas that require further attention and research.
Originality: This research integrates Machine Learning and Deep Learning approaches within the same study for code smell detection, allowing for a broader view and a more detailed comparison.
Limitations: The limitation of this study lies in the fact that the review was based only on five databases and on the inclusion and exclusion criteria.
How to Cite
License
Copyright (c) 2026 Ingeniería Solidaria

This work is licensed under a Creative Commons Attribution 4.0 International License.
Cession of rights and ethical commitment
As the author of the article, I declare that is an original unpublished work exclusively created by me, that it has not been submitted for simultaneous evaluation by another publication and that there is no impediment of any kind for concession of the rights provided for in this contract.
In this sense, I am committed to await the result of the evaluation by the journal Ingeniería Solidaría before considering its submission to another medium; in case the response by that publication is positive, additionally, I am committed to respond for any action involving claims, plagiarism or any other kind of claim that could be made by third parties.
At the same time, as the author or co-author, I declare that I am completely in agreement with the conditions presented in this work and that I cede all patrimonial rights, in other words, regarding reproduction, public communication, distribution, dissemination, transformation, making it available and all forms of exploitation of the work using any medium or procedure, during the term of the legal protection of the work and in every country in the world, to the Universidad Cooperativa de Colombia Press.
[1] M. Jerzyk and L. Madeyski, “Code smells: A comprehensive online catalog and taxonomy,” in Studies in Systems, Decision and Control. Cham, Switzerland: Springer Nature Switzerland, 2023, pp. 543–576, doi: https://doi.org/10.1007/978-3-031-25695-0_24. DOI: https://doi.org/10.1007/978-3-031-25695-0_24
[2] B. T. Nguyen, N. H. M. Nguyen, T. M. H. Le, and B. T. Nguyen, “ml-Codesmell: A code smell prediction dataset for machine learning approaches,” in Proc. 11th Int. Symp. Information and Communication Technology (SoICT), Hanoi, Vietnam. New York, NY, USA: ACM, 2022, pp. 368–374, doi: https://doi.org/10.1145/3568562.3568643. DOI: https://doi.org/10.1145/3568562.3568643
[3] F. Palomba, G. Bavota, M. Di Penta, F. Fasano, R. Oliveto, and A. De Lucia, “A large-scale empirical study on the lifecycle of code smell co-occurrences,” Information and Software Technology, vol. 99, pp. 1–10, Jul. 2018, doi: https://doi.org/10.1016/j.infsof.2018.02.004. DOI: https://doi.org/10.1016/j.infsof.2018.02.004
[4] S. J. Russell and P. Norvig, Artificial Intelligence: A Modern Approach, 3rd ed. Harlow, U.K.: Pearson Education, 2010.
[5] J. Haugeland, Artificial Intelligence: The Very Idea. Cambridge, MA, USA: MIT Press, 1989, doi: https://doi.org/10.7551/mitpress/1170.001.0001. DOI: https://doi.org/10.7551/mitpress/1170.001.0001
[6] B. Kitchenham and S. Charters, “Guidelines for performing systematic literature reviews in software engineering,” Keele University, Keele, U.K., Tech. Rep. EBSE-2007-01, 2007. [Online]. Available: (SD)
[7] D. Budgen, M. Turner, P. Brereton, and B. Kitchenham, “Using mapping studies in software engineering,” in Proc. 20th Psychology of Programming Interest Group (PPIG) Conf., Lancaster, U.K., 2008, pp. 195–204.
[8] A. A. Aguileta and O. S. Gómez, “Software engineering research in Mexico: A systematic mapping study,” International Journal of Software Engineering and Its Applications, vol. 10, no. 12, pp. 75–92, Dec. 2016, doi: https://doi.org/10.14257/ijseia.2016.10.12.07. DOI: https://doi.org/10.14257/ijseia.2016.10.12.07
[9] M. I. Azeem, F. Palomba, L. Shi, and Q. Wang, “Machine learning techniques for code smell detection: A systematic literature review and meta-analysis,” Information and Software Technology, vol. 108, pp. 115–138, Apr. 2019, doi: https://doi.org/10.1016/j.infsof.2018.12.009. DOI: https://doi.org/10.1016/j.infsof.2018.12.009
[10] F. Arcelli Fontana, M. V. Mäntylä, M. Zanoni, and A. Marino, “Comparing and experimenting machine learning techniques for code smell detection,” Empirical Software Engineering, vol. 21, no. 3, pp. 1143–1191, 2016, doi: https://doi.org/10.1007/s10664-015-9378-4.
[11] F. L. Caram, B. R. D. O. Rodrigues, A. S. Campanelli, and F. S. Parreiras, “Machine learning techniques for code smells detection: A systematic mapping study,” International Journal of Software Engineering and Knowledge Engineering, vol. 29, no. 2, pp. 285–316, 2019, doi: https://doi.org/10.1142/S021819401950013X. DOI: https://doi.org/10.1142/S021819401950013X
[12] M. A. Zaidi and R. Colomo-Palacios, “Code smells enabled by artificial intelligence: A systematic mapping,” in Computational Science and Its Applications–ICCSA 2019. Cham, Switzerland: Springer, 2019, pp. 418–427, doi: https://doi.org/10.1007/978-3-030-24305-0_31. DOI: https://doi.org/10.1007/978-3-030-24305-0_31
[13] D. F. Escobar Cerón and A. D. Quevedo Cortés, “Inteligencia artificial como alternativa en la detección de noticias falsas,” Tecnología, Investigación y Academia (TIA), vol. 10, no. 1, pp. 20–37, Aug. 2022. (SD)
[14] I. N. Salamanca Rativa, “Técnicas de aprendizaje automático aplicadas en los sistemas de predicción,” Tecnología, Investigación y Academia (TIA), vol. 8, no. 1, pp. 37–53, Jul. 2021. (SD)
[15] A. González-Muñiz, “Applications of artificial intelligence techniques based on deep learning to the analysis and improvement of industrial process efficiency,” Ph.D. dissertation, Universidad de Oviedo, Oviedo, Spain, 2018, doi: https://doi.org/10.13140/RG.2.2.15144.72967.
[16] F. Zhang et al., “Data preparation for deep learning-based code smell detection: A systematic literature review,” Journal of Systems and Software, vol. 216, Art. no. 112131, 2024, doi: https://doi.org/10.1016/j.jss.2024.112131. DOI: https://doi.org/10.1016/j.jss.2024.112131
[17] M. Hadj-Kacem and N. Bouassida, “Multi-label learning for identifying co-occurring class code smells,” Computing, vol. 106, pp. 2585–2612, 2024, doi: https://doi.org/10.1007/s00607-024-01294-x. DOI: https://doi.org/10.1007/s00607-024-01294-x
[18] A. Alazba, H. Aljamaan, and M. Alshayeb, “CoRT: Transformer-based code representations with self-supervision by predicting reserved words for code smell detection,” Empirical Software Engineering, vol. 29, no. 3, Art. no. 57, 2024, doi: https://doi.org/10.1007/s10664-024-10445-9. DOI: https://doi.org/10.1007/s10664-024-10445-9
[19] H. A. Arnejo Calviño, “Métodos para la mejora de predicciones en clases desbalanceadas en el estudio de bajas de clientes (churn),” M.S. thesis, Máster en Técnicas Estadísticas, Universidad de Santiago de Compostela, Santiago de Compostela, Spain, 2017.
[20] F. Arcelli Fontana, M. V. Mäntylä, M. Zanoni, and A. Marino, “Comparing and experimenting machine learning techniques for code smell detection,” Empirical Software Engineering, vol. 21, no. 3, pp. 1143–1191, 2016, doi: https://doi.org/10.1007/s10664-015-9378-4. DOI: https://doi.org/10.1007/s10664-015-9378-4
[21] K. Karaduzovic-Hadziabdic and R. Spahic, “Comparison of machine learning methods for code smell detection using reduced features,” in Proc. 3rd International Conference on Computer Science and Engineering (UBMK), Sarajevo, Bosnia and Herzegovina, Sep. 20–23, 2018, pp. 670–672, doi: https://doi.org/10.1109/UBMK.2018.8566561. DOI: https://doi.org/10.1109/UBMK.2018.8566561
[22] F. Pecorelli, D. Di Nucci, C. De Roover, and A. De Lucia, “On the role of data balancing for machine learning-based code smell detection,” in Proc. 3rd ACM SIGSOFT International Workshop on Machine Learning Techniques for Software Quality Evaluation, Tallinn, Estonia, Aug. 27, 2019, pp. 19–24, doi: https://doi.org/10.1145/3340482.3342744. DOI: https://doi.org/10.1145/3340482.3342744
[23] F. C. Luiz, B. R. de Oliveira Rodrigues, and F. S. Parreiras, “Machine learning techniques for code smells detection,” in Proc. XV Brazilian Symposium on Information Systems (SBSI), Aracaju, Brazil, 2019, pp. 1–8, doi: https://doi.org/10.1145/3330204.3330275. DOI: https://doi.org/10.1145/3330204.3330275
[24] E. O. Kiyak, D. Birant, and K. U. Birant, “Comparison of multi-label classification algorithms for code smell detection,” in Proc. 3rd International Symposium on Multidisciplinary Studies and Innovative Technologies (ISMSIT), Ankara, Türkiye, Oct. 11–13, 2019, pp. 1–6, doi: https://doi.org/10.1109/ISMSIT.2019.8932855. DOI: https://doi.org/10.1109/ISMSIT.2019.8932855
[25] M. Hadj-Kacem and N. Bouassida, “Deep representation learning for code smells detection using variational auto-encoder,” in Proc. International Joint Conference on Neural Networks (IJCNN), Budapest, Hungary, Jul. 14–19, 2019, pp. 1–8, doi: https://doi.org/10.1109/IJCNN.2019.8851854. DOI: https://doi.org/10.1109/IJCNN.2019.8851854
[26] F. Pecorelli, F. Palomba, F. Khomh, and A. De Lucia, “Developer-driven code smell prioritization,” in Proc. 17th International Conference on Mining Software Repositories (MSR), Seoul, Republic of Korea, 2020, pp. 220–231, doi: https://doi.org/10.1145/3379597.3387457. DOI: https://doi.org/10.1145/3379597.3387457
[27] S. Lujan, F. Pecorelli, F. Palomba, A. De Lucia, and V. Lenarduzzi, “A preliminary study on the adequacy of static analysis warnings with respect to code smell prediction,” in Proc. 28th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE), Virtual Event, USA, 2020, pp. 1–6, doi: https://doi.org/10.1145/3416505.3423559. DOI: https://doi.org/10.1145/3416505.3423559
[28] D. Cruz, A. Santana, and E. Figueiredo, “Detecting bad smells with machine learning algorithms,” in Proc. International Conference on Technical Debt (TechDebt), Seoul, Republic of Korea, 2020, pp. 31–40, doi: https://doi.org/10.1145/3387906.3388618. DOI: https://doi.org/10.1145/3387906.3388618
[29] R. Lima et al., “Understanding and detecting harmful code,” in Proc. 34th Brazilian Symposium on Software Engineering (SBES), Natal, Brazil, 2020, pp. 223–232, doi: https://doi.org/10.1145/3422392.3422420. DOI: https://doi.org/10.1145/3422392.3422420
[30] S. Jain and A. Saha, “Rank-based univariate feature selection methods on machine learning classifiers for code smell detection,” Evolutionary Intelligence, vol. 15, no. 1, pp. 609–638, 2022, doi: https://doi.org/10.1007/s12065-020-00536-z. DOI: https://doi.org/10.1007/s12065-020-00536-z
[31] M. Y. Mhawish and M. Gupta, “Predicting code smells and analysis of predictions: Using machine learning techniques and software metrics,” Journal of Computer Science and Technology, vol. 35, no. 6, pp. 1428–1445, Nov. 2020, doi: https://doi.org/10.1007/s11390-020-0323-7. DOI: https://doi.org/10.1007/s11390-020-0323-7
[32] T. Guggulothu and S. A. Moiz, “Code smell detection using multi-label classification approach,” Software Quality Journal, vol. 28, no. 3, pp. 1063–1086, 2020, doi: https://doi.org/10.1007/s11219-020-09498-y. DOI: https://doi.org/10.1007/s11219-020-09498-y
[33] A. Patnaik and N. Padhy, “Does code complexity affect the quality of real-time projects?,” in Proc. International Conference on Data Science, Machine Learning and Artificial Intelligence (DSMLAI), Windhoek, Namibia, 2021, pp. 178–185, doi: https://doi.org/10.1145/3484824.3484911. DOI: https://doi.org/10.1145/3484824.3484911
[34] H. Aljamaan, “Voting heterogeneous ensemble for code smell detection,” in Proc. 20th IEEE International Conference on Machine Learning and Applications (ICMLA), Pasadena, CA, USA, Dec. 13–16, 2021, pp. 897–902, doi: https://doi.org/10.1109/ICMLA52953.2021.00148. DOI: https://doi.org/10.1109/ICMLA52953.2021.00148
[35] Y. Zhang and C. Dong, “MARS: Detecting brain class/method code smell based on metric–attention mechanism and residual network,” Journal of Software: Evolution and Process, vol. 34, no. 5, Art. no. e2403, 2022, doi: https://doi.org/10.1002/smr.2403. DOI: https://doi.org/10.1002/smr.2403
[36] A. Gupta and N. K. Chauhan, “A severity-based classification assessment of code smells in Kotlin and Java applications,” Arabian Journal for Science and Engineering, vol. 47, no. 2, pp. 1831–1848, 2022, doi: https://doi.org/10.1007/s13369-021-06077-6. DOI: https://doi.org/10.1007/s13369-021-06077-6
[37] N. Vatanapakorn, C. Soomlek, and P. Seresangtakul, “Python code smell detection using machine learning,” in Proc. 26th International Computer Science and Engineering Conference (ICSEC), Sakon Nakhon, Thailand, Dec. 21–23, 2022, pp. 128–133, doi: https://doi.org/10.1109/ICSEC56337.2022.10049330. DOI: https://doi.org/10.1109/ICSEC56337.2022.10049330
[38] A. Abdou and N. Darwish, “Severity classification of software code smells using machine learning techniques: A comparative study,” Journal of Software: Evolution and Process, vol. 35, no. 2, Art. no. e2454, 2023, doi: https://doi.org/10.1002/smr.2454. DOI: https://doi.org/10.1002/smr.2454
[39] J. Nanda and J. K. Chhabra, “SSHM: SMOTE-stacked hybrid model for improving severity classification of code smell,” International Journal of Information Technology, vol. 14, no. 5, pp. 2701–2707, 2022, doi: https://doi.org/10.1007/s41870-022-00943-8. DOI: https://doi.org/10.1007/s41870-022-00943-8
[40] F. Pecorelli, S. Lujan, V. Lenarduzzi, F. Palomba, and A. De Lucia, “On the adequacy of static analysis warnings with respect to code smell prediction,” Empirical Software Engineering, vol. 27, no. 3, Art. no. 61, 2022, doi: https://doi.org/10.1007/s10664-022-10126-5. DOI: https://doi.org/10.1007/s10664-022-10126-5
[41] S. Singh, M. Jalal, and S. Kaur, “Bug classification depend upon refactoring area of code,” Journal of The Institution of Engineers (India): Series B, vol. 104, no. 1, pp. 61–77, 2023, doi: https://doi.org/10.1007/s40031-022-00836-1. DOI: https://doi.org/10.1007/s40031-022-00836-1
[42] J. P. dos Reis, F. Brito e Abreu, and G. de F. Carneiro, “Crowdsmelling: A preliminary study on using collective knowledge in code smells detection,” Empirical Software Engineering, vol. 27, no. 3, Art. no. 58, 2022, doi: https://doi.org/10.1007/s10664-021-10110-5. DOI: https://doi.org/10.1007/s10664-021-10110-5
[43] P. Sukkasem and C. Soomlek, “Enhanced machine learning-based code smell detection through hyper-parameter optimization,” in Proc. 20th International Joint Conference on Computer Science and Software Engineering (JCSSE), Phitsanulok, Thailand, Jun. 28–Jul. 1, 2023, pp. 297–302, doi: https://doi.org/10.1109/JCSSE58229.2023.10202124. DOI: https://doi.org/10.1109/JCSSE58229.2023.10202124
[44] F. Li, K. Zou, J. W. Keung, X. Yu, S. Feng, and Y. Xiao, “On the relative value of imbalanced learning for code smell detection,” Software: Practice and Experience, vol. 53, no. 10, pp. 1902–1927, 2023, doi: https://doi.org/10.1002/spe.3235. DOI: https://doi.org/10.1002/spe.3235
[45] R. S. Rao, S. Dewangan, A. Mishra, and M. Gupta, “A study of dealing class imbalance problem with machine learning methods for code smell severity detection using PCA-based feature selection technique,” Scientific Reports, vol. 13, no. 1, Art. no. 16277, 2023, doi: https://doi.org/10.1038/s41598-023-43380-8.v DOI: https://doi.org/10.1038/s41598-023-43380-8
[46] S. Dewangan, R. S. Rao, S. R. Chowdhuri, and M. Gupta, “Severity classification of code smells using machine-learning methods,” SN Computer Science, vol. 4, no. 5, Art. no. 537, 2023, doi: https://doi.org/10.1007/s42979-023-01979-8. DOI: https://doi.org/10.1007/s42979-023-01979-8
[47] A. Kovačević et al., “Automatic detection of code smells using metrics and CodeT5 embeddings: A case study in C#,” Neural Computing and Applications, vol. 36, no. 16, pp. 9203–9220, 2024, doi: https://doi.org/10.1007/s00521-024-09551-y. DOI: https://doi.org/10.1007/s00521-024-09551-y
[48] H. G. Nunes, A. Santana, E. Figueiredo, and H. Costa, “Tuning code smell prediction models: A replication study,” in Proc. IEEE/ACM 32nd International Conference on Program Comprehension (ICPC), Lisbon, Portugal, 2024, pp. 316–327, doi: https://doi.org/10.1145/3643916.3644436. DOI: https://doi.org/10.1145/3643916.3644436
[49] P. S. Yadav, R. S. Rao, and A. Mishra, “An evaluation of multi-label classification approaches for method-level code smells detection,” IEEE Access, vol. 12, pp. 53664–53676, 2024, doi: https://doi.org/10.1109/ACCESS.2024.3387856. DOI: https://doi.org/10.1109/ACCESS.2024.3387856
[50] A. Nandini, R. Singh, and A. Rathee, “Improving code smell detection by reducing dimensionality using ensemble feature selection and machine learning,” SN Computer Science, vol. 5, no. 6, Art. no. 702, 2024, doi: https://doi.org/10.1007/s42979-024-03013-x. DOI: https://doi.org/10.1007/s42979-024-03013-x
[51] D. Wu et al., “iSMELL: Assembling LLMs with expert toolsets for code smell detection and refactoring,” in Proc. IEEE/ACM 39th International Conference on Automated Software Engineering (ASE), Sacramento, CA, USA, 2024, pp. 1345–1357, doi: https://doi.org/10.1145/3691620.3695508. DOI: https://doi.org/10.1145/3691620.3695508
[52] L. Arenales, V. Villarreal, and J. J. Saldaña-Barrios, “Predictive model based on artificial intelligence and contextual awareness to identify students at risk of dropping out of university in Panama,” Revista Ingeniería Solidaria, vol. 21, no. 1, pp. 1–23, 2025, doi: https://doi.org/10.16925/2357-6014.2025.01.08. DOI: https://doi.org/10.16925/2357-6014.2025.01.08




