An efficient mechanism of generating call graph for JavaScript using dynamic analysis in web application

Web applications are replacing traditional native applications in recent years. For web applications, JavaScript is the most extensively used client side programming languages. The large JavaScript codebase often makes applications hard to understand, maintain and extend. Call graph is a human understandable program representation that can be used as a basis for maintenance and further extension of the application. In maintenance phase call graph can play a vital role by facilitating developers to easily trace the code that implements a particular feature. There is insufficient tool support for generating call graph for JavaScript. For its dynamic nature, JavaScript call graph generation becomes challenging. We present a dynamic analysis based mechanism to construct the call graph of JavaScript of a client side web application. Our evaluation on web applications demonstrates that the technique is precise and the rate of unidentified nodes in call graph is acceptable.

[1]  Cyrille Artho,et al.  Trace Server : A Tool for Storing, Querying and Analyzing Execution Traces , 2011 .

[2]  Ivica Crnkovic,et al.  Identifying Code of Individual Features in Client-Side Web Applications , 2013, IEEE Transactions on Software Engineering.

[3]  Bogdan Dit,et al.  Feature location in source code: a taxonomy and survey , 2013, J. Softw. Evol. Process..

[4]  Frank Tip,et al.  Efficient construction of approximate call graphs for JavaScript IDE services , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[5]  Rainer Koschke,et al.  Locating Features in Source Code , 2003, IEEE Trans. Software Eng..