From the Publisher:
Just as good programming skills involve the knowledge of many design patterns, which developers can combine and apply in various contexts, good debugging skills involve knowledge of bug patterns. Bug patterns are recurring correlations between signaled errors and underlying bugs in a program. This concept is not novel to programming. Medical doctors rely on similar types of correlations when diagnosing disease. They learn to do so by working closely with senior doctors during their internships. Their very education focuses on learning to make such diagnoses. In contrast, software engineers education focuses on design processes and algorithmic analysis. These skills are, of course, important, but little attention is paid to teaching the process of debugging.
"Bug Patterns in Java" presents a methodology for diagnosing and debugging computer programs. The act of debugging will be presented as an ideal application of the scientific method. Skill in this area is entirely independent of other programming skills, such as designing for extensibility and reuse. Nevertheless, it is seldom taught explicitly. Eric Allen lays out a theory of debugging, and how it relates to the rest of the development cycle. In particular, he stresses the critical role of unit testing in effective debugging. At the same time, he argues that testing and debugging, while often conflated, are properly considered to be distinct tasks.
Once laying this groundwork, he then discusses various "bug patterns" (recurring relationships between signaled errors and underlying bugs in a program) that occur frequently in computer programs. For each pattern, the book discusses how to identify them, how to treat them, and how to prevent them.
Cited By
- Sudakrishnan S, Madhavan J, Whitehead E and Renau J Understanding bug fix patterns in verilog Proceedings of the 2008 international working conference on Mining software repositories, (39-42)
- Shen H, Zhang S, Zhao J, Fang J and Yao S XFindBugs Proceedings of the 8th ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering, (70-76)
- Coelho R, Rashid A, von Staa A, Noble J, Kulesza U and Lucena C A catalogue of bug patterns for exception handling in aspect-oriented programs Proceedings of the 15th Conference on Pattern Languages of Programs, (1-13)
- Boroday S, Petrenko A, Singh J and Hallal H Dynamic analysis of java applications for multithreaded antipatterns Proceedings of the third international workshop on Dynamic analysis, (1-7)
- Girgis H, Jayaraman B and Gestwicki P Visualizing errors in object oriented programs Companion to the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, (156-157)
- Murphy-Hill E, Quitslund P and Black A Removing duplication from java.io Companion to the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, (282-291)
- Farchi E and Harrington B Assisting the code review process using simple pattern recognition Proceedings of the First Haifa international conference on Hardware and Software Verification and Testing, (103-115)
- Boroday S, Petrenko A, Singh J and Hallal H (2005). Dynamic analysis of java applications for multithreaded antipatterns, ACM SIGSOFT Software Engineering Notes, 30:4, (1-7), Online publication date: 1-Jul-2005.
- Murphy-Hill E and Black A Traits Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, (275-282)
- Hovemeyer D and Pugh W (2004). Finding bugs is easy, ACM SIGPLAN Notices, 39:12, (92-106), Online publication date: 1-Dec-2004.
Index Terms
- Bug Patterns in Java
Recommendations
Toward an understanding of bug fix patterns
Twenty-seven automatically extractable bug fix patterns are defined using the syntax components and context of the source code involved in bug fix changes. Bug fix patterns are extracted from the configuration management repositories of seven open ...
A Comparative Study of Bug Patterns in Java Cloned and Non-cloned Code
SCAM '14: Proceedings of the 2014 IEEE 14th International Working Conference on Source Code Analysis and ManipulationCode cloning via copy-and-paste is a common practice in software engineering. Traditionally, this practice has been considered harmful, and a symptom that some important design abstraction is being ignored. As such, many previous studies suggest ...
Effective Bug Triage Based on Historical Bug-Fix Information
ISSRE '14: Proceedings of the 2014 IEEE 25th International Symposium on Software Reliability EngineeringFor complex and popular software, project teams could receive a large number of bug reports. It is often tedious and costly to manually assign these bug reports to developers who have the expertise to fix the bugs. Many bug triage techniques have been ...