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.properties.jboss.extension.resources.components 6 38 382 12 101 66 194
de.smartics.properties.jboss.extension.resources 8 34 239 19 95 99 226
de.smartics.properties.jboss.extension.parser 3 11 139 6 18 33 66
de.smartics.properties.jboss.extension.resources.util 2 19 101 15 123 22 40
de.smartics.properties.jboss.extension 1 2 27 1 3 12 54
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
20 104 888 53 340 232 580

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
de.smartics.properties.jboss.extension.resources.util.SimpleMapAttributeDefinition 85 9 1 15
de.smartics.properties.jboss.extension.resources.components.AdminResourceComponent 61 6 0 2
de.smartics.properties.jboss.extension.parser.ConfigurationReader 61 5 0 2
de.smartics.properties.jboss.extension.resources.components.SecurityComponent 53 6 0 2
de.smartics.properties.jboss.extension.resources.components.FactoriesComponent 51 8 0 2
de.smartics.properties.jboss.extension.resources.components.DataSourceComponent 49 6 0 2
de.smartics.properties.jboss.extension.resources.util.SimpleMapAttributeDefinition.Builder 42 10 0 10
de.smartics.properties.jboss.extension.resources.PropertiesConfigurationResourceDefinition 38 8 0 7
de.smartics.properties.jboss.extension.resources.components.CacheComponent 38 6 0 2
de.smartics.properties.jboss.extension.resources.components.AbstractComponent 33 6 0 2
de.smartics.properties.jboss.extension.resources.SubsystemAdd 27 5 0 1
de.smartics.properties.jboss.extension.resources.PropertiesConfigurationResourceAttributeHandler 26 3 0 2
de.smartics.properties.jboss.extension.resources.PropertiesConfigurationResourceAdd 24 4 0 1
de.smartics.properties.jboss.extension.parser.ConfigurationWriter 23 3 0 2
de.smartics.properties.jboss.extension.resources.ExtensionConfigurationService 22 7 0 5
de.smartics.properties.jboss.extension.SubsystemExtension 15 2 0 1
de.smartics.properties.jboss.extension.resources.SubsystemDefinition 10 3 0 1
de.smartics.properties.jboss.extension.parser.SubsystemParser 8 3 0 2
de.smartics.properties.jboss.extension.resources.DescriptionUtils 6 2 0 1
de.smartics.properties.jboss.extension.resources.SubsystemRemove 4 2 0 1

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
de.smartics.properties.jboss.extension.resources.util.SimpleMapAttributeDefinition.Builder 42 10 0 10
de.smartics.properties.jboss.extension.resources.util.SimpleMapAttributeDefinition 85 9 1 15
de.smartics.properties.jboss.extension.resources.PropertiesConfigurationResourceDefinition 38 8 0 7
de.smartics.properties.jboss.extension.resources.components.FactoriesComponent 51 8 0 2
de.smartics.properties.jboss.extension.resources.ExtensionConfigurationService 22 7 0 5
de.smartics.properties.jboss.extension.resources.components.CacheComponent 38 6 0 2
de.smartics.properties.jboss.extension.resources.components.DataSourceComponent 49 6 0 2
de.smartics.properties.jboss.extension.resources.components.AdminResourceComponent 61 6 0 2
de.smartics.properties.jboss.extension.resources.components.AbstractComponent 33 6 0 2
de.smartics.properties.jboss.extension.resources.components.SecurityComponent 53 6 0 2
de.smartics.properties.jboss.extension.resources.SubsystemAdd 27 5 0 1
de.smartics.properties.jboss.extension.parser.ConfigurationReader 61 5 0 2
de.smartics.properties.jboss.extension.resources.PropertiesConfigurationResourceAdd 24 4 0 1
de.smartics.properties.jboss.extension.resources.PropertiesConfigurationResourceAttributeHandler 26 3 0 2
de.smartics.properties.jboss.extension.resources.SubsystemDefinition 10 3 0 1
de.smartics.properties.jboss.extension.parser.SubsystemParser 8 3 0 2
de.smartics.properties.jboss.extension.parser.ConfigurationWriter 23 3 0 2
de.smartics.properties.jboss.extension.resources.DescriptionUtils 6 2 0 1
de.smartics.properties.jboss.extension.resources.SubsystemRemove 4 2 0 1
de.smartics.properties.jboss.extension.SubsystemExtension 15 2 0 1

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
33.80 888.00 0.05 5.20 3.15

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
de.smartics.properties.jboss.extension.parser.ConfigurationReader.readConfiguration(XMLExtendedStreamReader,ModelNode,PathAddress) 40 16 0
de.smartics.properties.jboss.extension.resources.components.AdminResourceComponent.read(XMLExtendedStreamReader,ModelNode) 21 10 0
de.smartics.properties.jboss.extension.resources.components.SecurityComponent.read(XMLExtendedStreamReader,ModelNode) 18 9 0
de.smartics.properties.jboss.extension.resources.components.DataSourceComponent.read(XMLExtendedStreamReader,ModelNode) 15 8 0
de.smartics.properties.jboss.extension.resources.PropertiesConfigurationResourceAttributeHandler.applyUpdateToRuntime(OperationContext,ModelNode,String,ModelNode,ModelNode,ExtensionConfiguration) 13 4 0
de.smartics.properties.jboss.extension.resources.components.FactoriesComponent.addDefaults(PropertiesConfiguration) 13 6 0
de.smartics.properties.jboss.extension.resources.components.CacheComponent.read(XMLExtendedStreamReader,ModelNode) 12 7 0
de.smartics.properties.jboss.extension.resources.components.DataSourceComponent.apply(PropertiesConfiguration,ModelNode) 12 3 0
de.smartics.properties.jboss.extension.resources.components.AdminResourceComponent.apply(PropertiesConfiguration,ModelNode) 12 1 0
de.smartics.properties.jboss.extension.resources.util.SimpleMapAttributeDefinition.marshallAsElement(ModelNode,XMLStreamWriter) 11 3 0
de.smartics.properties.jboss.extension.resources.util.SimpleMapAttributeDefinition.toStringMap(ModelNode) 11 3 0
de.smartics.properties.jboss.extension.resources.components.FactoriesComponent.read(XMLExtendedStreamReader,ModelNode) 11 6 0
de.smartics.properties.jboss.extension.parser.ConfigurationWriter.writeContent(XMLExtendedStreamWriter,SubsystemMarshallingContext) 11 3 0
de.smartics.properties.jboss.extension.resources.PropertiesConfigurationResourceAttributeHandler.revertUpdateToRuntime(OperationContext,ModelNode,String,ModelNode,ModelNode,ExtensionConfiguration) 10 4 0
de.smartics.properties.jboss.extension.resources.components.AbstractComponent.readAttribute(XMLExtendedStreamReader,ModelNode,SimpleAttributeDefinition) 10 5 0
de.smartics.properties.jboss.extension.resources.components.SecurityComponent.apply(PropertiesConfiguration,ModelNode) 10 1 0
de.smartics.properties.jboss.extension.parser.ConfigurationWriter.writeConfiguration(XMLExtendedStreamWriter,ModelNode) 10 1 0
de.smartics.properties.jboss.extension.resources.SubsystemAdd.installJndi(OperationContext) 9 1 0
de.smartics.properties.jboss.extension.resources.util.SimpleMapAttributeDefinition.Builder.build() 8 4 1
de.smartics.properties.jboss.extension.resources.PropertiesConfigurationResourceAdd.addConfiguration(OperationContext,String,ModelNode) 8 1 0
de.smartics.properties.jboss.extension.resources.components.FactoriesComponent.apply(PropertiesConfiguration,ModelNode) 8 2 0
de.smartics.properties.jboss.extension.resources.SubsystemAdd.installService(OperationContext,ModelNode,ServiceVerificationHandler,ServiceController) 7 1 0
de.smartics.properties.jboss.extension.resources.PropertiesConfigurationResourceAdd.populateModel(ModelNode,ModelNode) 7 1 0
de.smartics.properties.jboss.extension.resources.PropertiesConfigurationResourceDefinition.registerAttributes(ManagementResourceRegistration) 7 1 0
de.smartics.properties.jboss.extension.resources.components.CacheComponent.apply(String,PropertiesConfiguration,ModelNode) 7 1 0
de.smartics.properties.jboss.extension.resources.components.AbstractComponent.normalize(String) 7 2 0
de.smartics.properties.jboss.extension.parser.ConfigurationReader.readConfigurations(XMLExtendedStreamReader,ModelNode,PathAddress) 7 8 0
de.smartics.properties.jboss.extension.resources.PropertiesConfigurationResourceDefinition.apply(String,PropertiesConfiguration,ModelNode) 6 1 0
de.smartics.properties.jboss.extension.resources.components.CacheComponent.write(XMLExtendedStreamWriter,ModelNode) 6 3 0
de.smartics.properties.jboss.extension.resources.components.DataSourceComponent.write(XMLExtendedStreamWriter,ModelNode) 6 3 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
888.00 5.25 1.98 0.32

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