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
org.csc.phynixx.common.logger 9 71 184 2 6 0 231
org.csc.phynixx.common.io 4 32 148 8 33 1 76
. 2 6 107 1 4 0 55
org.csc.phynixx.common.utils 2 20 86 2 7 0 38
org.csc.phynixx.common.cast 5 14 76 9 58 0 112
org.csc.phynixx.common.exceptions 4 17 75 10 48 0 79
org.csc.phynixx.common.generator 4 14 46 3 9 0 88
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
30 174 722 35 165 1 679

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
InstallCert 101 2 1 1
org.csc.phynixx.common.io.LogRecordWriter 60 14 0 3
org.csc.phynixx.common.logger.PrintLogger 56 16 0 0
org.csc.phynixx.common.exceptions.DelegatedRuntimeException 41 9 0 5
org.csc.phynixx.common.utils.GroupingAssociation 41 10 0 1
org.csc.phynixx.common.utils.UnorderedMany2ManyAssociation 41 10 0 1
org.csc.phynixx.common.io.LogRecordReader 39 11 0 1
org.csc.phynixx.common.logger.LogbackLogger 32 15 0 1
org.csc.phynixx.common.logger.Log4jLogger 30 14 0 1
org.csc.phynixx.common.cast.ImplementorWrapper 26 4 0 2
org.csc.phynixx.common.cast.ObjectImplementor 20 4 0 2
org.csc.phynixx.common.io.LogRecordPageWriter 18 4 0 2
org.csc.phynixx.common.generator.IDLongGenerator 17 6 0 0
org.csc.phynixx.common.exceptions.ExceptionUtils 14 3 0 3
org.csc.phynixx.common.logger.PhynixxLogManager 14 4 0 0
org.csc.phynixx.common.cast.ImplementorUtils 13 2 0 2
org.csc.phynixx.common.logger.IPhynixxLogger 13 12 0 0
InstallCert.SavingTrustManager 12 4 0 0
org.csc.phynixx.common.generator.SynchronizedGenerator 12 3 0 1
org.csc.phynixx.common.io.LogRecordPageReader 12 3 0 2
org.csc.phynixx.common.exceptions.SampleTransactionalException 10 4 0 0
org.csc.phynixx.common.generator.IDGenerators 10 3 0 1
org.csc.phynixx.common.logger.PrintLogManager 10 4 0 0
org.csc.phynixx.common.cast.Implementor 9 2 0 2
org.csc.phynixx.common.logger.Log4jLogManager 5 2 0 0
org.csc.phynixx.common.logger.LogbackManager 5 2 0 0
org.csc.phynixx.common.cast.IImplementor 3 2 0 1
org.csc.phynixx.common.generator.IDGenerator 3 2 0 1
org.csc.phynixx.common.logger.IPhynixxLogManager 3 2 0 0
org.csc.phynixx.common.exceptions.IDelegated 2 1 0 2

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.csc.phynixx.common.logger.PrintLogger 56 16 0 0
org.csc.phynixx.common.logger.LogbackLogger 32 15 0 1
org.csc.phynixx.common.io.LogRecordWriter 60 14 0 3
org.csc.phynixx.common.logger.Log4jLogger 30 14 0 1
org.csc.phynixx.common.logger.IPhynixxLogger 13 12 0 0
org.csc.phynixx.common.io.LogRecordReader 39 11 0 1
org.csc.phynixx.common.utils.GroupingAssociation 41 10 0 1
org.csc.phynixx.common.utils.UnorderedMany2ManyAssociation 41 10 0 1
org.csc.phynixx.common.exceptions.DelegatedRuntimeException 41 9 0 5
org.csc.phynixx.common.generator.IDLongGenerator 17 6 0 0
InstallCert.SavingTrustManager 12 4 0 0
org.csc.phynixx.common.cast.ImplementorWrapper 26 4 0 2
org.csc.phynixx.common.cast.ObjectImplementor 20 4 0 2
org.csc.phynixx.common.exceptions.SampleTransactionalException 10 4 0 0
org.csc.phynixx.common.io.LogRecordPageWriter 18 4 0 2
org.csc.phynixx.common.logger.PhynixxLogManager 14 4 0 0
org.csc.phynixx.common.logger.PrintLogManager 10 4 0 0
org.csc.phynixx.common.exceptions.ExceptionUtils 14 3 0 3
org.csc.phynixx.common.generator.IDGenerators 10 3 0 1
org.csc.phynixx.common.generator.SynchronizedGenerator 12 3 0 1
org.csc.phynixx.common.io.LogRecordPageReader 12 3 0 2
InstallCert 101 2 1 1
org.csc.phynixx.common.cast.IImplementor 3 2 0 1
org.csc.phynixx.common.cast.Implementor 9 2 0 2
org.csc.phynixx.common.cast.ImplementorUtils 13 2 0 2
org.csc.phynixx.common.generator.IDGenerator 3 2 0 1
org.csc.phynixx.common.logger.IPhynixxLogManager 3 2 0 0
org.csc.phynixx.common.logger.Log4jLogManager 5 2 0 0
org.csc.phynixx.common.logger.LogbackManager 5 2 0 0
org.csc.phynixx.common.exceptions.IDelegated 2 1 0 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
22.40 722.00 0.03 5.80 1.17

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
InstallCert.main(String[]) 79 16 0
org.csc.phynixx.common.io.LogRecordWriter.writeObject(Object) 15 4 1
org.csc.phynixx.common.io.LogRecordReader.readObject() 14 7 0
org.csc.phynixx.common.cast.ImplementorWrapper.cast(X) 10 7 1
org.csc.phynixx.common.cast.ImplementorWrapper.isImplementationOf(X) 9 7 0
InstallCert.toHexString(String[]) 8 2 0
org.csc.phynixx.common.exceptions.DelegatedRuntimeException.getRootCause() 8 5 1
org.csc.phynixx.common.cast.ObjectImplementor.cast(X) 7 6 1
org.csc.phynixx.common.exceptions.ExceptionUtils.getStackTrace(Throwable) 7 3 1
org.csc.phynixx.common.io.LogRecordPageWriter.toByteByte() 7 4 0
org.csc.phynixx.common.utils.GroupingAssociation.removeDependents(K,V,K) 7 6 0
org.csc.phynixx.common.utils.UnorderedMany2ManyAssociation.removeDependents(K,V,K) 7 6 0
org.csc.phynixx.common.cast.Implementor.cast(X) 6 6 1
org.csc.phynixx.common.cast.ImplementorUtils.cast(Object,T) 6 5 1
org.csc.phynixx.common.cast.ImplementorUtils.isImplementationOf(Object,T) 6 5 1
org.csc.phynixx.common.exceptions.DelegatedRuntimeException.getDecoratingMessage() 6 3 1
org.csc.phynixx.common.exceptions.DelegatedRuntimeException.getMessage() 6 3 1
org.csc.phynixx.common.exceptions.DelegatedRuntimeException.printStackTrace(PrintStream) 6 2 1
org.csc.phynixx.common.exceptions.DelegatedRuntimeException.printStackTrace(PrintWriter) 6 2 1
org.csc.phynixx.common.io.LogRecordPageReader.LogRecordPageReader(LogRecordReader[][]) 6 5 0
org.csc.phynixx.common.utils.GroupingAssociation.assertSet(V,K) 6 2 0
org.csc.phynixx.common.utils.UnorderedMany2ManyAssociation.assertSet(V,K) 6 2 0
org.csc.phynixx.common.cast.ObjectImplementor.isImplementationOf(X) 5 3 0
org.csc.phynixx.common.exceptions.ExceptionUtils.getStackTrace() 5 1 1
org.csc.phynixx.common.generator.IDGenerators.createLongGenerator(long,boolean) 5 2 0
org.csc.phynixx.common.io.LogRecordWriter.close() 5 3 0
org.csc.phynixx.common.utils.GroupingAssociation.getEndpoints(K,V) 5 3 0
org.csc.phynixx.common.utils.UnorderedMany2ManyAssociation.getEndpoints(K,V) 5 3 0
org.csc.phynixx.common.cast.ObjectImplementor.ObjectImplementor(O) 4 3 0
org.csc.phynixx.common.generator.IDLongGenerator.generate() 4 1 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
722.00 3.40 1.67 0.10

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