Code Smell Detection Tool for Java Script Programs
Authors:
- 1 May 2020
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 172-176
Abstract
JavaScript is a client-side scripting language that is widely used in web applications. It is dynamic, loosely-typed and prototype-based with first-class functions. The dynamic nature of JavaScript makes it powerful and highly flexible in almost every way. However, this flexibility may result in what is known as code smells. Code smells are characteristics in the source code of a program that usually correspond to a deeper problem. They can lead to a variety of comprehension and maintenance issues and they may impact fault- and change-proneness of the application in the future. We present TAJS lint , an automated code smell detection tool for JavaScript programs that is based on static analysis. TAJS lint includes a set of 14 code smells, 9 of which are collected from various sources and 5 new smells we propose. We conduct an empirical evaluation of TAJS lint on a number of JavaScript projects and show that TAJS lint achieves an overall precision of 98% with a small number of false positives. We also study the prevalence of code smells in these projects.Keywords
This publication has 11 references indexed in Scilit:
- A survey on software smellsJournal of Systems and Software, 2018
- On the diffuseness and the impact on maintainability of code smells: a large scale empirical investigationEmpirical Software Engineering, 2017
- JSpIRIT: a flexible tool for the analysis of code smells2015
- Do They Really Smell Bad? A Study on Developers' Perception of Bad Code Smells2014
- Do developers care about code smells? An exploratory survey2013
- JSNOSE: Detecting JavaScript Code Smells2013
- An analysis of the dynamic behavior of JavaScript programsACM SIGPLAN Notices, 2010
- DECOR: A Method for the Specification and Detection of Code and Design SmellsIEEE Transactions on Software Engineering, 2009
- Type Analysis for JavaScript2009
- Metrics based refactoring2003