Bad Smells in Javascript - A Mapping Study

  • Aryclenio Xavier Barros UFRN
  • Eiji Adachi UFRN


Javascript is one of the most famous mainstream programming languages nowadays. It has gained considerable practical relevance over the last years, with applications in several areas, such as games, 3D rendering, and, mainly, web development. Like any other software system, systems developed in Javascript need to keep their ability to evolve to remain useful and relevant over time. Empirical evidence has shown that bad smells are possible indicators of problems hindering software evolvability. In this context, this paper presents a mapping study investigating if and to what extent bad smells have been defined for the Javascript language and how the interest in this topic has evolved. Our study identified 26 different types of bad smells investigated in the context of Javascript in 8 different works published between 2013 and 2020. This result suggests that although Javascript has gained practical relevance in recent years, there is still room for further empirical studies defining and evaluating the impact of bad smells on Javascript-based software systems.

Palavras-chave: Javascript, bad smells, code smells, mapping


Nabil Almashfi and Lunjin Lu. 2020. Code Smell Detection Tool for Java Script Programs. In 5th International Conference on Computer and Communication Systems (ICCCS). 172–176.

M. Aniche, G. Bavota, C. Treude, M. A. Gerosa, and A. van Deursen. 2018. Code smells for Model-View-Controller architectures. Empirical Software Engineering 23, 4 (2018), 2121–2157.

Vincenzo Arceri, Isabella Mastroeni, and Sunyi Xu. 2020. Static analysis for ECMAscript string manipulation programs. Applied Sciences (Switzerland) 10, 9 (2020), 148.

Ajay Bandi, Byron J. Williams, and Edward B. Allen. 2013. Empirical evidence of code decay: A systematic mapping study. In 20th Working Conference on Reverse Engineering (WCRE). 341–350.

Aloisio S. Cairo, Glauco de F. Carneiro, and Miguel P. Monteiro. 2018. The impact of code smells on software bugs: A systematic literature review. Issue 11.

R. Correia and E. Adachi. 2019. Detecting design violations in django-based web applications. In 10th ACM International Conference Proceeding Series (ACM). 33–42.

Amin Milani Fard and Ali Mesbah. 2013. JSNOSE: Detecting JavaScript code smells. In 13th International Working Conference on Source Code Analysis and Manipulation (SCAM 2013). 116–125.

Eduardo Fernandes, Johnatan Oliveira, Gustavo Vale, Thanis Paiva, and Eduardo Figueiredo. 2016. A review-based comparative study of bad smell detection tools. In 20th ACM International Conference Proceeding Series (ACM). 458.

Martin Fowler. 1999. Refactoring: Improving the Design of Existing Code. Addison-Wesley.

A. Gong, Y. Zhong, W. Zou, Y. Shi, and C. Fang. 2020. Incorporating Android Code Smells into Java Static Code Metrics for Security Risk Prediction of Android Applications. In 20th International Conference on Software Quality, Reliability, and Security (QRS 2020). 30–40.

Sharath Gude, Munawar Hafiz, and Allen Wirfs-Brock. 2014. JavaScript: The used parts. In 12th ACM International Conference Proceeding Series (ACM). 466–475.

G. Hecht, N. Moha, and R. Rouvoy. 2016. An empirical study of the performance impacts of Android code smells. In 16th Proceedings - International Conference on Mobile Software Engineering and Systems, MOBILESoft 2016 (ICMESES). 59–69.

Samireh Jalali and Claes Wohlin. 2012. Systematic literature studies: database searches vs. backward snowballing. In Proceedings of the 2012 ACM-IEEE international symposium on empirical software engineering and measurement. IEEE, 29–38.

David Johannes, Foutse Khomh, and Giuliano Antoniol. 2019. A large-scale empirical study of code smells in JavaScript projects. Software Quality Journal 27, 20 (2019), 1271–1314.

Michele Lanza and Radu Marinescu. 2007. Object-oriented metrics in practice: using software metrics to characterize, evaluate, and improve the design of object-oriented systems. Springer Science & Business Media.

Frolin S. Ocariza, Karthik Pattabiraman, and Ali Mesbah. 2017. Detecting unknown inconsistencies in web applications. In 32nd IEEE/ACM International Conference on Automated Software Engineering (IEEE/ACM 2017). 566–577.

Kai Petersen, Sairam Vakkalanka, and Ludwik Kuzniarz. 2015. Guidelines for conducting systematic mapping studies in software engineering: An update. In 3rd Information and Software Technology Symphosium (IST). 1–18.

Václav T. Rajlich and Keith H. Bennett. 2000. A staged model for the software life cycle. Computer 33, 7 (2000), 66–71.

Amir Saboury, Pooya Musavi, Foutse Khomh, and Giulio Antoniol. 2017. An empirical study of code smells in JavaScript projects. In 5th International Conference on Computer and Communication Systems (ICCCS 2020). 294–305.

Ian Shoenberger, Mohamed Wiem Mkaouer, and Marouane Kessentini. 2017. On the use of smelly examples to detect code smells in JavaScript. In 20th European Conference on the Applications of Evolutionary Computation (EvoApplications 2017). 20–34.

Elder Vicente De Paulo Sobrinho, Andrea De Lucia, and Marcelo De Almeida Maia. 2021. A Systematic Literature Review on Bad Smells-5 W’s: Which, When, What, Who, Where. IEEE Transactions on Software Engineering 47, 32 (2021), 17–66.

Amjed Tahir, Jens Dietrich, Steve Counsell, Sherlock Licorish, and Aiko Yamashita. 2020. A large scale study on how developers discuss code smells and anti-pattern in Stack Exchange sites. Information and Software Technology 125, 30 (2020), 256.

Gustavo Vale, Eduardo Figueiredo, Ramon Abilio, and Heitor Costa. 2014. Bad smells in software product lines: A systematic review. In 8th Brazilian Symposium on Software Components, Architectures and Reuse (SBCARS). 84–94.

Xiao Xiao, Shi Han, Charles Zhang, and Dongmei Zhang. 2015. Uncovering JavaScript Performance Code Smells Relevant to Type Mutations. , 335-355 pages.
Como Citar

Selecione um Formato
BARROS, Aryclenio Xavier; ADACHI, Eiji. Bad Smells in Javascript - A Mapping Study. In: WORKSHOP DE VISUALIZAÇÃO, EVOLUÇÃO E MANUTENÇÃO DE SOFTWARE (VEM), 9. , 2021, Joinville. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2021 . p. 1-5. DOI: