Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Bhanu - 02 May 2007 10:12 GMT
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.
Andrew Thompson - 02 May 2007 11:01 GMT
...
>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>

Signature

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

Lew - 02 May 2007 15:39 GMT
> ..
>> I am looking for an open source ..
[quoted text clipped - 10 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.

Signature

Lew

Arne Vajhøj - 03 May 2007 00:39 GMT
> ..
>> I am looking for an open source ..
[quoted text clipped - 5 lines]
> 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
Brandon McCombs - 03 May 2007 00:31 GMT
> Hello Everyone,
>
[quoted text clipped - 4 lines]
> 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.
Lew - 03 May 2007 01:09 GMT
> 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.

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.