JavaNCSS – A source metric suite for Java


I have been looking after LOC counters to capture some metrics of the source code and found that JavaNCSS is a good match.

What is JavaNCSS ?

JavaNCSS is a command line utility which measures some standard source code metrics for the Java programming language. The metrics are collected globally, for each class and/or for each function.

What are the advantages ?

The following are some of the advantages that i have seen

  1. Support for Ant Tasks, so easy to integrate with build process
  2. Reports can be in Text, XML, HTML etc
  3. Support for Stylsheets and easy to get nice HTML reports
  4. Metrics at each level Package / Class / Method
  5. Cyclomatic Complexity Number
  6. List the number of packages / classes / functions / LOC counter at each level

Further Reading:

  1. JavaNCSS Home
  2. LOC Counters for C++ / Java on Joel Software Discussion group
  3. SLOC on Wikipedia
Explore posts in the same categories: Programming, Project Management, Quality Assurance, Software Development, Software Metrics, Software Testing, Static Analysis, Test Automation, Test Metrics, Testing Resources, Testing Tools

4 Comments on “JavaNCSS – A source metric suite for Java”

  1. Alex Miller Says:

    The Ant tasks for JavaNCSS are ancient and produce warnings when metrics pass a threshold, but not reports. I’ve built my own version which I’m planning on releasing on sourceforge soon in the “PriNCSS” project.

    I also plan on releasing a task to maintain a running graph with your build.

    Alex Miller

  2. venkatreddyc Says:

    Good to hear that Alex. There are some issues with JavaNCSS and it does help to get going with intial metrics.

    Thanks for your comments and eager to see PriNCSS.

    Venkat.


  3. If you are going for best contents like myself, simply visit this site all the time as it offers feature contents, thanks


  4. I hardly comment, but after browsing through a ton of responses on JavaNCSS – A
    source metric suite for Java | Software Testing Blog. I actually do
    have a few questions for you if you do not mind. Could it be simply me or do some
    of these remarks come across like they are coming from
    brain dead individuals? 😛 And, if you are posting on other sites,
    I would like to keep up with everything fresh you have to post.
    Would you make a list of the complete urls of all your shared sites like your twitter feed,
    Facebook page or linkedin profile?


Leave a reply to venkatreddyc Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.