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.ci.comm.hudson.command 9 58 360 39 220 88 169
de.smartics.ci.comm 7 56 226 59 375 77 191
de.smartics.ci.comm.command 16 41 160 57 327 173 303
de.smartics.ci.comm.hudson 1 2 35 3 13 11 33
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
33 157 781 158 935 349 696

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
de.smartics.ci.comm.CiController 80 20 0 21
de.smartics.ci.comm.hudson.command.HudsonLoginCommand 58 11 0 5
de.smartics.ci.comm.hudson.command.AbstractHudsonApiJob 52 12 0 8
de.smartics.ci.comm.command.AbstractCommand 40 7 0 8
de.smartics.ci.comm.CiSystem 34 9 0 7
de.smartics.ci.comm.hudson.command.HudsonGenericJobCommand 31 7 0 6
de.smartics.ci.comm.command.CommandResult 31 5 1 11
de.smartics.ci.comm.hudson.command.HudsonCreateJobCommand 28 6 0 4
de.smartics.ci.comm.hudson.command.HudsonCheckStatusJobCommand 27 5 0 3
de.smartics.ci.comm.LogHelper 27 9 0 9
de.smartics.ci.comm.hudson.HudsonCiSystemFactory 22 2 0 3
de.smartics.ci.comm.LogLevel 21 7 0 8
de.smartics.ci.comm.hudson.command.HudsonUpdateJobCommand 21 5 0 4
de.smartics.ci.comm.hudson.command.HudsonDisableJobCommand 15 4 0 3
de.smartics.ci.comm.hudson.command.HudsonDeleteJobCommand 15 4 0 3
de.smartics.ci.comm.hudson.command.HudsonEnableJobCommand 15 4 0 3
de.smartics.ci.comm.ProxyInformation 15 5 0 6
de.smartics.ci.comm.command.CommandResult.HttpStatus 14 4 0 4
de.smartics.ci.comm.ProxyCredentials 11 3 0 4
de.smartics.ci.comm.Credentials 10 3 0 4
de.smartics.ci.comm.command.AbstractJobCommand 8 3 0 4
de.smartics.ci.comm.command.CommandException 6 2 0 3
de.smartics.ci.comm.command.AbstractGenericJobCommand 5 3 0 4
de.smartics.ci.comm.command.AbstractCheckStatusJobCommand 5 3 0 4
de.smartics.ci.comm.command.AbstractDeleteJobCommand 4 2 0 3
de.smartics.ci.comm.command.AbstractEnableJobCommand 4 2 0 3
de.smartics.ci.comm.command.AbstractDisableJobCommand 4 2 0 3
de.smartics.ci.comm.command.AbstractUpdateJobCommand 4 2 0 3
de.smartics.ci.comm.command.AbstractCreateJobCommand 4 2 0 3
de.smartics.ci.comm.command.LoginCommandException 4 1 0 2

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
de.smartics.ci.comm.CiController 80 20 0 21
de.smartics.ci.comm.hudson.command.AbstractHudsonApiJob 52 12 0 8
de.smartics.ci.comm.hudson.command.HudsonLoginCommand 58 11 0 5
de.smartics.ci.comm.CiSystem 34 9 0 7
de.smartics.ci.comm.LogHelper 27 9 0 9
de.smartics.ci.comm.LogLevel 21 7 0 8
de.smartics.ci.comm.hudson.command.HudsonGenericJobCommand 31 7 0 6
de.smartics.ci.comm.command.AbstractCommand 40 7 0 8
de.smartics.ci.comm.hudson.command.HudsonCreateJobCommand 28 6 0 4
de.smartics.ci.comm.hudson.command.HudsonCheckStatusJobCommand 27 5 0 3
de.smartics.ci.comm.hudson.command.HudsonUpdateJobCommand 21 5 0 4
de.smartics.ci.comm.ProxyInformation 15 5 0 6
de.smartics.ci.comm.command.CommandResult 31 5 1 11
de.smartics.ci.comm.hudson.command.HudsonDisableJobCommand 15 4 0 3
de.smartics.ci.comm.hudson.command.HudsonDeleteJobCommand 15 4 0 3
de.smartics.ci.comm.hudson.command.HudsonEnableJobCommand 15 4 0 3
de.smartics.ci.comm.command.CommandResult.HttpStatus 14 4 0 4
de.smartics.ci.comm.ProxyCredentials 11 3 0 4
de.smartics.ci.comm.Credentials 10 3 0 4
de.smartics.ci.comm.command.AbstractGenericJobCommand 5 3 0 4
de.smartics.ci.comm.command.AbstractJobCommand 8 3 0 4
de.smartics.ci.comm.command.AbstractCheckStatusJobCommand 5 3 0 4
de.smartics.ci.comm.hudson.HudsonCiSystemFactory 22 2 0 3
de.smartics.ci.comm.command.AbstractDeleteJobCommand 4 2 0 3
de.smartics.ci.comm.command.AbstractEnableJobCommand 4 2 0 3
de.smartics.ci.comm.command.AbstractDisableJobCommand 4 2 0 3
de.smartics.ci.comm.command.AbstractUpdateJobCommand 4 2 0 3
de.smartics.ci.comm.command.CommandException 6 2 0 3
de.smartics.ci.comm.command.AbstractCreateJobCommand 4 2 0 3
de.smartics.ci.comm.command.Command 2 1 0 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
18.88 781.00 0.03 4.76 4.91

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
de.smartics.ci.comm.hudson.command.HudsonLoginCommand.handleLogin(CiSystem) 21 5 0
de.smartics.ci.comm.hudson.HudsonCiSystemFactory.createCiController(CiSystem,LogLevel) 20 1 1
de.smartics.ci.comm.hudson.command.HudsonCheckStatusJobCommand.checkJobStatus(CiSystem) 14 2 0
de.smartics.ci.comm.hudson.command.HudsonCreateJobCommand.createTheJob(CiSystem,String,String) 12 1 0
de.smartics.ci.comm.command.AbstractCommand.buildQueryString(String) 11 2 1
de.smartics.ci.comm.hudson.command.HudsonLoginCommand.configureProxyCredentials(HttpClient) 10 1 0
de.smartics.ci.comm.hudson.command.HudsonGenericJobCommand.executeGenericJob(CiSystem) 10 1 0
de.smartics.ci.comm.CiSystem.normalizeUrl(String) 9 5 0
de.smartics.ci.comm.hudson.command.AbstractHudsonApiJob.logResult(int,String) 9 4 0
de.smartics.ci.comm.CiController.executeGenericJobCommand(String,String,String,String,Properties) 8 1 1
de.smartics.ci.comm.hudson.command.HudsonUpdateJobCommand.updateTheJob(CiSystem,String,String) 8 1 0
de.smartics.ci.comm.CiSystem.execute(HttpMethod) 7 6 1
de.smartics.ci.comm.hudson.command.AbstractHudsonApiJob.resolve(String) 7 3 1
de.smartics.ci.comm.LogHelper.logDebug(Logger,LogLevel,String,Throwable) 7 5 1
de.smartics.ci.comm.CiController.checkStatusJob(String,String,Properties) 6 1 1
de.smartics.ci.comm.hudson.command.HudsonDisableJobCommand.disableTheJob(CiSystem) 6 1 0
de.smartics.ci.comm.hudson.command.HudsonDeleteJobCommand.deleteTheJob(CiSystem) 6 1 0
de.smartics.ci.comm.hudson.command.HudsonEnableJobCommand.enableTheJob(CiSystem) 6 1 0
de.smartics.ci.comm.hudson.command.AbstractHudsonApiJob.logResponse(String) 6 1 1
de.smartics.ci.comm.command.AbstractCommand.checkResult(int) 6 4 1
de.smartics.ci.comm.hudson.command.HudsonGenericJobCommand.checkResponseString(String) 5 3 1
de.smartics.ci.comm.hudson.command.HudsonCreateJobCommand.execute(CiSystem) 5 3 0
de.smartics.ci.comm.hudson.command.AbstractHudsonApiJob.createResult(int,PostMethod) 5 1 1
de.smartics.ci.comm.command.AbstractCommand.checkParameterNotBlank(String) 5 5 1
de.smartics.ci.comm.command.AbstractCommand.checkResultRegardingRedirect(int) 5 2 1
de.smartics.ci.comm.command.AbstractCommand.fetchDelimiter(boolean) 5 3 1
de.smartics.ci.comm.ProxyCredentials.ProxyCredentials(String,String,String,String) 4 1 1
de.smartics.ci.comm.CiController.login() 4 1 1
de.smartics.ci.comm.CiController.createJob(String,String) 4 1 1
de.smartics.ci.comm.CiController.updateJob(String,String) 4 1 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
781.00 3.31 1.38 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).