|
ABSTRACT
Many techniques have been developed over the years to automatically find bugs in software. Often, these techniques rely on formal methods and sophisticated program analysis. While these techniques are valuable, they can be difficult to apply, and they aren't always effective in finding real bugs.Bug patterns are code idioms that are often errors. We have implemented automatic detectors for a variety of bug patterns found in Java programs. In this paper, we describe how we have used bug pattern detectors to find serious bugs in several widely used Java applications and libraries. We have found that the effort required to implement a bug pattern detector tends to be low, and that even extremely simple detectors find bugs in real applications.From our experience applying bug pattern detectors to real programs, we have drawn several interesting conclusions. First, we have found that even well tested code written by experts contains a surprising number of obvious bugs. Second, Java (and similar languages) have many language features and APIs which are prone to misuse. Finally, that simple automatic techniques can be effective at countering the impact of both ordinary mistakes and misunderstood language features.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
2
|
Apache Ant, http://ant.apache.org/, 2004.
|
| |
3
|
|
| |
4
|
|
| |
5
|
G. Back and D. Engler. MJ: A system for constructing bug-finding analyses for Java. http://www.stanford.edu/~gback/gback-icse2004.pdf, 2003.
|
 |
6
|
|
| |
7
|
The Byte Code Engineering Library, http://jakarta.apache.org/bcel/, 2004.
|
| |
8
|
|
| |
9
|
|
| |
10
|
CheckStyle, http://checkstyle.sourceforge.net, 2004.
|
 |
11
|
Jong-Deok Choi , Keunwoo Lee , Alexey Loginov , Robert O'Callahan , Vivek Sarkar , Manu Sridharan, Efficient and precise datarace detection for multithreaded object-oriented programs, Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, June 17-19, 2002, Berlin, Germany
|
 |
12
|
Andy Chou , Junfeng Yang , Benjamin Chelf , Seth Hallem , Dawson Engler, An empirical study of operating systems errors, Proceedings of the eighteenth ACM symposium on Operating systems principles, October 21-24, 2001, Banff, Alberta, Canada
|
| |
13
|
R. F. Crew. ASTLOG: A language for examining abstract syntax trees. In USENIX Conference on Domain Specific Languages, pages 229--241, Santa Barbara, 1997.
|
| |
14
|
M. C. Daconta, E. Monk, J. P. Keller, and K. Bohnenberger. Java Pitfalls. John Wiley & Sons, Inc., 2000.
|
 |
15
|
|
| |
16
|
DrJava, http://www.drjava.org/, 2004.
|
| |
17
|
A. Druin, B. Bederson, A. Weeks, A. Farber, J. Grosjean, M. Guha, J. Hourcade, J. Lee, S. Liao, K. Reuter, A. Rose, Y. Takayama, L., and L. Zhang. The international children's digital library: Description and analysis of first use. Technical Report HCIL-2003-02, Human-Computer Interaction Lab, Univ. of Maryland, January 2003.
|
| |
18
|
Eclipse, http://www.eclipse.org/, 2004.
|
 |
19
|
|
| |
20
|
D. Engler, B. Chelf, A. Chou, and S. Hallem. Checking system rules using system-specific, programmer-written compiler extensions. In Proceedings of the Fourth Symposium on Operating Systems Design and Implementation, San Diego, CA, Oct. 2000.
|
| |
21
|
|
 |
22
|
|
 |
23
|
David Evans , John Guttag , James Horning , Yang Meng Tan, LCLint: a tool for using specifications to check code, Proceedings of the 2nd ACM SIGSOFT symposium on Foundations of software engineering, p.87-96, December 06-09, 1994, New Orleans, Louisiana, United States
|
 |
24
|
Cormac Flanagan , K. Rustan M. Leino , Mark Lillibridge , Greg Nelson , James B. Saxe , Raymie Stata, Extended static checking for Java, Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, June 17-19, 2002, Berlin, Germany
|
 |
25
|
Jeffrey S. Foster , Manuel Fähndrich , Alexander Aiken, A theory of type qualifiers, Proceedings of the ACM SIGPLAN 1999 conference on Programming language design and implementation, p.192-203, May 01-04, 1999, Atlanta, Georgia, United States
|
 |
26
|
|
| |
27
|
GNU Classpath, http://www.gnu.org/software/classpath/, 2004.
|
 |
28
|
Seth Hallem , Benjamin Chelf , Yichen Xie , Dawson Engler, A system and language for building system-specific, static analyses, Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, June 17-19, 2002, Berlin, Germany
|
 |
