Memories of bug fixes
- 5 November 2006
- conference paper
- Published by Association for Computing Machinery (ACM)
Abstract
The change history of a software project contains a rich collection of code changes that record previous development experience. Changes that fix bugs are especially interesting, since they record both the old buggy code and the new fixed code. This paper presents a bug finding algorithm using bug fix memories: a project-specific bug and fix knowledge base developed by analyzing the history of bug fixes. A bug finding tool, BugMem, implements the algorithm. The approach is different from bug finding tools based on theorem proving or static model checking such as Bandera, ESC/Java, FindBugs, JLint, and PMD. Since these tools use pre-defined common bug patterns to find bugs, they do not aim to identify project-specific bugs. Bug fix memories use a learning process, so the bug patterns are project- specific, and project-specific bugs can be detected. The algorithm and tool are assessed by evaluating if real bugs and fixes in project histories can be found in the bug fix memories. Analysis of five open source projects shows that, for these projects, 19.3%-40.3% of bugs appear repeatedly in the memories, and 7.9%-15.5% of bug and fix pairs are found in memories. The results demonstrate that project-specific bug fix patterns occur frequently enough to be useful as a bug detection technique. Furthermore, for the bug and fix pairs, it is possible to both detect the bug and provide a strong suggestion for the fix. However, there is also a high false positive rate, with 20.8%-32.5% of non-bug containing changes also having patterns found in the memories. A comparison of BugMem with a bug finding tool, PMD, shows that the bug sets identified by both tools are mostly exclusive, indicating that BugMem complements other bug finding tools.Keywords
This publication has 19 references indexed in Scilit:
- The Daikon system for dynamic detection of likely invariantsScience of Computer Programming, 2007
- DynaMinePublished by Association for Computing Machinery (ACM) ,2005
- A Comparison of Bug Finding Tools for JavaPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2005
- Using structural context to recommend source code examplesPublished by Association for Computing Machinery (ACM) ,2005
- Finding bugs is easyPublished by Association for Computing Machinery (ACM) ,2004
- Where the bugs arePublished by Association for Computing Machinery (ACM) ,2004
- Predicting risk of software changesBell Labs Technical Journal, 2002
- Extended static checking for JavaPublished by Association for Computing Machinery (ACM) ,2002
- Predicting fault incidence using software change historyIEEE Transactions on Software Engineering, 2000
- BanderaPublished by Association for Computing Machinery (ACM) ,2000