Code Smells and Refactorings for Elixir
Resumo
Elixir é uma linguagem funcional moderna em ascensão na indústria, mas a qualidade interna dos códigos criados com essa linguagem ainda carece de estudos. Para preencher essa lacuna, esta tese investiga code smells e refatorações específicos para Elixir, inspirando-se nos catálogos clássicos de Fowler. Nos dois primeiros estudos, uma abordagem metodológica mista foi adotada para catalogar 35 code smells (23 inéditos e 12 tradicionais), validados por 181 desenvolvedores, e 82 refatorações (14 inéditas), validadas por 151 desenvolvedores. No terceiro, correlacionamos smells e refatorações, estabelecendo diretrizes para a remoção disciplinada dos smells. Os resultados têm implicações na prevenção de smells e na priorização de refatorações em Elixir.Referências
Abid, C., Alizadeh, V., Kessentini, M., Ferreira, T. N., and Dig, D. (2020). 30 years of software refactoring research: a systematic literature review. ArXiv, abs/2007.02194:1–23.
Bordignon, M. D. and Silva, R. A. (2020). Mutation operators for concurrent programs in Elixir. In 21st IEEE Latin-American Test Symposium (LATS), pages 1–6.
Chen, Q., Câmara, R., Campos, J., Souto, A., and Ahmed, I. (2023). The smelly eight: An empirical study on the prevalence of code smells in Quantum Computing. In 45th IEEE/ACM International Conference on Software Engineering (ICSE), pages 1–13.
Ferreira, F. and Valente, M. T. (2023). Detecting code smells in React-based web apps. Information and Software Technology, 155:1–16.
Fontana, F. A., Ferme, V., Marino, A., Walter, B., and Martenka, P. (2013). Investigating the impact of code smells on system’s quality: an empirical study on systems of different application domains. In 29th IEEE International Conference on Software Maintenance (ICSM), pages 260–269.
Fowler, M. and Beck, K. (1999). Refactoring: improving the design of existing code. Addison-Wesley, 1 edition.
Habchi, S., Hecht, G., Rouvoy, R., and Moha, N. (2017). Code smells in iOS apps: how do they compare to Android? In 4th IEEE/ACM International Conference on Mobile Software Engineering and Systems (MOBILESoft), pages 110–121.
Jurić, S. (2024). Elixir in action. Manning, 3 edition.
Lehman, M. (1980). Programs, life cycles, and laws of software evolution. Proceedings of the IEEE, 68(9):1060–1076.
Li, H. and Thompson, S. (2006). Comparative study of refactoring Haskell and Erlang programs. In 6th IEEE International Workshop on Source Code Analysis and Manipulation (SCAM), pages 197–206.
Meyer, B. (1997). Object-oriented software construction. Prentice Hall, 2 edition.
Nardone, V., Muse, B. A., Abidi, M., Khomh, F., and Penta, M. D. (2023). Video game bad smells: What they are and how developers perceive them. ACM Trans. Softw. Eng. Methodol., 32(4):1–35.
Sobrinho, E., De Lucia, A., and Maia, M. (2021). A systematic literature review on bad smells–5 w’s: which, when, what, who, where. IEEE Trans. Softw. Eng., 47(1):17–66.
Taibi, D., Janes, A., and Lenarduzzi, V. (2017). How developers perceive smells in source code: a replicated study. Information and Software Technology, 92(1):223–235.
Thomas, D. (2018). Programming Elixir - 1.6: functional - concurrent - pragmatic - fun. Pragmatic Bookshelf, 1 edition.
Vegi, L. F. M. (2024). Code Smells and Refactorings for Elixir. Phd thesis, Universidade Feredal de Minas Gerais, Brazil.
Vegi, L. F. M. and Valente, M. T. (2022). Code smells in Elixir: early results from a grey literature review. In 30th International Conference on Program Comprehension (ICPC) - ERA track, pages 580–584.
Vegi, L. F. M. and Valente, M. T. (2023a). Towards a catalog of refactorings for Elixir. In 39th International Conference on Software Maintenance and Evolution (ICSME) - NIER track, pages 358–362.
Vegi, L. F. M. and Valente, M. T. (2023b). Understanding code smells in Elixir functional language. Empirical Software Engineering, 28(102):1–32.
Vegi, L. F. M. and Valente, M. T. (2025). Understanding refactorings in Elixir functional language. Empirical Software Engineering, 30(108):1–58.
Zhang, Z., Xing, Z., Zhao, D., Xu, X., Zhu, L., and Lu, Q. (2024). Automated refactoring of non-idiomatic Python code with pythonic idioms. IEEE Trans. on Softw. Eng., pages 1–22.
Bordignon, M. D. and Silva, R. A. (2020). Mutation operators for concurrent programs in Elixir. In 21st IEEE Latin-American Test Symposium (LATS), pages 1–6.
Chen, Q., Câmara, R., Campos, J., Souto, A., and Ahmed, I. (2023). The smelly eight: An empirical study on the prevalence of code smells in Quantum Computing. In 45th IEEE/ACM International Conference on Software Engineering (ICSE), pages 1–13.
Ferreira, F. and Valente, M. T. (2023). Detecting code smells in React-based web apps. Information and Software Technology, 155:1–16.
Fontana, F. A., Ferme, V., Marino, A., Walter, B., and Martenka, P. (2013). Investigating the impact of code smells on system’s quality: an empirical study on systems of different application domains. In 29th IEEE International Conference on Software Maintenance (ICSM), pages 260–269.
Fowler, M. and Beck, K. (1999). Refactoring: improving the design of existing code. Addison-Wesley, 1 edition.
Habchi, S., Hecht, G., Rouvoy, R., and Moha, N. (2017). Code smells in iOS apps: how do they compare to Android? In 4th IEEE/ACM International Conference on Mobile Software Engineering and Systems (MOBILESoft), pages 110–121.
Jurić, S. (2024). Elixir in action. Manning, 3 edition.
Lehman, M. (1980). Programs, life cycles, and laws of software evolution. Proceedings of the IEEE, 68(9):1060–1076.
Li, H. and Thompson, S. (2006). Comparative study of refactoring Haskell and Erlang programs. In 6th IEEE International Workshop on Source Code Analysis and Manipulation (SCAM), pages 197–206.
Meyer, B. (1997). Object-oriented software construction. Prentice Hall, 2 edition.
Nardone, V., Muse, B. A., Abidi, M., Khomh, F., and Penta, M. D. (2023). Video game bad smells: What they are and how developers perceive them. ACM Trans. Softw. Eng. Methodol., 32(4):1–35.
Sobrinho, E., De Lucia, A., and Maia, M. (2021). A systematic literature review on bad smells–5 w’s: which, when, what, who, where. IEEE Trans. Softw. Eng., 47(1):17–66.
Taibi, D., Janes, A., and Lenarduzzi, V. (2017). How developers perceive smells in source code: a replicated study. Information and Software Technology, 92(1):223–235.
Thomas, D. (2018). Programming Elixir - 1.6: functional - concurrent - pragmatic - fun. Pragmatic Bookshelf, 1 edition.
Vegi, L. F. M. (2024). Code Smells and Refactorings for Elixir. Phd thesis, Universidade Feredal de Minas Gerais, Brazil.
Vegi, L. F. M. and Valente, M. T. (2022). Code smells in Elixir: early results from a grey literature review. In 30th International Conference on Program Comprehension (ICPC) - ERA track, pages 580–584.
Vegi, L. F. M. and Valente, M. T. (2023a). Towards a catalog of refactorings for Elixir. In 39th International Conference on Software Maintenance and Evolution (ICSME) - NIER track, pages 358–362.
Vegi, L. F. M. and Valente, M. T. (2023b). Understanding code smells in Elixir functional language. Empirical Software Engineering, 28(102):1–32.
Vegi, L. F. M. and Valente, M. T. (2025). Understanding refactorings in Elixir functional language. Empirical Software Engineering, 30(108):1–58.
Zhang, Z., Xing, Z., Zhao, D., Xu, X., Zhu, L., and Lu, Q. (2024). Automated refactoring of non-idiomatic Python code with pythonic idioms. IEEE Trans. on Softw. Eng., pages 1–22.
Publicado
20/07/2025
Como Citar
VEGI, Lucas Francisco da Matta; VALENTE, Marco Tulio.
Code Smells and Refactorings for Elixir. In: CONCURSO DE TESES E DISSERTAÇÕES (CTD), 38. , 2025, Maceió/AL.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2025
.
p. 94-103.
ISSN 2763-8820.
DOI: https://doi.org/10.5753/ctd.2025.9280.
