2013 · 139 citations · 15 references
ComputingComputer ScienceProgramming LanguagesSoftware EngineeringSystems ProgrammingClient-side ScriptingStatic Code AnalysisCode Smell DetectionCode Smell MetricsCode SmellsEmpirical EvaluationFirst-class FunctionsJavascriptMetric-based AssessmentProgram Comprehension
JavaScript is a powerful and flexible prototype-based scripting language that is increasingly used by developers to create interactive web applications. The language is interpreted, dynamic, weakly-typed, and has first-class functions. In addition, it interacts with other web languages such as CSS and HTML at runtime. All these characteristics make JavaScript code particularly error-prone and challenging to write and maintain. Code smells are patterns in the source code that can adversely influence program comprehension and maintainability of the program in the long term. We propose a set of 13 JavaScript code smells, collected from various developer resources. We present a JavaScript code smell detection technique called JSNOSE. Our metric-based approach combines static and dynamic analysis to detect smells in client-side code. This automated technique can help developers to spot code that could benefit from refactoring. We evaluate the smell finding capabilities of our technique through an empirical study. By analyzing 11 web applications, we investigate which smells detected by JSNOSE are more prevalent.
15
Refactoring improving the design of existing code
Mauricio A. Saca · 2017 · 2.1K citations
Java quality assurance by detecting code smells
Eva van Emden, Leon Moonen · 2003 · 380 citations
An analysis of the dynamic behavior of JavaScript programs
Gregor Richards, Sylvain Lebresne, Brian R. Burg et al. · 2010 · 356 citations