Code Smells and Refactorings for Elixir
Abstract
Elixir is a modern functional language gaining traction in the industry, but the internal quality of the code written with this language still lacks research. To fill this gap, this thesis investigates code smells and refactorings specific to Elixir, drawing inspiration from classic Fowler catalogs. In the first two studies, a mixed-method approach was adopted to catalog 35 code smells (23 novel and 12 traditional), validated by 181 developers, and 82 refactorings (14 novel), validated by 151 developers. In the third study, we correlated code smells and refactorings, establishing practical guidelines for the disciplined removal of smells through refactorings. The results impact both the prevention of code smells and the prioritization of refactorings in Elixir, for instance.References
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.
Published
2025-07-20
How to Cite
VEGI, Lucas Francisco da Matta; VALENTE, Marco Tulio.
Code Smells and Refactorings for Elixir. In: THESIS AND DISSERTATION CONTEST (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.
