Detecting Function Constructors in JavaScript

Abstract

Prior to the recent updates of the JavaScript language specifications, developers had to use custom solutions to emulate constructs such as classes, modules, and namespaces in JavaScript programs. This paper introduces JSDeodorant, an automatic approach for detecting function constructors declared locally, under a namespace, or even in other modules. The comparison with the state-of-the-art tool, JSClassFinder, shows that while the precision of the tools is very similar (97% and 98%), the recall of JSDeodorant (98%) is much higher than JSClassFinder (61%).

JavaScript Class Constructors ICSME ERA

You can download the paper here.

BibTex

@inproceedings{Rostami-ICSME-ERA-16, 
    author={Rostami, Shahriar and Eshkevari, Laleh and Mazinanian, Davood and Tsantalis, Nikolaos}, 
    booktitle={2016 IEEE International Conference on Software Maintenance and Evolution (ICSME)}, 
    title={Detecting Function Constructors in JavaScript}, 
    year={2016}, 
    pages={488-492}, 
    keywords={Java;authoring languages;specification languages;JSDEODORANT;JavaScript language specification;function constructor detection;scripting language;Bars;Computer languages;Emulation;Navigation;Object recognition;Prototypes;Reactive power;Class emulation;Comprehension;JavaScipt}, 
    doi={10.1109/ICSME.2016.29}, 
    month={Oct},
}