JavaNCSS Metric Results

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

The following document contains the results of a JavaNCSS metric analysis.
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.sirius.client.core.system.file 6 97 1115 10 36 10 37
org.sirius.client.core.system.process 6 83 774 17 73 10 37
org.sirius.client.core.system.dir 6 69 681 10 36 10 37
org.sirius.client.core.system.sys 6 60 508 10 36 10 37
org.sirius.client.core 1 5 24 6 41 0 10
org.sirius.client.core.system 0 0 1 0 0 0 7
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
25 314 3103 53 222 40 165

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.sirius.client.core.system.file.FileOperationsPortBindingStub 868 25 0 0
org.sirius.client.core.system.process.ProcessOperationsPortBindingStub 510 18 0 0
org.sirius.client.core.system.dir.DirectoryOperationsPortBindingStub 479 15 0 0
org.sirius.client.core.system.sys.SystemOperationsPortBindingStub 321 12 0 0
org.sirius.client.core.system.process.ProcessInfo 105 17 0 13
org.sirius.client.core.system.file.FileOperationsProxy 102 25 0 0
org.sirius.client.core.system.process.ProcessOperationsProxy 74 18 0 0
org.sirius.client.core.system.dir.DirectoryOperationsProxy 66 16 0 0
org.sirius.client.core.system.dir.DirectoryOperationsServiceLocator 61 15 0 4
org.sirius.client.core.system.file.FileOperationsServiceLocator 61 15 0 4
org.sirius.client.core.system.process.ProcessOperationsServiceLocator 61 15 0 4
org.sirius.client.core.system.sys.SystemOperationsServiceLocator 61 15 0 4
org.sirius.client.core.system.sys.SystemOperationsProxy 54 13 0 0
org.sirius.client.core.system.dir.IOException 53 10 0 6
org.sirius.client.core.system.file.IOException 53 10 0 6
org.sirius.client.core.system.sys.IOException 53 10 0 6
org.sirius.client.core.system.file.FileOperations 20 19 0 0
org.sirius.client.core.CoreClient 18 5 0 6
org.sirius.client.core.system.process.ProcessOperations 13 12 0 0
org.sirius.client.core.system.dir.DirectoryOperations 11 10 0 0
org.sirius.client.core.system.sys.SystemOperations 8 7 0 0
org.sirius.client.core.system.dir.DirectoryOperationsService 4 3 0 0
org.sirius.client.core.system.file.FileOperationsService 4 3 0 0
org.sirius.client.core.system.process.ProcessOperationsService 4 3 0 0
org.sirius.client.core.system.sys.SystemOperationsService 4 3 0 0

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.sirius.client.core.system.file.FileOperationsPortBindingStub 868 25 0 0
org.sirius.client.core.system.file.FileOperationsProxy 102 25 0 0
org.sirius.client.core.system.file.FileOperations 20 19 0 0
org.sirius.client.core.system.process.ProcessOperationsPortBindingStub 510 18 0 0
org.sirius.client.core.system.process.ProcessOperationsProxy 74 18 0 0
org.sirius.client.core.system.process.ProcessInfo 105 17 0 13
org.sirius.client.core.system.dir.DirectoryOperationsProxy 66 16 0 0
org.sirius.client.core.system.dir.DirectoryOperationsPortBindingStub 479 15 0 0
org.sirius.client.core.system.dir.DirectoryOperationsServiceLocator 61 15 0 4
org.sirius.client.core.system.file.FileOperationsServiceLocator 61 15 0 4
org.sirius.client.core.system.process.ProcessOperationsServiceLocator 61 15 0 4
org.sirius.client.core.system.sys.SystemOperationsServiceLocator 61 15 0 4
org.sirius.client.core.system.sys.SystemOperationsProxy 54 13 0 0
org.sirius.client.core.system.process.ProcessOperations 13 12 0 0
org.sirius.client.core.system.sys.SystemOperationsPortBindingStub 321 12 0 0
org.sirius.client.core.system.dir.DirectoryOperations 11 10 0 0
org.sirius.client.core.system.dir.IOException 53 10 0 6
org.sirius.client.core.system.file.IOException 53 10 0 6
org.sirius.client.core.system.sys.IOException 53 10 0 6
org.sirius.client.core.system.sys.SystemOperations 8 7 0 0
org.sirius.client.core.CoreClient 18 5 0 6
org.sirius.client.core.system.dir.DirectoryOperationsService 4 3 0 0
org.sirius.client.core.system.file.FileOperationsService 4 3 0 0
org.sirius.client.core.system.process.ProcessOperationsService 4 3 0 0
org.sirius.client.core.system.sys.SystemOperationsService 4 3 0 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
122.72 3,103.00 0.00 12.56 2.12

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.sirius.client.core.system.dir.DirectoryOperationsPortBindingStub._initOperationDesc1() 138 1 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub._initOperationDesc2() 136 1 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub._initOperationDesc1() 134 1 0
org.sirius.client.core.system.process.ProcessOperationsPortBindingStub._initOperationDesc1() 120 1 0
org.sirius.client.core.system.sys.SystemOperationsPortBindingStub._initOperationDesc1() 72 1 0
org.sirius.client.core.system.dir.DirectoryOperationsPortBindingStub.createCall() 37 15 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub.createCall() 37 15 0
org.sirius.client.core.system.process.ProcessOperationsPortBindingStub.createCall() 37 15 0
org.sirius.client.core.system.sys.SystemOperationsPortBindingStub.createCall() 37 15 0
org.sirius.client.core.system.dir.DirectoryOperationsPortBindingStub.moveDirectory(java.lang.String,java.lang.String) 29 15 0
org.sirius.client.core.system.dir.DirectoryOperationsPortBindingStub.moveDirectoryEx(java.lang.String,java.lang.String,boolean) 29 15 0
org.sirius.client.core.system.dir.DirectoryOperationsPortBindingStub.copyEx(java.lang.String,java.lang.String,boolean) 29 15 0
org.sirius.client.core.system.dir.DirectoryOperationsPortBindingStub.copy(java.lang.String,java.lang.String) 29 15 0
org.sirius.client.core.system.dir.DirectoryOperationsPortBindingStub.delete(java.lang.String) 29 15 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub.copyEx(java.lang.String,java.lang.String,boolean) 29 15 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub.getFileContents(java.lang.String) 29 15 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub.getFileContentsEx2(java.lang.String,int,int) 29 15 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub.getFileContentsEx(java.lang.String,int) 29 15 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub.appendEx(java.lang.String,java.lang.String) 29 15 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub.moveEx(java.lang.String,java.lang.String,boolean) 29 15 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub.writeEx(java.lang.String,java.lang.String) 29 15 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub.append(java.lang.String,byte[]) 29 15 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub.write(java.lang.String,byte[]) 29 15 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub.copy(java.lang.String,java.lang.String) 29 15 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub.head(java.lang.String,int) 29 15 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub.tail(java.lang.String,int) 29 15 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub.move(java.lang.String,java.lang.String) 29 15 0
org.sirius.client.core.system.sys.SystemOperationsPortBindingStub.setEnvironmentVariable(java.lang.String,java.lang.String) 29 15 0
org.sirius.client.core.system.dir.DirectoryOperationsPortBindingStub.DirectoryOperationsPortBindingStub(javax.xml.rpc.Service) 25 2 0
org.sirius.client.core.system.file.FileOperationsPortBindingStub.FileOperationsPortBindingStub(javax.xml.rpc.Service) 25 2 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
3,103.00 9.25 3.52 0.17

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