Loading [MathJax]/extensions/MathZoom.js
To Type or Not to Type: Quantifying Detectable Bugs in JavaScript | IEEE Conference Publication | IEEE Xplore

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


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 t...Show More

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%!.
Date of Conference: 20-28 May 2017
Date Added to IEEE Xplore: 20 July 2017
ISBN Information:
Electronic ISSN: 1558-1225
Conference Location: Buenos Aires, Argentina

Contact IEEE to Subscribe

References

References is not available for this document.