CS FundamentalsHardTCS · HCL · Tech Mahindra

A team measures defect density after release. Release 1: 30 defects in 15 KLOC. Release 2 adds 10 KLOC of new code and has 26 defects, all in the new code. Which statement is correct?

  1. A. Release 2 is better: 26 defects is fewer than 30
  2. B. Both releases have the same density of 2 defects per KLOC
  3. C. Release 2's new code is worse: 2.6 defects per KLOC against 2.0
  4. D. Release 2 is better: 1.04 defects per KLOC over 25 KLOC

Correct answer: C. Release 2's new code is worse: 2.6 defects per KLOC against 2.0

Release 1: 30/15 = 2.0 per KLOC. Release 2's defects all lie in 10 KLOC of new code: 26/10 = 2.6 per KLOC. Dividing by the whole 25 KLOC dilutes the measure with old, already-tested code.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic