kirancodes.me
To Proof Maintenance & Beyond!
ICSE 2022★ Distinguished Artifact

DrAsync: Identifying and Visualizing Anti-Patterns in Asynchronous JavaScript

Alexi Turcotte, Michael D. Shah, Mark W. Aldrich, Frank Tip

Abstract

Promises and async/await have become popular mechanisms for implementing asynchronous computations in JavaScript, but despite their popularity, programmers have difficulty using them. This paper identifies 8 anti-patterns in promise-based JavaScript code that are prevalent across popular JavaScript repositories. We present a light-weight static analysis for automatically detecting these anti-patterns. This analysis is embedded in an interactive visualization tool that additionally relies on dynamic analysis to visualize promise lifetimes and instances of anti-patterns executed at run time. By enabling the user to navigate between promises in the visualization and the source code fragments that they originate from, problems and optimization opportunities can be identified.

BibTeX
@inproceedings{Turcotte-al:ICSE22,
  author    = {Alexi Turcotte and
               Michael D. Shah and
               Mark W. Aldrich and
               Frank Tip},
  title     = {{DrAsync:} Identifying and Visualizing {Anti-Patterns} in Asynchronous {JavaScript}},
  booktitle = {ICSE},
  pages     = {774--785},
  publisher = {{ACM}},
  year      = {2022},
}

Related papers