JavaNCSS Metric Results

[ package ] [ object ] [ method ] [ explanation ]

The following document contains the results of a JavaNCSS metric analysis, using JavaNCSS version 32.53.
JavaNCSS web site.

Packages

[ package ] [ object ] [ method ] [ explanation ]

Packages sorted by NCSS.

Package Classes Methods NCSS Javadocs Javadoc lines Single lines comment Multi lines comment
de.smartics.maven.bugzilla 26 106 781 87 807 277 417
de.smartics.maven.issue.util 4 186 491 185 265 51 180
de.smartics.maven.bugzilla.command 11 52 350 53 289 141 346
de.smartics.maven.issue.command 21 62 336 79 498 298 772
de.smartics.maven.issue.config 5 25 100 30 181 57 100
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
67 431 2058 434 2040 824 1815

Objects

[ package ] [ object ] [ method ] [ explanation ]

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
de.smartics.maven.issue.util.MavenProjectWrapper 340 168 0 169
de.smartics.maven.bugzilla.HelpMojo 133 7 2 19
de.smartics.maven.issue.command.AbstractCommand 102 14 1 16
de.smartics.maven.bugzilla.MavenCommandFactory 79 15 0 1
de.smartics.maven.issue.util.VersionHelper 64 8 0 4
de.smartics.maven.bugzilla.AbstractIssueMojo 58 5 1 8
de.smartics.maven.bugzilla.HelpMojo.LogCatcher 58 20 0 16
de.smartics.maven.bugzilla.AbstractMojoHelperProduct 57 7 2 12
de.smartics.maven.issue.command.CommandResult 57 9 2 20
de.smartics.maven.bugzilla.command.BugzillaAddProductCommand 34 4 0 4
de.smartics.maven.bugzilla.AbstractProductMojo 33 5 0 6
de.smartics.maven.bugzilla.command.BugzillaAddComponentCommand 32 4 0 4
de.smartics.maven.bugzilla.command.BugzillaAddMilestoneCommand 32 4 0 4
de.smartics.maven.bugzilla.ComponentDescriptionLoader 31 5 0 2
de.smartics.maven.bugzilla.command.BugzillaAddVersionCommand 30 4 0 4
de.smartics.maven.bugzilla.Console 30 4 0 3
de.smartics.maven.bugzilla.command.BugzillaUpdateProductCommand 29 4 0 4
de.smartics.maven.bugzilla.AbstractIssueManagementMojo 26 4 0 3
de.smartics.maven.bugzilla.MojoHelperProductAdd 24 4 0 3
de.smartics.maven.bugzilla.MojoHelperProductUpdate 23 4 0 2
de.smartics.maven.issue.config.Component 23 7 0 8
de.smartics.maven.bugzilla.command.BugzillaCommandFactory 22 11 0 12
de.smartics.maven.bugzilla.MojoHelperMilestone 22 5 0 4
de.smartics.maven.issue.command.CommandArgument 22 7 0 8
de.smartics.maven.bugzilla.command.BugzillaLoginCommand 21 4 0 4
de.smartics.maven.bugzilla.command.BugzillaLogoutCommand 21 4 0 4
de.smartics.maven.issue.util.LogLevel 21 7 0 8
de.smartics.maven.bugzilla.MojoHelperVersion 20 4 0 3
de.smartics.maven.issue.command.CommandTarget 20 5 0 6
de.smartics.maven.issue.util.Grabber 20 3 0 4

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
de.smartics.maven.issue.util.MavenProjectWrapper 340 168 0 169
de.smartics.maven.bugzilla.HelpMojo.LogCatcher 58 20 0 16
de.smartics.maven.bugzilla.MavenCommandFactory 79 15 0 1
de.smartics.maven.issue.command.AbstractCommand 102 14 1 16
de.smartics.maven.bugzilla.command.BugzillaCommandFactory 22 11 0 12
de.smartics.maven.issue.command.CommandFactory 11 10 0 11
de.smartics.maven.issue.command.CommandResult 57 9 2 20
de.smartics.maven.issue.util.VersionHelper 64 8 0 4
de.smartics.maven.bugzilla.AbstractMojoHelperProduct 57 7 2 12
de.smartics.maven.bugzilla.HelpMojo 133 7 2 19
de.smartics.maven.issue.command.CommandArgument 22 7 0 8
de.smartics.maven.issue.config.Component 23 7 0 8
de.smartics.maven.issue.util.LogLevel 21 7 0 8
de.smartics.maven.bugzilla.command.BugzillaProductNavigationCommand 17 6 0 6
de.smartics.maven.issue.config.Configuration 19 6 0 7
de.smartics.maven.bugzilla.AbstractIssueMojo 58 5 1 8
de.smartics.maven.bugzilla.AbstractProductMojo 33 5 0 6
de.smartics.maven.bugzilla.command.BugzillaClassificationNavigationCommand 16 5 0 5
de.smartics.maven.bugzilla.ComponentDescriptionLoader 31 5 0 2
de.smartics.maven.bugzilla.MojoHelperMilestone 22 5 0 4
de.smartics.maven.issue.command.CommandTarget 20 5 0 6
de.smartics.maven.issue.config.NormalizeWhitespaceStringConverter 12 5 0 6
de.smartics.maven.issue.config.TrimStringConverter 10 5 0 6
de.smartics.maven.bugzilla.AbstractIssueManagementMojo 26 4 0 3
de.smartics.maven.bugzilla.command.BugzillaAddComponentCommand 32 4 0 4
de.smartics.maven.bugzilla.command.BugzillaAddMilestoneCommand 32 4 0 4
de.smartics.maven.bugzilla.command.BugzillaAddProductCommand 34 4 0 4
de.smartics.maven.bugzilla.command.BugzillaAddVersionCommand 30 4 0 4
de.smartics.maven.bugzilla.command.BugzillaLoginCommand 21 4 0 4
de.smartics.maven.bugzilla.command.BugzillaLogoutCommand 21 4 0 4

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
27.61 2,058.00 0.25 6.43 6.96

Methods

[ package ] [ object ] [ method ] [ explanation ]

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
de.smartics.maven.issue.util.VersionHelper.calculateNextVersion(String) 19 6 1
de.smartics.maven.bugzilla.AbstractIssueMojo.getIssueServerFromSettings(IssueManagement) 16 9 0
de.smartics.maven.bugzilla.AbstractMojoHelperProduct.getComponents() 15 5 1
de.smartics.maven.bugzilla.command.BugzillaCommandUtils.createExpectation(Page,String,String) 15 3 0
de.smartics.maven.bugzilla.HelpMojo.setHelpMojoValues(DescribeMojo) 14 1 0
de.smartics.maven.bugzilla.HelpMojo.initPluginInfo() 14 3 0
de.smartics.maven.bugzilla.command.BugzillaAddProductCommand.attachDefaulArguments(AddProductCommand,AddProductCommand,AddProductCommand,AddProductCommand,AddProductCommand,AddProductCommand) 13 1 0
de.smartics.maven.bugzilla.Console.execute(Command) 13 7 1
de.smartics.maven.bugzilla.AbstractIssueMojo.IssueServer.IssueServer(Server,String) 12 2 1
de.smartics.maven.bugzilla.command.BugzillaAddComponentCommand.getCommandResultDescription(Page,Expectation) 12 3 1
de.smartics.maven.bugzilla.command.BugzillaAddMilestoneCommand.getCommandResultDescription(Page,Expectation) 12 3 1
de.smartics.maven.bugzilla.command.BugzillaAddVersionCommand.getCommandResultDescription(Page,Expectation) 12 3 1
de.smartics.maven.bugzilla.command.BugzillaUpdateProductCommand.attachDefaulArguments(UpdateProductCommand,UpdateProductCommand,UpdateProductCommand,UpdateProductCommand,UpdateProductCommand) 12 1 0
de.smartics.maven.bugzilla.HelpMojo.LogCatcher.info(CharSequence) 12 3 1
de.smartics.maven.bugzilla.HelpMojo.execute() 12 7 1
de.smartics.maven.issue.command.AbstractCommand.getEncoding(HttpMethod) 12 5 0
de.smartics.maven.bugzilla.AbstractIssueManagementMojo.execute() 11 3 1
de.smartics.maven.bugzilla.MojoHelperProductUpdate.execute(String) 11 1 0
de.smartics.maven.bugzilla.command.BugzillaAddComponentCommand.attachDefaulArguments(AddComponentCommand,AddComponentCommand,AddComponentCommand,AddComponentCommand,AddComponentCommand) 10 1 0
de.smartics.maven.bugzilla.command.BugzillaAddMilestoneCommand.attachDefaulArguments(AddMilestoneCommand,AddMilestoneCommand,AddMilestoneCommand,AddMilestoneCommand) 10 2 0
de.smartics.maven.bugzilla.command.BugzillaAddProductCommand.getCommandResultDescription(Page,Expectation) 10 5 1
de.smartics.maven.bugzilla.InitProductMojo.run() 10 1 1
de.smartics.maven.issue.command.AbstractCommand.execute(CommandTarget) 10 3 1
de.smartics.maven.issue.command.AbstractCommand.readPageContent(HttpMethod) 10 4 0
de.smartics.maven.bugzilla.AbstractMojoHelperProduct.updateComponents() 9 2 1
de.smartics.maven.bugzilla.MavenCommandFactory.createAddProductCommand(String,String,String,String,String,String) 9 1 0
de.smartics.maven.bugzilla.AbstractIssueManagementMojo.loginOnDemand(boolean) 8 3 0
de.smartics.maven.bugzilla.command.BugzillaAddVersionCommand.attachDefaulArguments(AddVersionCommand,AddVersionCommand,AddVersionCommand) 8 1 0
de.smartics.maven.bugzilla.ComponentDescriptionLoader.openDefaultComponentsStream() 8 5 0
de.smartics.maven.bugzilla.MavenCommandFactory.createUpdateProductCommand(String,String,String,String,String) 8 1 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
2,058.00 3.27 1.31 0.80

