UCL logo

UCL Discovery

UCL home » Library Services » Electronic resources » UCL Discovery

To Type or Not to Type: Quantifying Detectable Bugs in JavaScript

Gao, Z; Bird, C; Barr, ET; (2017) To Type or Not to Type: Quantifying Detectable Bugs in JavaScript. In: 2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE). (pp. pp. 758-769). IEEE Green open access

[img]
Preview
Text
typestudy.pdf - ["content_typename_Accepted version" not defined]

Download (283kB) | Preview

Abstract

JavaScript is growing explosively and is now used in large mature projects even outside the web domain. JavaScript is also a dynamically typed language for which static type systems, notably Facebook's Flow and Microsoft's TypeScript, have been written. What benefits do these static type systems provide? Leveraging JavaScript project histories, we select a fixed bug and check out the code just prior to the fix. We manually add type annotations to the buggy code and test whether Flow and TypeScript report an error on the buggy code, thereby possibly prompting a developer to fix the bug before its public release. We then report the proportion of bugs on which these type systems reported an error. Evaluating static type systems against public bugs, which have survived testing and review, is conservative: it understates their effectiveness at detecting bugs during private development, not to mention their other benefits such as facilitating code search/completion and serving as documentation. Despite this uneven playing field, our central finding is that both static type systems find an important percentage of public bugs: both Flow 0.30 and TypeScript 2.0 successfully detect 15%!.

Type: Proceedings paper
Title: To Type or Not to Type: Quantifying Detectable Bugs in JavaScript
Event: 39th IEEE/ACM International Conference on Software Engineering (ICSE), 20-28 May 2017, Buenos Aires, Argentina
Location: Buenos Aires, ARGENTINA
Dates: 20 May 2017 - 28 May 2017
ISBN-13: 978-1-5386-3868-2
Open access status: An open access version is available from UCL Discovery
DOI: 10.1109/ICSE.2017.75
Publisher version: https://doi.org/10.1109/ICSE.2017.75
Language: English
Additional information: This version is the author accepted manuscript. For information on re-use, please refer to the publisher’s terms and conditions.
Keywords: Computer bugs , History , Software , Surgery , Facebook , Measurement uncertainty , Documentation, JavaScript , static type systems , Flow , TypeScript , mining software repositories
UCL classification: UCL > Provost and Vice Provost Offices
UCL > Provost and Vice Provost Offices > UCL BEAMS
UCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Engineering Science
UCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Engineering Science > Dept of Computer Science
URI: http://discovery.ucl.ac.uk/id/eprint/10064729
Downloads since deposit
48Downloads
Download activity - last month
Download activity - last 12 months
Downloads by country - last 12 months

Archive Staff Only

View Item View Item