comp.lang.ada
 help / color / mirror / Atom feed
From: struble@mcopn2.dseg.ti.com (Dave Struble)
Subject: How to measure reused vs. modified LOC?
Date: 1995/04/04
Date: 1995-04-04T00:00:00+00:00	[thread overview]
Message-ID: <struble.29.0436E495@mcopn2.dseg.ti.com> (raw)

How does one differentiate between "reused" and "modified" when
counting lines of code?

For example, starting with a module having 100 lines of code,
suppose that you change one (non-comment) line? One project here
at TI called this 100 lines of *modified* code since, from the
testing aspect, all 100 lines would have to be retested. We call a
component "reused" if it is useable without modification (plug and
play), but this definition gets us into trouble in certain cases.
Examples:

1.  100 line module, change one comment line: probably doesn't
    warrant retesting, so is this 100 LOC reused?  On the other
    hand, one line was modified.  Is this 99 LOC reused?

2.  100 line module, change one non-comment line: again, 99
    reused and 1 modified? or 100 modified due to test issues?

3.  100 line module, change 20 lines: 80 reused and 20 modified, or
    80 reused and 20 new?  What qualifications do you put on the 20
    lines to determine new vs. modified?

3.  100 line module, use basic design for new implementation, but
    discard old code: some measure of reuse here, but how much?

4.  How much code has to be modified before "reuse" loses its
    meaning?  DoD generally uses >30% as cut-off, but is this a
    commercial practice as well?

I would be interested in hearing of ways that other software
organizations have resolved these counting problems and what
definitions work best for new, reused and modified LOC.

Thanks for any help.

---------------------------------------------------------------------
-  Dave Struble                                                     -
-  Texas Instruments Incorporated       "Happiness is just a        -
-  e-mail: struble@mcopn.dseg.ti.com       Flaming Moe away."       -
-  Voice:  (214) 575-5346                                           -
-  FAX:    (214) 575-6200                                           -
---------------------------------------------------------------------




             reply	other threads:[~1995-04-04  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-04-04  0:00 Dave Struble [this message]
1995-04-04  0:00 ` How to measure reused vs. modified LOC? David Weller
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox