Empirical Study of JavaScript Bug Reports

In order to fully understand the nature (i.e., causes and consequences) of JavaScript faults, we collected and classified over 500 bug reports from various web applications and JavaScript libraries and analyzed their characteristics. Interestingly, we found that the majority of these JavaScript faults are DOM-related, which means the error propagates into a DOM method or property.

Journal Paper (TSE'16): A Study of Causes and Consequences of Client-Side JavaScript Bugs
Conference Paper (ESEM'13): An Empirical Study of Client-Side JavaScript Bugs

Motivation

The JavaScript language has become ubiquitous, especially when used to implement the front-end of a web application; indeed, over 90% of websites in the Internet use JavaScript. With this ubiquity and popularity comes greater demand for the reliability of JavaScript code in such applications, especially as web applications become used in business-critical and security-critical contexts. Therefore, gaining a clear understanding of the characteristics of JavaScript code's reliability will help web programmers, testers, static analysis tool developers, and researchers to take appropriate steps in mitigating the bugs that occur in web applications.

Methodology

Our experimental subjects consist of 502 bug reports from 19 open-source JavaScript-based web applications. We manually analyzed each of these reports to determine the following:

  • Root Cause: What mistakes did programmers or automated tools make that led to the bug?
  • Fault Characteristics: Where do the bugs propagate in the JavaScript code?
  • Impact: Do the bugs lead to exceptions, or do they only lead to output corruptions? How severe are the bugs?

We also analyzed other characteristics of JavaScript bugs, including the amount of time it takes to triage and fix them, as well as their browser specificity.

Data

Bug report XMLs: bugReports.zip

Bug Report Analyzer: [Link]

Address: SAP Vancouver
E-mail: frolino AT ece DOT ubc DOT ca