Repairing Event Race Errors by Controlling Nondeterminism

Christoffer Quist Adamsen, Anders Møller, Rezwana Karim, Manu Sridharan, Frank Tip, Koushik Sen

Research output: Contribution to book/anthology/report/proceedingArticle in proceedingsResearchpeer-review

263 Downloads (Pure)


Modern web applications are written in an event-driven style, in which event handlers execute asynchronously in response to user or system events. The nondeterminism arising from this programming style can lead to pernicious errors. Recent work focuses on detecting event races and classifying them as harmful or harmless. However, since modifying the source code to prevent harmful races can be a difficult and error-prone task, it may be preferable to steer away from the bad executions. In this paper, we present a technique for automated repair of event race errors in JavaScript web applications. Our approach relies on an event controller that restricts event handler scheduling in the browser according to a specified repair policy, by intercepting and carefully postponing or discarding selected events. We have implemented the technique in a tool called EventRaceCommander, which relies entirely on source code instrumentation, and evaluated it by repairing more than 100 event race errors that occur in the web applications from the largest 20 of the Fortune 500 companies. Our results show that application-independent repair policies usually suffice to repair event race errors without excessive negative impact on performance or user experience, though application-specific repair policies that target specific event races are sometimes desirable.

Original languageEnglish
Title of host publicationProceedings - 2017 IEEE/ACM 39th International Conference on Software Engineering, ICSE 2017
Number of pages11
Place of publicationPiscataway, NJ, USA
PublisherIEEE Press
Publication date20 May 2017
Article number7985670
ISBN (Print)978-1-5386-3868-2
ISBN (Electronic)9781538638682
Publication statusPublished - 20 May 2017
Event39th International Conference on Software Engineering - Buenos Aires, Argentina
Duration: 20 May 201728 May 2017
Conference number: 39


Conference39th International Conference on Software Engineering
CityBuenos Aires
Internet address


Dive into the research topics of 'Repairing Event Race Errors by Controlling Nondeterminism'. Together they form a unique fingerprint.

Cite this