Explanations

[ package ] [ object ] [ method ] [ explanation ]

Non Commenting Source Statements (NCSS)

Statements for JavaNCSS are not statements as specified in the Java Language Specification but include all kinds of declarations too. Roughly spoken, NCSS is approximately equivalent to counting ';' and '{' characters in Java source files.

Not counted are empty statements, empty blocks or semicolons after closing brackets. Of course, comments don't get counted too. Closing brackets also never get counted, the same applies to blocks in general.

Examples
Package declaration package java.lang;
Import declaration import java.awt.*;
Class declaration
  • public class Foo {
  • public class Foo extends Bla {
Interface declaration public interface Able ; {
Field declaration
  • int a;
  • int a, b, c = 5, d = 6;
Method declaration
  • public void cry();
  • public void gib() throws DeadException {
Constructor declaration public Foo() {
Constructor invocation
  • this();
  • super();
Statement declaration
  • i = 0;
  • if (ok)
  • if (exit) {
  • if (3 == 4);
  • if (4 == 4) { ;
  • } else {
Label declaration fine :

In some cases consecutive semicolons are illegal according to the JLS but JavaNCSS still tolerates them (thought JavaNCSS is still more strict as 'javac'). Nevertheless they are never counted as two statements.

Cyclomatic Complexity Number (CCN)

CCN is also know as McCabe Metric. There exists a much hyped theory behind it based on graph theory, but it all comes down to simply counting 'if', 'for', 'while' statements etc. in a method. Whenever the control flow of a method splits, the "CCN counter" gets incremented by one.

Each method has a minimum value of 1 per default. For each of the following Java keywords/statements this value gets incremented by one:

  • if
  • for
  • while
  • case
  • catch

Also if the control flow of a method returns abortively the CCNvalue will be incremented by one:

  • if
  • for

An ordinary return at the end of method will not be counted.

Note that 'else', 'default', and 'finally' don't increment the CCN value any further. On the other hand, a simple method with a 'switch' statement and a huge block of 'case' statements can have a surprisingly high CCN value (still it has the same value when converting a 'switch' block to an equivalent sequence of 'if' statements).