Detecting Inconsistencies in JavaScript MVC Applications

Frolin Ocariza, Karthik Pattabiraman and Ali Mesbah, To appear in the Proceedings of the IEEE/ACM International Conference on Software Engineering (ICSE), 2015. (Acceptance Rate: 18.5%) [ PDF | Talk ]

Abstract: Higher demands for more reliable and maintainable JavaScript-based web applications have led to the recent development of MVC (Model-View-Controller) frameworks. One of the main advantages of using these frameworks is that they abstract out DOM API method calls, which are one of the leading causes of web application faults, due to their often complicated interaction patterns. However, MVC frameworks are susceptible to inconsistencies between the identifiers and types of variables and functions used throughout the application. In response to this problem, we introduce a formal consistency model for web applications made using MVC frameworks. We propose an approach – called AUREBESH – that automatically detects inconsistencies in such applications. We evaluate AUREBESH by conducting a fault injection experiment and by running it on real applications. Our results show that AUREBESH is accurate, with an overall recall of 96.1% and a precision of 100%. It is also useful in detecting bugs, allowing us to find 13 real-world bugs in applications built on AngularJS, a popular MVC framework, without displaying any false positives.