29
|
|
| |
30
|
D. Hovemeyer and W. Pugh. Finding concurrency bugs in Java. In Proceedings of the PODC Workshop on Concurrency and Synchronization in Java Programs, St. John's, Newfoundland, Canada, July 2004.
|
| |
31
|
Java(tm) 2 Platform, Standard Edition, http://java.sun.com/j2se/, 2004.
|
| |
32
|
Collected java practices. http://www.javapractices.com.
|
| |
33
|
JBoss, http://www.jboss.org/, 2004.
|
| |
34
|
jEdit, http://www.jedit.org/, 2004.
|
| |
35
|
S. Johnson, Lint, a C program checker. In UNIX Programmer's Supplementary Documents Volume 1 (PS1), April 1986.
|
| |
36
|
T. Kremenek and D. R. Engler. Z-ranking: Using statistical analysis to counter the impact of static analysis approximations. In Proceedings of Static Analysis, 10th International Symposium, SAS 2003, San Diego, CA, USA, pages 295--315, June 2003.
|
 |
37
|
Yanhong A. Liu , Tom Rothamel , Fuxiang Yu , Scott D. Stoller , Nanjun Hu, Parametric regular path queries, Proceedings of the ACM SIGPLAN 2004 conference on Programming language design and implementation, June 09-11, 2004, Washington DC, USA
|
| |
38
|
PMD, http://pmd.sourceforge.net, 2004.
|
| |
39
|
W. Pugh. The double checked locking is broken declaration. http://www.cs.umd.edu/users/pugh/java/memory-Model/DoubleCheckedLocking.html, July 2000.
|
| |
40
|
|
 |
41
|
|
| |
42
|
|
| |
43
|
U. Shankar, K. Talwar, J. S. Foster, and D. Wagner. Detecting format string vulnerabilities with type qualifiers. In Proceedings of the 10th Usenix Security Symposium, Washington, D.C., Aug. 2001.
|
| |
44
|
N. Sterling. WARLOCK --- a static data race analysis tool. In Proceedings of the USENIX Annual Technical Conference, pages 97--106, Winter 1993.
|
| |
45
|
|
 |
46
|
|
CITED BY 33
|
|
David Hovemeyer , William Pugh, Finding bugs is easy, Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, October 24-28, 2004, Vancouver, BC, CANADA
|
|
|
Jaime Spacco , David Hovemeyer , William Pugh, An Eclipse-based course project snapshot and submission system, Proceedings of the 2004 OOPSLA workshop on eclipse technology eXchange, p.52-56, October 24-24, 2004, Vancouver, British Columbia, Canada
|
|
|
|
|
|
Cyril Briquet , Pierre-Arnoul de Marneffe, Reproducible testing of distributed software with middleware virtualization and simulation, Proceedings of the 6th workshop on Parallel and distributed systems: testing, analysis, and debugging, p.1-11, July 20-21, 2008, Seattle, Washington
|
|
|
|
|
|
|
|
|
|
|
|
Richard Vuduc , Martin Schulz , Dan Quinlan , Bronis de Supinski , Andreas Sæbjørnsen, Improving distributed memory applications testing by message perturbation, Proceeding of the 2006 workshop on Parallel and distributed systems: testing and debugging, July 17-17, 2006, Portland, Maine, USA
|
|
|
Coen De Roover , Theo D'Hondt , Johan Brichau , Carlos Noguera , Laurence Duchien, Behavioral similarity matching using concrete source code templates in logic queries, Proceedings of the 2007 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation, January 15-16, 2007, Nice, France
|
|
|
|
|
|
Andreas Leitner , Ilinca Ciupa , Manuel Oriol , Bertrand Meyer , Arno Fiva, Contract driven development = test driven development - writing test cases, Proceedings of the the 6th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering, September 03-07, 2007, Dubrovnik, Croatia
|
|
|
Sangeetha Sudakrishnan , Janaki Madhavan , E. James Whitehead, Jr. , Jose Renau, Understanding bug fix patterns in verilog, Proceedings of the 2008 international working conference on Mining software repositories, May 10-11, 2008, Leipzig, Germany
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Alexey Loginov , Eran Yahav , Satish Chandra , Stephen Fink , Noam Rinetzky , Mangala Nanda, Verifying dereference safety via expanding-scope analysis, Proceedings of the 2008 international symposium on Software testing and analysis, July 20-24, 2008, Seattle, WA, USA
|
|
|
|
|
|
|
|
|
|
|
|
Haihao Shen , Sai Zhang , Jianjun Zhao , Jianhong Fang , Shiyuan Yao, XFindBugs: eXtended FindBugs for AspectJ, Proceedings of the 8th ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering, November 09-10, 2008, Atlanta, Georgia
|
|
|
|
|
|
|
|
|
|
|
|
|
|