1. ## LOC Metrics Significance

Hi all, Could anybody help me in understanding the significance of significant lines of code per defect used in metrics? I am basically collecting data for my software testing metrics.

[Post edited and moved by Moderator]

2. ## Re: LOC Metrics Significance

I've been doing some reading on this recently. One of the metrics for finding defects is the Defect Density method. Here is one of the examples given in the article I read:

Software 1.0 has 100,000 lines of code. 650 defects detected prior to release, 50 after release.
(100,000 / 650+50 = 7 defects per 1,000 lines of code (KLOC))
V2.0 has an additional 50,000 lines of code, another 400 defects prior to release and 75 after. The DD would be 475/50 KLOC or 9.5 defects/KLOC.
V3.0 should have between 7 and 10 defects per KLOC. If only 6/KLOC have been found, the product is probably not ready.

3. ## Re: LOC Metrics Significance

[ QUOTE ]
V3.0 should have between 7 and 10 defects per KLOC.

[/ QUOTE ]

Why? What leads to this conclusion?

4. ## Re: LOC Metrics Significance

[ QUOTE ]
[ QUOTE ]
V3.0 should have between 7 and 10 defects per KLOC.

[/ QUOTE ]

Why? What leads to this conclusion?

[/ QUOTE ]

Version 1 of the software had 7 defects/KLOC, Version 2 had 9.5 defects/KLOC; following the pattern (granted it's only two points defining the pattern) Version 3 can be expected to have somewhere between those numbers; 7-10 (rounded up) defects/KLOC

5. ## Re: LOC Metrics Significance

[ QUOTE ]
[ QUOTE ]
[ QUOTE ]
V3.0 should have between 7 and 10 defects per KLOC.

[/ QUOTE ]

Why? What leads to this conclusion?

[/ QUOTE ]

Version 1 of the software had 7 defects/KLOC, Version 2 had 9.5 defects/KLOC; following the pattern (granted it's only two points defining the pattern) Version 3 can be expected to have somewhere between those numbers; 7-10 (rounded up) defects/KLOC

[/ QUOTE ]

As you point out, two datapoints don't make much of a pattern. And if they did, you might be predicting something more like 12 defects/KLOC instead, right?

Basing product readiness on a measurement of "7-10 defects/KLOC" sounds rather arbitrary/risky to me.

6. ## Re: LOC Metrics Significance

[ QUOTE ]

As you point out, two datapoints don't make much of a pattern. And if they did, you might be predicting something more like 12 defects/KLOC instead, right?

Basing product readiness on a measurement of "7-10 defects/KLOC" sounds rather arbitrary/risky to me.

[/ QUOTE ]

Right; but as the projects progress, you have more datapoints to define the pattern. After 7 or so iterations, the average defects/KLOC might be 6.5 or it might be 19/KLOC.

This is just an example of how lines of code could be used to calculate product readiness. But using the example; 12 defects/KLOC would be outside of the two datapoints present in the example. Even averaging them out would be 8.25 defects/KLOC predicted.

The more datapoints you have (completed projects) the narrower your expected defects/KLOC becomes.

7. ## Re: LOC Metrics Significance *DELETED*

Post deleted by Joe Strazzere

8. ## Re: LOC Metrics Significance

[ QUOTE ]
Right; but as the projects progress, you have more datapoints to define the pattern. After 7 or so iterations, the average defects/KLOC might be 6.5 or it might be 19/KLOC.

This is just an example of how lines of code could be used to calculate product readiness. But using the example; 12 defects/KLOC would be outside of the two datapoints present in the example. Even averaging them out would be 8.25 defects/KLOC predicted.

The more datapoints you have (completed projects) the narrower your expected defects/KLOC becomes.

[/ QUOTE ]

Ah, I see. So it is the average number of defects/KLOC that you are using as a predictor of product readiness? That wasn't clear, and wasn't refelcted in the numbers in your example.

The pattern I saw going from 7 to 9.5 would predict 12 as the third data point (the defects/KLOC is increasing by 2.5 each iteration). But as you say, if you expect the next iteration to produce the average of all the prior iterations, then you would indeed predict 8.25, rather than 7 to 10.

It's not a metric I would use to guage project readiness, but at least now I understand where you were going with it. Thanks.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.