My question concerns LoC metrics. I have to provide statistics of inserted, changed and removed lines. My users use ClearCase and the example below based on it, however I believe that my question is general.
Please have a look on the following example (taken from ClearCase documents). It compares two file versions, /main/1
(on the left side) and /main/3
(right side).
******************************** (file summary) <<< file 1: util.c@@/main/1 >>> file 2: util.c@@/main/3 ******************************** ----------[after 15]------|-------[inserted 16]------ (header) | char *s; (difference) |- ---------[changed 18]-----|----[changed to 19-21]---- (header) return ctime(&clock); | s = ctime(&clock); (difference) - | s[ strlen(s)-1 ] = '\0'; | return s; |-
There's no doubt that 1 line was INSERTED (line 16).
My question refers to the change on line 18: how many lines do you count here?
- 3 CHANGED lines?
- 1 CHANGED line?
- 1 CHANGED line and 2 INSERTED lines?
- Do you think something else...?
Please let me know what you think about (and why...). Thank you.