looking for an open source java tool to calculate no of lines added removed.

Discussion in 'Java' started by Bhanu, May 2, 2007.

  1. Bhanu

    Bhanu Guest

    Hello Everyone,

    I am looking for an open source java tool to calculate no of lines
    added removed. If you know some tool like that please let me know. It
    would be of great help.

    Thanks,
    Bhanu.
    Bhanu, May 2, 2007
    #1
    1. Advertising

  2. Bhanu wrote:
    ...
    >I am looking for an open source ..


    What about free?
    " " freely distributable?
    " " free to distribute variants?

    An 'open source' code library might also be
    any, all, or none, of the above things.

    >..java tool to calculate no of lines

    ...
    This is commonly called a 'diff'. This search might help,
    <http://www.google.com/search?q=java+diff>

    --
    Andrew Thompson
    http://www.athompson.info/andrew/

    Message posted via JavaKB.com
    http://www.javakb.com/Uwe/Forums.aspx/java-general/200705/1
    Andrew Thompson, May 2, 2007
    #2
    1. Advertising

  3. Bhanu

    Lew Guest

    Re: looking for an open source java tool to calculate no of linesadded removed.

    Andrew Thompson wrote:
    > Bhanu wrote:
    > ..
    >> I am looking for an open source ..

    >
    > What about free?
    > " " freely distributable?
    > " " free to distribute variants?
    >
    > An 'open source' code library might also be
    > any, all, or none, of the above things.
    >
    >> ..java tool to calculate no of lines

    > ..
    > This is commonly called a 'diff'. This search might help,
    > <http://www.google.com/search?q=java+diff>


    Combined with a version-control system like CVS or Subversion (for which there
    are Java clients), and the version-control systems themselves include or wrap
    the 'diff' command, you can get very sophisticated tracking of changes to text
    files.

    BTW, if this is to serve some sort of human-factor performance metric for,
    say, source-code development, I recommend:

    Add the absolute value of lines added to the absolute value of lines removed
    to the absolute value of lines altered each day to get a programmer's
    productivity for that day. Count comment lines at 125-150%. Count one line
    of whitespace as one line, two consecutive lines or more of whitespace as 1.5
    lines. Count lines only for source files that have been formatted (indented)
    to the organizational standard. Credit the negative of a programmer's total
    for the day if that day's build won't build because of the developer's check-in.

    Even all that won't measure certain important things, but it would give a
    rough estimate of raw productivity.

    If you want a less valuable metric, count all lines equally, but do
    standardize the whitespace first. This should make it easier to use the raw
    diff numbers of added, deleted and altered in a scripted way.

    --
    Lew
    Lew, May 2, 2007
    #3
  4. Re: looking for an open source java tool to calculate no of linesadded removed.

    Bhanu wrote:
    > Hello Everyone,
    >
    > I am looking for an open source java tool to calculate no of lines
    > added removed. If you know some tool like that please let me know. It
    > would be of great help.
    >
    > Thanks,
    > Bhanu.
    >


    I use sloccount. It is open source and free but it is only for Linux. It
    can count the # of lines for many different languages (even if the files
    are in the same directory) and it provides the breakdown of the code
    count by language as well as an overall count. Supposedly it does not
    include commented lines or blank lines but I haven't verified that.
    Brandon McCombs, May 3, 2007
    #4
  5. Re: looking for an open source java tool to calculate no of linesadded removed.

    Andrew Thompson wrote:
    > Bhanu wrote:
    > ..
    >> I am looking for an open source ..

    >
    > What about free?
    > " " freely distributable?
    > " " free to distribute variants?
    >
    > An 'open source' code library might also be
    > any, all, or none, of the above things.


    There is a definition of open source by OSI - I would
    say that the last two of your characteristics are included
    in the open source definition.

    (http://www.opensource.org/docs/osd item 1 and 3)

    Arne
    =?UTF-8?B?QXJuZSBWYWpow7hq?=, May 3, 2007
    #5
  6. Bhanu

    Lew Guest

    Re: looking for an open source java tool to calculate no of linesadded removed.

    Brandon McCombs wrote:
    > I use sloccount. It is open source and free but it is only for Linux. It
    > can count the # of lines for many different languages (even if the files
    > are in the same directory) and it provides the breakdown of the code
    > count by language as well as an overall count. Supposedly it does not
    > include commented lines or blank lines but I haven't verified that.


    If you use that as a performance metric for team members, it won't encourage
    them to write comments or use whitespace to make their code more readable.

    Comment lines should be counted. Maybe count them double when they're revised.

    --
    Lew
    Lew, May 3, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. writeOnceDebugEverywhere()

    Open-source tool which generates Java Value objects ?

    writeOnceDebugEverywhere(), Mar 23, 2005, in forum: Java
    Replies:
    5
    Views:
    721
    frebe
    Mar 23, 2005
  2. Diomidis Spinellis

    Open source Java metrics tool

    Diomidis Spinellis, Apr 14, 2006, in forum: Java
    Replies:
    0
    Views:
    958
    Diomidis Spinellis
    Apr 14, 2006
  3. Maike Gernbach
    Replies:
    0
    Views:
    336
    Maike Gernbach
    Aug 17, 2007
  4. RB
    Replies:
    2
    Views:
    621
  5. pat eyler
    Replies:
    1
    Views:
    455
    Masayoshi Takahashi
    Mar 5, 2005
Loading...

Share This Page