Login | Register

Identification Of JavaScript Function Constructor Using Static Source Code Analysis

Title:

Identification Of JavaScript Function Constructor Using Static Source Code Analysis

Rostami Dovom, Shahriar (2016) Identification Of JavaScript Function Constructor Using Static Source Code Analysis. Masters thesis, Concordia University.

[img]
Preview
Text (application/pdf)
Shariar Rostami - Master Thesis.pdf - Accepted Version
Available under License Creative Commons Attribution.
3MB

Abstract

Software maintenance and comprehension constitute a considerable portion of the required effort for software development, and thus, myriad number of studies have proposed approaches for improving maintainability of software systems. However, the majority of these studies have examined software systems written in traditional programming languages, such as Java and C++. While the ubiquity of web has resulted to JavaScript to be extensively adopted by developers, studies that investigate maintainability issues in JavaScript are scarce.

Prior to the recent updates on the JavaScript language specifications, developers had to use custom solutions to emulate classes, modules, and namespaces in JavaScript programs; consequently, detecting classes in JavaScript programs is non-trivial due to the flexibility of JavaScript’s syntax. To improve the maintenance and comprehension of JavaScript programs, we design and implement JSDeodorant, an automatic approach for detecting Function Constructors (i.e., the emulation of Object-Oriented classes) in JavaScript programs. These function constructors can be declared locally, under a namespace, or in other modules. The comparison with the state-of-the-art tool, JSClassFinder, shows that, while the precision of the tools are very similar (97% and 98%, respectively for JSDeodorant and JSClassFinder), the recall of JSDeodorant (98%) is much higher than JSClassFinder (61%).

Finally, we conduct an empirical study to compare the extent to which JavaScript programs in different domains (websites, server-side programs written in NodeJS, and libraries) adopt Object-Oriented classes. Our study shows that classes are more frequent in websites than NodeJS programs. Also, NodeJS projects have fewer classes compared to libraries.

Divisions:Concordia University > Gina Cody School of Engineering and Computer Science
Item Type:Thesis (Masters)
Authors:Rostami Dovom, Shahriar
Institution:Concordia University
Degree Name:M. Comp. Sc.
Program:Computer Science and Software Engineering
Date:3 August 2016
Thesis Supervisor(s):Tsantalis, Nikolaos
ID Code:981474
Deposited By: SHAHRIAR ROSTAMI DOVOM
Deposited On:08 Nov 2016 19:05
Last Modified:18 Jan 2018 17:53
Related URLs:
All items in Spectrum are protected by copyright, with all rights reserved. The use of items is governed by Spectrum's terms of access.

Repository Staff Only: item control page

Downloads per month over past year

Research related to the current document (at the CORE website)
- Research related to the current document (at the CORE website)
Back to top Back to top