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 114 908 87 912 277 417
de.smartics.maven.issue.util 7 201 637 31 158 87 213
de.smartics.maven.bugzilla.command 11 54 369 44 230 142 350
de.smartics.maven.issue.command 21 62 313 81 521 298 781
de.smartics.maven.nexus 3 20 139 15 85 33 96
de.smartics.maven.issue.config 5 25 98 30 181 57 100
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
73 476 2464 288 2087 894 1957

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
de.smartics.maven.issue.util.MavenProjectWrapper 348 168 0 3
de.smartics.maven.bugzilla.HelpMojo 134 7 2 19
de.smartics.maven.issue.util.VersionHelper 124 14 0 6
de.smartics.maven.bugzilla.MavenCommandFactory 87 15 0 1
de.smartics.maven.issue.command.AbstractCommand 80 12 1 16
de.smartics.maven.bugzilla.SyncProductMojo 69 7 0 2
de.smartics.maven.nexus.NexusClient 67 8 0 3
de.smartics.maven.bugzilla.AbstractIssueMojo 66 5 1 7
de.smartics.maven.bugzilla.AbstractMojoHelperProduct 59 7 2 13
de.smartics.maven.bugzilla.HelpMojo.LogCatcher 58 20 0 16
de.smartics.maven.issue.command.CommandResult 57 9 2 20
de.smartics.maven.bugzilla.command.BugzillaAddProductCommand 40 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.bugzilla.command.BugzillaAddComponentCommand 32 4 0 4
de.smartics.maven.bugzilla.command.BugzillaAddMilestoneCommand 32 4 0 4
de.smartics.maven.bugzilla.command.BugzillaCommandFactory 32 13 0 3
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 28 4 0 3
de.smartics.maven.nexus.NexusRequest 28 8 0 9
de.smartics.maven.bugzilla.MojoHelperSync 26 3 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.MojoHelperMilestone 22 5 0 4
de.smartics.maven.issue.command.CommandArgument 22 7 0 8
de.smartics.maven.nexus.NexusUtils 22 4 0 3

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
de.smartics.maven.issue.util.MavenProjectWrapper 348 168 0 3
de.smartics.maven.bugzilla.HelpMojo.LogCatcher 58 20 0 16
de.smartics.maven.bugzilla.MavenCommandFactory 87 15 0 1
de.smartics.maven.issue.util.VersionHelper 124 14 0 6
de.smartics.maven.bugzilla.command.BugzillaCommandFactory 32 13 0 3
de.smartics.maven.issue.command.AbstractCommand 80 12 1 16
de.smartics.maven.issue.command.CommandFactory 13 12 0 13
de.smartics.maven.issue.command.CommandResult 57 9 2 20
de.smartics.maven.nexus.NexusClient 67 8 0 3
de.smartics.maven.nexus.NexusRequest 28 8 0 9
de.smartics.maven.bugzilla.AbstractMojoHelperProduct 59 7 2 13
de.smartics.maven.bugzilla.HelpMojo 134 7 2 19
de.smartics.maven.bugzilla.SyncProductMojo 69 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 28 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 40 4 0 4

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
30.10 2,464.00 0.23 6.52 4.38

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
de.smartics.maven.bugzilla.command.BugzillaAddProductCommand.attachDefaulArguments(AddProductCommand,AddProductCommand,AddProductCommand,AddProductCommand,AddProductCommand,AddProductCommand,AddProductCommand,AddProductCommand,AddProductCommand) 19 4 0
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.MavenCommandFactory.createAddProductCommand(String,String,String,String,String,String,ProductInfo,Component) 17 3 0
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.Console.execute(Command) 13 7 1
de.smartics.maven.bugzilla.MojoHelperSync.execute(String) 13 2 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.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.PackagingUtils.mapToExtension(String) 11 7 1
de.smartics.maven.issue.util.VersionHelper.calcPreviousMicro(String) 11 5 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
2,464.00 3.60 1.47 0.43

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