Skip to main content

Understanding code smells in Elixir functional language


Elixir is a functional programming language created in 2012, whose popularity is growing in the industry. Despite this fact, and to the best of our knowledge, there are few works in the literature focused on studying the internal quality of systems implemented with this language. In a preliminary and previous study, we conducted a grey literature review to provide an initial list of Elixir-specific code smells. Aiming to expand the results of this preliminary study, in this work we use a mixed methodology, based on the interaction with the Elixir developer community and on the mining of issues, commits, pull requests, and the source code in GitHub repositories to prospect and document new code smells for this language. As a result, we propose a catalog composed of 35 code smells, 23 of them are new and specific to Elixir, and 12 of them are traditional code smells, as cataloged by Fowler and Beck, which also affect Elixir systems. We validated this catalog by conducting a survey with 181 experienced Elixir developers from 37 countries and all continents. In this survey, we assessed the levels of relevance and prevalence of each smell in the catalog. We show that most smells in Elixir have relevance levels capable of impacting the readability, maintainability, and evolution of Elixir systems. Furthermore, most of the smells are not uncommon in production code. Our results have practical implications related to the prevention and removal of code smells in Elixir.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4


  1. Elixir and mixture are synonymous terms in pharmacology.







  8. Companies using Elixir in production code:







  15. Readers can also quickly check all these questions at:

  16. #MyElixirStatus and #ElixirLang


  18. When discussing each smell, we are adding between parentheses the acronym used in Fig. 4 (e.g., UNM) and the respective average score of the survey answers (e.g., 4.16).



  • Almeida U (2018) Learn functional programming with Elixir: new foundations for a new world, 1st edn. Pragmatic Bookshelf

  • Arnaoudova V, Di Penta M, Antoniol G (2016) Linguistic antipatterns: What they are and how developers perceive them. Empir Softw Eng 21(1):104–158.

    Article  Google Scholar 

  • Baltes S, Diehl S (2016) Worse than spam: Issues in sampling software developers. In: 10th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM). pp 1–6.

  • Bordignon MD, Silva RA (2020) Mutation operators for concurrent programs in Elixir. In: 21st IEEE Latin-American Test Symposium (LATS). pp 1–6.

  • Borrelli A, Nardone V, Di Lucca GA, Canfora G, Di Penta M (2020) Detecting video game-specific bad smells in Unity projects. In: 17th International Conference on Mining Software Repositories (MSR). pp 198–208.

  • Brown WJ, Malveau RC, McCormick HW, Mowbray TJ (1998) AntiPatterns: refactoring software, architectures, and projects in crisis. Wiley

  • Cowie J (2005) Detecting bad smells in haskell. Tech. rep., University of Kent, UK

  • Dabic O, Aghajani E, Bavota G (2021) Sampling projects in github for MSR studies. In: 18th IEEE/ACM International Conference on Mining Software Repositories (MSR). pp 560–564

  • Dong Y, Li Z, Tian Y, Sun C, Godfrey MW, Nagappan M (2022) Bash in the wild: language usage, code smells, and bugs. ACM Trans Softw Eng Methodol.

  • Fard AM, Mesbah A (2013) Jsnose: detecting JavaScript code smells. In: 13th IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM). pp 116–125.

  • Ferreira F, Valente MT (2023) Detecting code smells in React-based web apps. Inf Softw Technol 155:1–16.

    Article  Google Scholar 

  • Fontana FA, Ferme V, Marino A, Walter B, 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). pp 260–269.

  • Fowler M, Beck K (1999) Refactoring: improving the design of existing code, 1st edn. Addison-Wesley

  • Garousi V, Felderer M, Mäntylä MV (2019) Guidelines for including grey literature and conducting multivocal literature reviews in software engineering. Inf Softw Technol 106(1):101–121.

    Article  Google Scholar 

  • Habchi S, Hecht G, Rouvoy R, 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), pp 110–121.

  • Hecht G, Benomar O, Rouvoy R, Moha N, Duchien L (2015) Tracking the software quality of Android applications along their evolution. In: 30th IEEE/ACM International Conference on Automated Software Engineering (ASE). pp 236–247.

  • Kamei F, Wiese I, Lima C, Polato I, Nepomuceno V, Ferreira W, Ribeiro M, Pena C, Cartaxo B, Pinto G, Soares S (2021) Grey literature in software engineering: a critical review. Inf Softw Technol 138(1):1–26.

    Article  Google Scholar 

  • Li W, Shatnawi R (2007) An empirical study of the bad smells and class error probability in the post-release object-oriented system evolution. J Syst Softw 80(7):1120–1128.

    Article  Google Scholar 

  • Mäntylä MV, Lassenius C (2006) Subjective evaluation of software evolvability using code smells: an empirical study. Empir Softw Eng 11(3):395–431.

    Article  Google Scholar 

  • Nardone V, Muse BA, Abidi M, Khomh F, Penta MD (2022) Video game bad smells: What they are and how developers perceive them. ACM Trans Softw Eng Methodol. Just Accepted

  • Oizumi W, Garcia A, da Silva Sousa L, Cafeo B, Zhao Y (2016) Code anomalies flock together: exploring code anomaly agglomerations for locating design problems. In: 38th International Conference on Software Engineering (ICSE). pp 440–451.

  • Oizumi WN, Garcia AF, Colanzi TE, Ferreira M, von Staa A (2014) When code-anomaly agglomerations represent architectural problems? an exploratory study. In: 28th Brazilian Symposium on Software Engineering (SBSE). pp 91–100.

  • Olbrich SM, Cruzes DS, Sjøberg DI (2010) Are all code smells harmful? a study of God Classes and Brain Classes in the evolution of three open source systems. In: 26th IEEE International Conference on Software Maintenance (ICSM). pp 1–10.

  • Page L, Brin S, Motwani R, Winograd T (1999) The PageRank citation ranking: bringing order to the Web. Technical report, Stanford InfoLab

  • Palomba F, Bavota G, Penta MD, Oliveto R, Lucia AD (2014) Do they really smell bad? a study on developers’ perception of bad code smells. In: IEEE International Conference on Software Maintenance and Evolution (ICSME). pp 101–110.

  • Punt L, Visscher S, Zaytsev V (2016) The A?B*A pattern: undoing style in CSS and refactoring opportunities it presents. In: 32nd IEEE International Conference on Software Maintenance and Evolution (ICSME). pp 67–77.

  • Reimann J, Brylski M, Aßmann U (2014) A tool-supported quality smell catalogue for Android developers. In: Modellbasierte und modellgetriebene Softwaremodernisierung (MMSM). pp 1–2

  • Saboury A, Musavi P, Khomh F, Antoniol G (2017) An empirical study of code smells in JavaScript projects. In: 24th IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER). pp 294–305.

  • Sharma T, Fragkoulis M, Spinellis D (2016) Does your configuration code smell? In: 13th IEEE/ACM Working Conference on Mining Software Repositories (MSR). pp 189–200

  • Siegel S, Castellan J (1988) Nonparametric Statistics for the Behavioral Sciences, 2nd edn. McGraw-Hill International Editions

  • Sobrinho EVdP, De Lucia A, Maia MdA (2021) A systematic literature review on bad smells-5 w’s: which, when, what, who, where. IEEE Trans Softw Eng 47(1):17–66.

    Article  Google Scholar 

  • Soh Z, Yamashita A, Khomh F, Guéhéneuc YG (2016) Do code smells impact the effort of different maintenance programming activities? In: 23rd IEEE International Conference on Software Analysis, Evolution, and Reengineering (SANER). pp 393–402.

  • Taibi D, Lenarduzzi V (2018) On the definition of microservice bad smells. IEEE Softw 35(3):56–62.

    Article  Google Scholar 

  • Taibi D, Janes A, Lenarduzzi V (2017) How developers perceive smells in source code: a replicated study. Inf Softw Technol 92(1):223–235.

    Article  Google Scholar 

  • Thomas D (2018) Programming Elixir |\({>}\) 1.6: functional |\({>}\) concurrent |\({>}\) pragmatic |\({>}\) fun, 1st edn. Pragmatic Bookshelf

  • Vegi LFM, Valente MT (2022a) Catalog of Elixir-specific code smells.

  • Vegi LFM, Valente MT (2022b) Code smells in Elixir: early results from a grey literature review. In: 30th International Conference on Program Comprehension (ICPC). pp 1–5.

  • Vegi LFM, Valente MT (2022c). Understanding code smells in Elixir functional language - Replication Package.

    Article  Google Scholar 

  • Wohlin C, Runeson P, Hst M, Ohlsson MC, Regnell B, Wessln A (2012) Experimentation in Software Engineering. Springer

  • Yamashita A, Moonen L (2012) Do code smells reflect important maintainability aspects? In: 28th IEEE International Conference on Software Maintenance (ICSM). pp 306–315.

  • Yamashita A, Moonen L (2013a) Do developers care about code smells? an exploratory survey. In: 20th Working Conference on Reverse Engineering (WCRE). pp 242–251.

  • Yamashita A, Moonen L (2013b) To what extent can maintenance problems be predicted by code smell detection? an empirical study. Inf Softw Technol 55(12):2223–2242.

    Article  Google Scholar 

  • Zhang H, Zhou X, Huang X, Huang H, Babar MA (2020) An evidence-based inquiry into the use of grey literature in software engineering. In: 42nd ACM/IEEE International Conference on Software Engineering (ICSE). pp 1422–1434.

Download references


We thank the Elixir community members who spontaneously spread this research and interacted with us on our GitHub repository. We also thank the developers who participated in our survey and shared their perspectives about code quality in Elixir. Finally, José Valim deserves particular thanks for facilitating our communication with the Elixir community and supporting the Research with Elixir initiative (, in Portuguese). This research is supported by a grant from Finbits:

Author information

Authors and Affiliations


Corresponding author

Correspondence to Lucas Francisco da Matta Vegi.

Ethics declarations

Competing interests

The authors declare that they have no conflict of interest.

Additional information

Communicated by: Mika Mäntylä.

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and Permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Francisco da Matta Vegi, L., Valente, M.T. Understanding code smells in Elixir functional language. Empir Software Eng 28, 102 (2023).

Download citation

  • Accepted:

  • Published:

  • DOI: