Solved

Java code statistics

Posted on 2003-10-30
3
201 Views
Last Modified: 2013-12-14
Hi!
I need a program that counts the lines with/without comment.
I know that it is quite simple to do it, but is there a project that can do many kinds of statistics (such as count of words, chars, number of methods, and others...)
I'm not looking for commercial product.
Thanks in advanced!
0
Comment
Question by:rzvika2
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
dualsoul earned 125 total points
ID: 9649471
this tool gets this metric from your sources JavaNCSS:
http://www.kclee.com/clemens/java/javancss/

also you can use RefactorIT programm, which can collect this metric, and many others too.
http://www.refactorit.com/
0
 
LVL 7

Expert Comment

by:grim_toaster
ID: 9649791
Currently the project I'm working on uses several open-source tools for obtaining metrics:

JCSC         (http://jcsc.sourceforge.net) - quality analysis tool
checkstyle (http://checkstyle.sourceforge.net) - for formatting checks of the code
JDepend    (http://www.clarkware.com/software/JDepend.html) - code dependencies
statCVS    (http://statcvs.sf.net)            - useful if you use CVS to get project statistics
PMD         (http://pmd.sourceforge.net) - VERY handy for spotting potential problems (unused variables, empty catch blocks, empty if statements, etc
JavaNCSS - (see above) - good for general metrics
0
 
LVL 15

Expert Comment

by:dualsoul
ID: 9649818
it's all inside RefactorIT :) but the author is not about commercial tool

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now