Simple Defect Classification
The simplest defect classification method involves manually evaluating defects to add contextual meta information. The Team Software Process suggests some of the following pieces of information as a starting point for creating a defect taxonomy.
- Related Feature - the feature to which the defect was reported against
- Module Discovered - the code in which the defect was found
- Defect Type - a standardized description of the defect, such as "assignment," "data," or "syntax."
- Reason Injected - why did the bug make it into the software in the first place? This should also be standardized, for example "education," "oversight," or "mistake."
- Phase Injected - what were the activities being performed when the defect was injected? For example, "requirements," "design," or "implementation."
- Phase Discovered - what were the activities being performed when the defect was discovered? These would be the same as the list for phase injected.
You'll recognize this simple defect classification method from the Square Root team's pair programming experiments. Ideally this classification method can also be built directly into your defect tracker.
This simple method has some disadvantages, the biggest one being that you usually will not be able to understand the reason a defect was injected until after you understand the root cause of the defect. Also, unless you were the one who wrote the code, you can only guess at the reason (was this an oversight, mistake, or education?) the defect was injected. As such, some knowledge of the system is required to perform the analysis. There are other methods for defect classification that overcome this problem but take a little more training and planning to apply well. One example is the Orthogonal Defect Classification method from IBM Research.
Since the defects in a software system are a direct reflection of the process, knowledge, and skills of the team that injected them, once the defects are classified you have some serious power for enacting positive change.