define per Release defect code example Example: how to calculate defect density Defect density is the total number of defects per lines of code.