Discovering bug patterns in JavaScript
Quinn Hanam, Fernando Santos de Mattos Brito, Ali Mesbah · ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE) · 2016
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.
Cited by 89 works. doi:10.1145/2950290.2950308
Authors
References
- A density-based algorithm for discovering clusters in large spatial Databases with Noise
- The WEKA data mining software
- Bugs as deviant behavior
- A density-based algorithm for discovering clusters a density-based algorithm for discovering clusters in large spatial databases with noise
- Finding bugs is easy
- DynaMine
- Finding bugs is easy
- An analysis of the dynamic behavior of JavaScript programs
- Fair and balanced?
- Automatic patch generation learned from human-written patches