Solved

Java code statistics

Posted on 2003-10-30
3
206 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

623 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