1. Home
  2. Docs
  3. DETANGLE® Knowledge Base
  4. DETANGLE® Metrics
  5. Defect Density

Defect Density

Defect Density (DD) is a DETANGLE® Architecture Health Factor metric about the maintainability of the code base by measuring the extent of defects per new code. It counts the number of defect issues of the issue types selected by the “Maintenance” filter category. This filter allows selecting issue types capturing defects in the issue tracker.

So how many coding defects are too many? According to Steve McConnell’s book called “Code Complete” [1] the industry average is about 15 – 50 errors per 1000 lines of delivered code. This is known as the defects per kLOC (1000 lines of code).

DD normalizes the number of defects per 1000 Lines of “New Code” introduced by the defect issues during the respective time period. “New Code” is the sum of added and modified Lines of Code during the last time period.

The icons in the diagrams comply to certain thresholds:

  1. 👎 DD indicates more than 10 defect issues per 500 Lines of New Code.
  2. ⚠️DD shows between 5 and 10 defect issues per 500 Lines of New Code.
  3. 👍 DD reveals less than 5 defect issues per 500 Lines of New Code.

 

Defect Density is calculated along the code structure of the code base, for files, folders, the whole system and for each time period:

Granularity/
Health Factors
per 

bug

per

“functional” issue

per

contri-

butor

per 

file

per

folder

per

entire

system

(Primary) Debt Index x x x x
Contributor Friction Index x x x x
Defect Impact x x x x
Defect Density x x x x
Team Effectiveness x x x x
Bus Factor

Islands

x x x x
Bus Factor Balances x x x x

Take a look at DETANGLE® Metrics at a Glance for an overview of all metrics.

Links

[1] https://labs.sogeti.com/how-many-defects-are-too-many/

Was this article helpful to you? Yes No

How can we help?