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.spi.config.support 27 222 1482 102 680 294 683
de.smartics.properties.api.config.domain 30 150 557 165 1258 304 721
de.smartics.properties.spi.config.ds 15 72 384 57 360 157 283
de.smartics.properties.api.config.domain.key 8 60 360 59 393 92 226
de.smartics.properties.spi.config.definition 3 36 290 21 189 35 118
de.smartics.properties.impl.config.cache 4 56 260 14 63 49 137
de.smartics.properties.spi.config.proxy 7 42 219 27 181 82 168
de.smartics.properties.spi.config.resolve 10 29 161 30 179 104 224
de.smartics.properties.spi.config.domain 2 45 143 8 52 22 72
de.smartics.properties.api.config.app 5 27 101 32 277 41 123
de.smartics.properties.impl.config.ds 2 11 70 6 45 24 65
de.smartics.properties.impl.config.resource 1 5 53 5 40 11 45
de.smartics.properties.spi.config.validation 1 4 51 4 23 14 49
de.smartics.properties.impl.config.classpath 2 9 38 9 64 23 58
de.smartics.properties.impl.config.properties 2 8 38 7 54 23 57
de.smartics.properties.api.config 0 0 1 0 0 0 79
de.smartics.properties.spi.config 0 0 1 0 0 0 21
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
119 776 4209 546 3858 1275 3129

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
de.smartics.properties.spi.config.support.ClassPathLoader 144 18 0 9
de.smartics.properties.spi.config.support.AbstractConfigurationProperties 120 36 0 9
de.smartics.properties.spi.config.ds.DefaultDataSourceManager 115 13 1 9
de.smartics.properties.impl.config.cache.AbstractCacheConfigurationPropertiesManagement 98 40 0 5
de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesFactory 96 18 0 5
de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesManagement 95 26 0 10
de.smartics.properties.spi.config.definition.DefinitionConfigParser 94 11 0 5
de.smartics.properties.api.config.domain.key.ApplicationIdLoader 91 14 0 10
de.smartics.properties.impl.config.cache.DependencyTrackingCache 81 8 0 4
de.smartics.properties.spi.config.support.InMemoryPropertiesManager 81 14 0 5
de.smartics.properties.spi.config.support.MultiSourceProperties 80 12 0 5
de.smartics.properties.spi.config.definition.PropertiesDefinitionContext 78 16 0 12
de.smartics.properties.spi.config.ds.PropertiesStore 76 10 1 6
de.smartics.properties.spi.config.support.ConfigurationPropertiesManagementWithDefaults 75 18 0 5
de.smartics.properties.spi.config.domain.ConfigurationPropertiesProxy 73 32 0 5
de.smartics.properties.spi.config.proxy.PropertyMethodNameUtilities 73 12 0 3
de.smartics.properties.spi.config.definition.DefinitionKeyHelper 71 9 0 4
de.smartics.properties.spi.config.support.BootLoader 67 7 0 4
de.smartics.properties.spi.config.proxy.PropertiesProxyInvocationHandler 65 11 0 5
de.smartics.properties.api.config.domain.key.ApplicationId 62 9 0 10
de.smartics.properties.spi.config.support.InMemoryConfigurationRepositoryManagement 55 10 0 4
de.smartics.properties.spi.config.resolve.Resolver 52 5 1 3
de.smartics.properties.api.config.domain.key.ConfigurationKeyBuilder 51 6 2 16
de.smartics.properties.spi.config.support.AbstractInMemoryConfigurationProperties 47 10 0 5
de.smartics.properties.api.config.domain.key.ConfigurationKey 46 8 0 8
de.smartics.properties.spi.config.support.KeySetBuilder 45 4 0 2
de.smartics.properties.api.config.domain.ConfigurationValidationException 40 9 0 6
de.smartics.properties.api.config.domain.Property 40 10 0 11
de.smartics.properties.spi.config.ds.DsPropertyCollection 39 3 1 6
de.smartics.properties.api.config.domain.key.ConfigurationKeyHelper 38 8 0 6

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
de.smartics.properties.impl.config.cache.AbstractCacheConfigurationPropertiesManagement 98 40 0 5
de.smartics.properties.spi.config.support.AbstractConfigurationProperties 120 36 0 9
de.smartics.properties.spi.config.domain.ConfigurationPropertiesProxy 73 32 0 5
de.smartics.properties.api.config.domain.ConfigurationProperties 29 28 0 28
de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesManagement 95 26 0 10
de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesFactory 96 18 0 5
de.smartics.properties.spi.config.support.ClassPathLoader 144 18 0 9
de.smartics.properties.spi.config.support.ConfigurationPropertiesManagementWithDefaults 75 18 0 5
de.smartics.properties.spi.config.definition.PropertiesDefinitionContext 78 16 0 12
de.smartics.properties.api.config.domain.key.ApplicationIdLoader 91 14 0 10
de.smartics.properties.spi.config.support.InMemoryPropertiesManager 81 14 0 5
de.smartics.properties.spi.config.domain.ConfigurationPropertiesManagementProxy 34 13 0 3
de.smartics.properties.spi.config.ds.DefaultDataSourceManager 115 13 1 9
de.smartics.properties.spi.config.proxy.PropertyMethodNameUtilities 73 12 0 3
de.smartics.properties.spi.config.support.MultiSourceProperties 80 12 0 5
de.smartics.properties.api.config.app.ConfigurationPropertiesFactory 12 11 0 12
de.smartics.properties.spi.config.definition.DefinitionConfigParser 94 11 0 5
de.smartics.properties.spi.config.proxy.PropertiesProxyInvocationHandler 65 11 0 5
de.smartics.properties.api.config.domain.ConfigurationPropertiesManagement 11 10 0 11
de.smartics.properties.api.config.domain.Property 40 10 0 11
de.smartics.properties.spi.config.ds.PropertiesStore 76 10 1 6
de.smartics.properties.spi.config.support.AbstractInMemoryConfigurationProperties 47 10 0 5
de.smartics.properties.spi.config.support.InMemoryConfigurationRepositoryManagement 55 10 0 4
de.smartics.properties.api.config.domain.ConfigurationValidationException 40 9 0 6
de.smartics.properties.api.config.domain.key.ApplicationId 62 9 0 10
de.smartics.properties.spi.config.definition.DefinitionKeyHelper 71 9 0 4
de.smartics.properties.api.config.app.FactoryConfiguration 20 8 0 9
de.smartics.properties.api.config.domain.key.ConfigurationKey 46 8 0 8
de.smartics.properties.api.config.domain.key.ConfigurationKeyHelper 38 8 0 6
de.smartics.properties.api.config.domain.key.EnvironmentId 36 8 0 9

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
28.96 4,209.00 0.08 6.52 4.74

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
de.smartics.properties.impl.config.cache.DependencyTrackingCache.getProperty(ConfigurationProperties,String,Object) 20 5 0
de.smartics.properties.spi.config.support.MultiSourceProperties.contains(PropertyLocation,Object,Object) 20 6 0
de.smartics.properties.impl.config.cache.DependencyTrackingCache.getResolvedProperty(ConfigurationProperties,String,Object) 19 4 0
de.smartics.properties.spi.config.definition.DefinitionConfigParser.parse(String,InputStream) 19 7 1
de.smartics.properties.spi.config.definition.DefinitionKeyHelper.parseEnvironmentKey(String,StringTokenizer) 19 4 0
de.smartics.properties.spi.config.support.ClassPathLoader.loadProperties() 19 5 0
de.smartics.properties.spi.config.support.KeySetBuilder.createKeySet(ConfigurationKey) 19 4 0
de.smartics.properties.spi.config.validation.ConfigurationValidator.validate(PropertyCollection) 19 9 1
de.smartics.properties.spi.config.definition.PropertiesDefinitionContext.toString() 18 6 0
de.smartics.properties.spi.config.ds.PropertiesStore.getProperty(String) 18 5 0
de.smartics.properties.api.config.app.ConfigurationPropertiesFactoryFactory.createDefaultFactory() 17 7 1
de.smartics.properties.spi.config.proxy.PropertiesProxyInvocationHandler.handlePropertyMethod(Method) 17 8 0
de.smartics.properties.spi.config.definition.DefinitionConfigParser.readFiles(Element) 16 5 0
de.smartics.properties.spi.config.definition.DefinitionKeyHelper.parse(String) 15 6 1
de.smartics.properties.spi.config.support.BootLoader.addProperties(MultiSourceProperties) 15 4 0
de.smartics.properties.spi.config.support.ClassPathLoader.truncateUrl(URL) 15 4 0
de.smartics.properties.spi.config.support.MappedPropertyCollection.iterator() 15 1 1
de.smartics.properties.spi.config.support.PropertiesPropertyCollection.iterator() 15 1 1
de.smartics.properties.api.config.domain.key.ApplicationIdLoader.getApplicatioIdFrom(URL) 14 4 0
de.smartics.properties.spi.config.proxy.PropertyMethodNameUtilities.fetchPropertyMethodUsingNamingConvention(Method) 14 6 0
de.smartics.properties.spi.config.resolve.Resolver.resolve(RecursionDetection,String) 14 7 0
de.smartics.properties.spi.config.support.AbstractConfigurationProperties.resolveAndConvert(PropertyDescriptor,Object,Object) 14 5 1
de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesFactory.getCachedOrCreate(ConfigurationKey) 14 5 0
de.smartics.properties.api.config.domain.key.ApplicationIdLoader.readManifestFile(URL) 13 6 0
de.smartics.properties.spi.config.ds.DefaultDataSourceManager.print(PrintStream) 13 4 0
de.smartics.properties.spi.config.ds.PropertiesStore.setProperty(String,String) 13 3 0
de.smartics.properties.spi.config.proxy.PropertiesProxyInvocationHandler.invoke(Object,Method,Object[]) 13 9 1
de.smartics.properties.spi.config.resolve.Resolver.parsePlaceHolder(RecursionDetection,String,StringBuilder,int) 13 3 0
de.smartics.properties.spi.config.support.BootLoader.loadProperties(ClassLoader,String) 13 3 0
de.smartics.properties.spi.config.support.ClassPathLoader.loadProperties(ClassLoader,String) 13 3 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
4,209.00 3.84 1.65 0.55

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