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 112 874 86 892 277 417
de.smartics.maven.issue.util 6 199 616 194 317 76 216
de.smartics.maven.bugzilla.command 11 52 350 53 289 141 346
de.smartics.maven.issue.command 21 60 311 79 498 297 772
de.smartics.maven.nexus 3 20 146 15 82 33 96
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
72 468 2397 457 2259 881 1947

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 134 7 2 19
de.smartics.maven.issue.util.VersionHelper 125 14 0 6
de.smartics.maven.issue.command.AbstractCommand 80 12 1 16
de.smartics.maven.bugzilla.MavenCommandFactory 79 15 0 1
de.smartics.maven.bugzilla.SyncProductMojo 71 7 0 2
de.smartics.maven.nexus.NexusClient 68 8 0 3
de.smartics.maven.bugzilla.AbstractIssueMojo 66 5 1 7
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.issue.util.HttpClientUtils 33 4 0 4
de.smartics.maven.nexus.NexusRequest 33 8 0 9
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 27 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.nexus.NexusUtils 22 4 0 3
de.smartics.maven.bugzilla.AbstractIssueMojo.IssueServer 21 2 0 1

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.util.VersionHelper 125 14 0 6
de.smartics.maven.issue.command.AbstractCommand 80 12 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.nexus.NexusClient 68 8 0 3
de.smartics.maven.nexus.NexusRequest 33 8 0 9
de.smartics.maven.bugzilla.AbstractMojoHelperProduct 57 7 2 12
de.smartics.maven.bugzilla.HelpMojo 134 7 2 19
de.smartics.maven.bugzilla.SyncProductMojo 71 7 0 2
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 66 5 1 7
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 27 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

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
29.76 2,397.00 0.24 6.50 6.78

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.nexus.NexusClient.getLatestReleaseVersion(NexusRequest) 19 8 1
de.smartics.maven.bugzilla.AbstractIssueMojo.IssueServer.IssueServer(SettingsDecrypter,Server,String) 16 4 0
de.smartics.maven.bugzilla.AbstractIssueMojo.getIssueServerFromSettings(IssueManagement) 16 9 0
de.smartics.maven.bugzilla.SyncProductMojo.calculatePreviousVersion(MavenProject) 16 6 0
de.smartics.maven.issue.util.VersionHelper.calcPreviousMajor(String) 16 7 0
de.smartics.maven.issue.util.VersionHelper.calcPreviousMinor(String) 16 6 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.issue.util.VersionHelper.calculatePreviousVersion(String) 14 4 1
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.AbstractIssueManagementMojo.execute() 12 3 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.bugzilla.MojoHelperSync.execute(String) 12 1 1
de.smartics.maven.bugzilla.SyncProductMojo.getRepositoryId(DeploymentRepository) 12 6 0
de.smartics.maven.issue.util.HttpClientUtils.getEncoding(HttpMethod) 12 5 0
de.smartics.maven.nexus.NexusClient.readVersion(HttpMethod) 12 6 0
de.smartics.maven.bugzilla.MojoHelperProductUpdate.execute(String) 11 1 0
de.smartics.maven.bugzilla.SyncProductMojo.getNexusServerUrl(DeploymentRepository) 11 9 0
de.smartics.maven.issue.util.VersionHelper.calcPreviousMicro(String) 11 5 0
de.smartics.maven.nexus.NexusRequest.NexusRequest(String,String,String,String,String) 11 1 1
de.smartics.maven.bugzilla.command.BugzillaAddComponentCommand.attachDefaulArguments(AddComponentCommand,AddComponentCommand,AddComponentCommand,AddComponentCommand,AddComponentCommand) 10 1 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
2,397.00 3.56 1.43 0.78

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).