“Dompletion: DOM-Aware JavaScript Code Completion”, Kartik Bajaj, Karthik Pattabiraman, and Ali Mesbah.
In Proceedings of the IEEE/ACM International Conference on Automated Software Engineering (ASE), 43–54, 2014
[PDF]  [Technical Report] [Slides]

Abstract

JavaScript is a scripting language that plays a prominent role in modern web applications. It is dynamic in nature and interacts heavily with the Document Object Model (DOM) at runtime. These characteristics make providing code completion support to JavaScript programmers particularly challenging. We propose an automated technique that reasons about existing DOM structures, dynamically analyzes the JavaScript code, and provides code completion suggestions for JavaScript code that interacts with the DOM through its APIs. Our automated code completion scheme is implemented in an open source tool called Dompletion. The results of our empirical evaluation indicate that (1) DOM structures exhibit patterns, which can be extracted and reasoned about in the context of code completion suggestions; (2) Dompletion can provide code completion suggestions with a recall of 89 precent, precision of 90 precent, and an average time of 2.8 seconds.

BibTeX

@inproceedings{kartik:ase14,
  author = {Bajaj, Kartik and Pattabiraman, Karthik and Mesbah, Ali},
  title = {Dompletion: DOM-Aware JavaScript Code Completion},
  booktitle = {Proceedings of the IEEE/ACM International Conference on Automated Software Engineering (ASE)},
  publisher = {ACM},
  pages = {43--54},
  year = {2014},
  url = {http://salt.ece.ubc.ca/publications/docs/dompletion-ase14.pdf},
  report = {http://salt.ece.ubc.ca/publications/docs/UBC-SALT-2014-002.pdf},
  slides = {39264734}
}