Hybrid DOM-Sensitive Change Impact Analysis for JavaScript

JavaScript has grown to be among the most popular programming languages. However, performing change impact analysis on JavaScript applications is challenging due to features such as the seamless interplay with the DOM, event-driven and dynamic function calls, and asynchronous client/server communication. We first perform an empirical study of change propagation, the results of which show that the DOM-related and dynamic features of JavaScript need to be taken into consideration in the analysis since they affect change impact propagation. We propose a DOM-sensitive hybrid change impact analysis technique for Javascript through a combination of static and dynamic analysis. The proposed approach incorporates a novel ranking algorithm for indicating the importance of each entity in the impact set. Our approach is implemented in a tool called Tochal. The results of our evaluation reveal that Tochal provides a more complete analysis compared to static or dynamic methods. Moreover, through an industrial controlled experiment, we find that Tochal helps developers by improving their task completion duration by 78% and accuracy by 223%.

[1]  Barbara G. Ryder,et al.  State-Sensitive Points-to Analysis for the Dynamic Behavior of JavaScript Objects , 2014, ECOOP.

[2]  Claes Wohlin,et al.  Experimentation in software engineering: an introduction , 2000 .

[3]  Barbara G. Ryder,et al.  Practical blended taint analysis for JavaScript , 2013, ISSTA.

[4]  Alessandro Orso,et al.  Efficient and precise dynamic impact analysis using execute-after sequences , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[5]  Ali Mesbah,et al.  Understanding JavaScript event-based interactions , 2014, ICSE.

[6]  Magnus Madsen,et al.  Modeling the HTML DOM and browser API in static analysis of JavaScript web applications , 2011, ESEC/FSE '11.

[7]  Tom Pixley Document Object Model (DOM) Level 3 Events Specification , 2000 .

[8]  M.M. Lehman,et al.  Programs, life cycles, and laws of software evolution , 1980, Proceedings of the IEEE.

[9]  Lori L. Pollock,et al.  Integrating Influence Mechanisms into Impact Analysis for Increased Precision , 2006, 2006 22nd IEEE International Conference on Software Maintenance.

[10]  Bogdan Dit,et al.  ImpactMiner: a tool for change impact analysis , 2014, ICSE Companion.

[11]  Ondrej Lhoták,et al.  In defense of soundiness , 2015, Commun. ACM.

[12]  Benjamin Livshits,et al.  Practical static analysis of JavaScript applications in the presence of frameworks and libraries , 2013, ESEC/FSE 2013.

[13]  Václav Rajlich,et al.  Variable granularity for improving precision of impact analysis , 2009, 2009 IEEE 17th International Conference on Program Comprehension.

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

[15]  Frank Tip,et al.  Chianti: a tool for change impact analysis of java programs , 2004, OOPSLA.

[16]  A. Orso,et al.  Efficient and precise dynamic impact analysis using execute-after sequences , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[17]  Suresh Jagannathan,et al.  Sieve: A Tool for Automatically Detecting Variations Across Program Versions , 2006, 21st IEEE/ACM International Conference on Automated Software Engineering (ASE'06).

[18]  Bogdan Dit,et al.  Integrated impact analysis for managing software changes , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[19]  Frank Tip,et al.  Correlation Tracking for Points-To Analysis of JavaScript , 2012, ECOOP.

[20]  Robert S. Arnold,et al.  Software Change Impact Analysis , 1996 .

[21]  Dalton Serey Guerrero,et al.  On the Precision and Accuracy of Impact Analysis Techniques , 2008, Seventh IEEE/ACIS International Conference on Computer and Information Science (icis 2008).

[22]  Jan Vitek,et al.  An analysis of the dynamic behavior of JavaScript programs , 2010, PLDI '10.