5.4 Defect Removal Efficiency


5.2 Defect Density

Defect density is the number of errors or faults in software. Defect density is the estimated number of errors or faults remaining in the software after a software project is complete. Defect density is a ratio of residual defects to software size or lines of code. An example of defect density is 100, 10, or 1 defect(s) per thousand lines of code. What exactly do these figures mean or represent? A defect density of 100 defects per thousand lines of code means that for every thousand lines of code, 100 defects remain. Where do these defects remain ? They are in the requirements, designs, code, and tests. If you have a software product with 10,000 lines of code, then this ratio indicates that you have 1,000 defects remaining. If your defect density is 10 defects per thousand lines of code, you have 100 defects remaining. If your defect density is 1 defect per thousand lines of code, you have 10 defects remaining. The smaller the ratio, the higher the quality of your software product. The larger the ratio, the lower the quality of your software product. Defect density is a classical measure of software quality. It is an excellent measure of benefits as they relate to SPI and ROI of SPI. Defect density enables us to perform a rich, wide, and almost infinite range and variety of benefit analyses. Figure 14 illustrates the formula for defect density.

click to expand
Figure 14: Formula for Defect Density

Defect density is also a measure of customer satisfaction, as it pertains to customer needs, requirements, and expectations. Let's take a closer look at defect density. What does it really mean? What does it really tell us? What does it not mean or tell us? First, defect density measures the number of customer requirements that have not been satisfied by a software product. Second, defect density is a ratio of all requirements, design, code, and test defects to software size. Software size is merely a baseline against which to measure. If the defect density is 100 defects per thousand lines of code, there are 100 requirements, design, code, and test defects. This holds true if the software size is 1,000 defects. Defect density is not a measure of code quality. Defect density is not limited to just software source code. There can be a defect density for requirements, designs, code, and tests. However, defect density in general refers to the ratio of all defects to the amount of code that was produced.

There is a larger and more systemic issue associated with defect density. Defect density is used for managing software projects. What does that mean? If you had to choose three measures that indicate the success of a software project, defect density would be the first measure. It is a fundamental measure of product success. How is this so? A software project manager can establish a performance goal of one defect per thousand lines of code for a software project and then can periodically measure the defect density throughout the project. This would determine if the goal has been satisfied. Finally, a defect density of one defect per thousand lines of code means only one customer requirement went unsatisfied. In other words, if there were only a thousand lines of code, only one customer requirement went unsatisfied. Despite the antiquity of this classical measure, software project managers do not know how to manage using defect density. However, defect density is a key measure in high-maturity organizations, and it is a key measure for SPI and ROI of SPI.




ROI of Software Process Improvement. Metrics for Project Managers and Software Engineers
ROI of Software Process Improvement: Metrics for Project Managers and Software Engineers
ISBN: 193215924X
EAN: 2147483647
Year: 2004
Pages: 145

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net