From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: ** X-Spam-Status: No, score=3.0 required=5.0 tests=BAYES_20,INVALID_MSGID, TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9b0b20ff38d51bc1,start X-Google-Attributes: gid103376,public From: struble@mcopn2.dseg.ti.com (Dave Struble) Subject: How to measure reused vs. modified LOC? Date: 1995/04/04 Message-ID: #1/1 X-Deja-AN: 100815575 organization: Texas Instruments keywords: reuse newsgroups: comp.lang.ada Date: 1995-04-04T00:00:00+00:00 List-Id: 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 - ---------------------------------------------------------------------