Operationalizing Software Antipatterns for Automated Detection Using Structural Metrics and Supervised Learning

  • Marcela Mosquera Universidad Politécnica Salesiana Cuenca / Escuela Politécnica Nacional

Resumo


This doctoral research aims to develop and validate a machine-learning approach for detecting software antipatterns during the construction phase. The study addresses three central challenges: ambiguous taxonomies and definitions of antipatterns, elevated false-positive rates in detection, and limited reproducibility of learning-based results without standardized protocols. The proposed pipeline consolidates taxonomy and formal definitions, operationalizes antipatterns as logical compositions of code smells and measurable structural properties, and derives observable indicators from structural metrics. Supervised learning with explicit hyperparameter optimization and a metric–label correlation layer are planned to support robustness, interpretability, and traceable evidence.

Referências

Agrahari, V., Shanbhag, S., Chimalakonda, S., and Rao, A. E. (2023). A catalogue of game-specific anti-patterns based on github and game development stack exchange. Journal of Systems and Software, 204:111789.

Bavota, G., Qusef, A., Oliveto, R., De Lucia, A., and Binkley, D. W. (2015). Are test smells really harmful? an empirical study. Empirical Software Engineering, 20(4):1052–1094.

Brown, W. J., Malveau, R. C., McCormick Hays, W. S., and Mowbray, T. J. (1998). AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis. Wiley.

Fawad, M., Rasool, G., and Palma, F. (2025). Android source code smells: A systematic literature review. Software: Practice and Experience, 55(5):847–882.

Fowler, M. (2018). Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional.

Hallal, H. H., Alikacem, E., Tunney, W. P., Boroday, S., and Petrenko, A. (2004). Antipattern-based detection of deficiencies in java multithreaded software. In Proceedings - Fourth International Conference on Quality Software (QSIC 2004), pages 258–267.

Hevner, A. and Chatterjee, S. (2010). Design Research in Information Systems. Springer US.

Ho, A., Bui, A. M. T., Nguyen, P. T., Di Salle, A., and Le, B. (2025). Ensesmells: Deep ensemble and programming language models for automated code smells detection. Journal of Systems and Software, 224:112375.

Hübener, T., Chaudron, M. R. V., Luo, Y., Vallen, P., van der Kogel, J., and Liefheid, T. (2022). Automatic anti-pattern detection in microservice architectures based on distributed tracing. In Proceedings (ACM), pages 75–76.

Kermansaravi, Z. A., Rahman, M. S., Khomh, F., Jaafar, F., and Guéhéneuc, Y. G. (2021). Investigating design anti-pattern and design pattern mutations and their change- and fault-proneness. Empirical Software Engineering, 26(1):1–47.

Khomh, F., Vaucher, S., Guéhéneuc, Y. G., and Sahraoui, H. (2009). A bayesian approach for the detection of code and design smells. In Proceedings - International Conference on Quality Software, pages 305–314.

Kovačević, A., Slivka, J., Vidaković, D., Grujić, K. G., Luburić, N., Prokić, S., and Sladić, G. (2022). Automatic detection of long method and god class code smells through neural source code embeddings. Expert Systems with Applications, 204:117607.

Kumar, L., Tummalapalli, S., Murthy, L. B., Misra, S., and Krishna, A. (2025). An empirical analysis on webservice antipattern prediction in different variants of machine learning perspective. Scientific Reports, 15(1):1–28.

Lin, T., Fu, X., Chen, F., and Li, L. (2021). A novel approach for code smells detection based on deep learning. In Proceedings (Springer), pages 171–174.

Linares-Vásquez, M., Klock, S., McMillan, C., Sabané, A., Poshyvanyk, D., and Guéhéneuc, Y. G. (2014). Domain matters: Bringing further evidence of the relationships among anti-patterns, application domains, and quality-related metrics in java mobile apps. In 22nd International Conference on Program Comprehension (ICPC 2014) - Proceedings, pages 232–243.

Liu, A., Lefever, J., Han, Y., and Cai, Y. (2024). Prevalence and severity of design anti-patterns in open source programs—a large-scale study. Information and Software Technology, 170:107429.

Ma’ayan, D., Maoz, S., and Ringert, J. O. (2023). Anti-patterns (smells) in temporal specifications. In Proceedings - International Conference on Software Engineering (ICSE-NIER), pages 13–18.

Maiga, A., Ali, N., Bhattacharya, N., Sabané, A., Guéhéneuc, Y. G., and Aimeur, E. (2012). Smurf: A svm-based incremental anti-pattern detection approach. In Working Conference on Reverse Engineering (WCRE) - Proceedings, pages 466–475.

Marinescu, R. (2004). Detection strategies: Metrics-based rules for detecting design flaws. In IEEE International Conference on Software Maintenance (ICSM), pages 350–359.

Mashiach, T., Sotto-Mayor, B., Kaminka, G., and Kalech, M. (2023). Clean++: Code smells extraction for c++. In 2023 IEEE/ACM 20th International Conference on Mining Software Repositories (MSR 2023) - Proceedings, pages 441–445.

Moha, N. and Guéhéneuc, Y. G. (2007). Decor: A tool for the detection of design defects. In ASE’07 - 2007 ACM/IEEE International Conference on Automated Software Engineering, pages 527–528.

Moha, N., Guéhéneuc, Y. G., Duchien, L., and Le Meur, A. F. (2010). Decor: A method for the specification and detection of code and design smells. IEEE Transactions on Software Engineering, 36(1):20–36.

Mosquera, M., Bojorque, R., and Flores, P. (2025). Understanding code smell detection through hyperparameter optimization and metric correlation analysis. IEEE Access, 13:217750–217768.

Prati, A., Vickovic, L., Braovi, M., Singh Yadav, P., Singh Rao, R., Mishra, A., and Gupta, M. (2024). Machine learning-based methods for code smell detection: A survey. Applied Sciences, 14(14):6149.

Rivera, R., Flores, P., Anchundia, C., Mosquera, M., Jiménez, A., and Carpio, X. (2025a). Unraveling software antipatterns and smells definitions. In Proceedings of the 28th Ibero-American Conference on Software Engineering, pages 388–389.

Rivera, R., Mosquera, M., Flores, P., Anchundia, C. E., Jiménez, A., and Carpio, X. (2025b). Smells vs. software antipatterns: Do definitions matter? In 2025 IEEE/ACIS 23rd International Conference on Software Engineering Research, Management and Applications (SERA), pages 169–174.

Sabir, F., Palma, F., Rasool, G., Guéhéneuc, Y. G., and Moha, N. (2019). A systematic literature review on the detection of smells and their evolution in object-oriented and service-oriented systems. Software: Practice and Experience, 49(1):3–39.

Saboury, A., Musavi, P., Khomh, F., and Antoniol, G. (2017). An empirical study of code smells in javascript projects. In SANER 2017 - Proceedings, pages 294–305.

Sarafim, D. S., Delgado, K. V., and Cordeiro, D. (2022). Random forest for code smell detection in javascript. In Encontro Nacional de Inteligência Artificial e Computacional (ENIAC), pages 13–24.

Sharma, T. and Spinellis, D. (2018). A survey on software smells. Journal of Systems and Software, 138:158–173.

Sobrinho, E. V. D. P., De Lucia, A., and Maia, M. D. A. (2021). A systematic literature review on bad smells-5 w’s: Which, when, what, who, where. IEEE Transactions on Software Engineering, 47(1):17–66.

Spadini, D., Palomba, F., Zaidman, A., Bruntink, M., and Bacchelli, A. (2018). On the relation of test smells to software code quality. In ICSME 2018 - Proceedings, pages 1–12.

Taibi, D., Lenarduzzi, V., and Pahl, C. (2020). Microservices anti-patterns: A taxonomy. In Microservices: Science and Engineering, pages 111–128. Springer.

Thakur, P. S., Chouhan, S. S., Rathore, S. S., and Parmar, J. (2026). Systematic literature review on software code smell detection approaches. Journal of Systems and Software, 235:112784.

Tighilt, R., Abdellatif, M., Trabelsi, I., Madern, L., Moha, N., and Guéhéneuc, Y. G. (2023). On the maintenance support for microservice-based systems through the specification and the detection of microservice antipatterns. Journal of Systems and Software, 204:111755.

Tsantalis, N., Chaikalis, T., and Chatzigeorgiou, A. (2008). Jdeodorant: Identification and removal of type-checking bad smells. In Proceedings of the European Conference on Software Maintenance and Reengineering (CSMR), pages 329–331.

Yu, P., Wu, Y., Peng, J., Zhang, J., and Xie, P. (2023). Towards understanding fixes of sonarqube static analysis violations: A large-scale empirical study. In 2023 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER 2023) - Proceedings, pages 569–580.

Zhang, F., Zhang, Z., Keung, J. W., Tang, X., Yang, Z., Yu, X., and Hu, W. (2024). Data preparation for deep learning based code smell detection: A systematic literature review. arXiv.
Publicado
11/05/2026
MOSQUERA, Marcela. Operationalizing Software Antipatterns for Automated Detection Using Structural Metrics and Supervised Learning. In: CONGRESSO IBERO-AMERICANO EM ENGENHARIA DE SOFTWARE (CIBSE), 29. , 2026, Recife/PE. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2026 . p. 357-364.