Vejovis: Repair of DOM-Related Faults in JavaScript Code

In this project, we present an approach for automatically suggesting repairs for JavaScript-DOM interaction bugs resulting from erroneous DOM parameters (known as DOM-related faults).

List of Case Study Bugs: Bugs Studied
Conference Paper (ICSE'14): Vejovis: Suggesting Fixes for JavaScript Faults


In prior work, we introduced AutoFLox, which is an approach for automatically localizing DOM-related JavaScript faults. While AutoFLox is useful in finding the DOM interaction point - that is, the line of JavaScript code where a null, undefined, or incorrect value originated as a result of a call to the DOM API - it does not specify how to repair the bug.

In general, automatically inferring the repair of a software bug can be challenging, and sometimes even impossible, without any specifications. However, we can leverage the structured nature of the DOM to make this inference, and thereby provide suggestions for possible repairs.


Vejovis' design is patterned after the usual way that human beings are treated by doctors when they are ill. To treat an illness, the doctor begins by observing the symptoms that are occurring in the patient. Based on this observation, the doctor tries to infer what possible sickness the patient may have. Finally, based on this inference, the doctor recommends how to treat this sickness.

In comparison, Vejovis first performs dynamic analysis on the web application code to collect information regarding the execution. This information - which corresponds to the symptoms - are then used to come up with a list of possible "sicknesses" the code has; for example, it may be passing a non-existent ID to the getElementById() method. Finally, our approach suggests "treatments" to these sicknesses by performing dynamic backward slice analysis of the DOM method's parameter.


The download link for Vejovis is as follows:

The above zip file contains our raw results data as well.

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