DocumentCode
1952896
Title
JSNOSE: Detecting JavaScript Code Smells
Author
Fard, Amin Milani ; Mesbah, Ali
Author_Institution
Univ. of British Columbia, Vancouver, BC, Canada
fYear
2013
fDate
22-23 Sept. 2013
Firstpage
116
Lastpage
125
Abstract
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.
Keywords
Internet; Java; program debugging; CSS languages; HTML languages; JSNOSE technique; JavaScript code smells detection technique; interactive Web applications; prototype-based scripting language; refactoring; Cascading style sheets; Conferences; HTML; Measurement; Prototypes; Reactive power; Runtime; JavaScript; code smell; smell detection; web applications;
fLanguage
English
Publisher
ieee
Conference_Titel
Source Code Analysis and Manipulation (SCAM), 2013 IEEE 13th International Working Conference on
Conference_Location
Eindhoven
Type
conf
DOI
10.1109/SCAM.2013.6648192
Filename
6648192
Link To Document