Abstract
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 language | English |
---|---|
Title of host publication | Proceedings - 2017 IEEE/ACM 39th International Conference on Software Engineering, ICSE 2017 |
Number of pages | 11 |
Place of publication | Piscataway, NJ, USA |
Publisher | IEEE Press |
Publication date | 20 May 2017 |
Pages | 289-299 |
Article number | 7985670 |
ISBN (Print) | 978-1-5386-3868-2 |
ISBN (Electronic) | 9781538638682 |
DOIs | |
Publication status | Published - 20 May 2017 |
Event | 39th International Conference on Software Engineering - Buenos Aires, Argentina Duration: 20 May 2017 → 28 May 2017 Conference number: 39 http://icse2017.gatech.edu/ |
Conference
Conference | 39th International Conference on Software Engineering |
---|---|
Number | 39 |
Country/Territory | Argentina |
City | Buenos Aires |
Period | 20/05/2017 → 28/05/2017 |
Internet address |