Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#92 strange calculation for lines of code changed

closed-wont-fix
None
5
2007-11-12
2007-10-12
Kristof Szabados
No

I just noticed that there might be some problem with how the "lines of code changed" data is calculated for commits.

example (this is an actual output for a single commit with changed names):

64 lines of code changed in:

* first.g (+2 -2)
* Strategy.java (-14)
* Parser.java (+25 -23), FileType.java (del), GlobalParser.java (+3 -4), OutdatedFileCollector.java (+26 -13), ProjectSourceParser.java (+3 -3)
* Analyzer.java (+5 -69)

I don't understand how does it come, that I have changed only 64 lines of code with this commit if I have changed +5-69 = 64 lines in a single file?

I guess the valid value should be between 134 (if all changes in a single file overlap fully) and 252 (if all changes very independent).
I only used the data readable from the out and for this reason known by statCVS (the lines in the delete file were not included as it is not displayed in the result html file)

Discussion

  • Logged In: YES
    user_id=584620
    Originator: NO

    It is impossible to define precisely what a “changed line” is. StatCVS simply shows you the sum of all lines added, that's why it is 64. That's a good heuristic. Deleted lines are typically inserted in modified form somewhere else, so have already been counted. There's little point in obsessing about the precise numbers.

     
    • assigned_to: nobody --> cyganiak
    • status: open --> pending-wont-fix
     
    • status: pending-wont-fix --> closed-wont-fix
     
  • Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).