Title
Discovering bug patterns in JavaScript.
Abstract
JavaScript has become the most popular language used by developers for client and server side programming. The language, however, still lacks proper support in the form of warnings about potential bugs in the code. Most bug finding tools in use today cover bug patterns that are discovered by reading best practices or through developer intuition and anecdotal observation. As such, it is still unclear which bugs happen frequently in practice and which are important for developers to be fixed. We propose a novel semi-automatic technique, called BugAID, for discovering the most prevalent and detectable bug patterns. BugAID is based on unsupervised machine learning using language-construct-based changes distilled from AST differencing of bug fixes in the code. We present a large-scale study of common bug patterns by mining 105K commits from 134 server-side JavaScript projects. We discover 219 bug fixing change types and discuss 13 pervasive bug patterns that occur across multiple projects and can likely be prevented with better tool support. Our findings are useful for improving tools and techniques to prevent common bugs in JavaScript, guiding tool integration for IDEs, and making developers aware of common mistakes involved with programming in JavaScript.
Year
DOI
Venue
2016
10.1145/2950290.2950308
SIGSOFT FSE
Keywords
Field
DocType
Bug patterns,JavaScript,Node.js,data mining,static analysis
World Wide Web,Best practice,Computer science,Static analysis,Intuition,Unsupervised learning,Security bug,JavaScript,Server-side scripting
Conference
Citations 
PageRank 
References 
22
0.71
32
Authors
3
Name
Order
Citations
PageRank
Quinn Hanam1371.99
Fernando Santos De Mattos Brito2221.05
Ali Mesbah3105262.92