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 34 315 1939 129 893 340 819
de.smartics.properties.api.config.domain 44 205 737 224 1687 452 1097
de.smartics.properties.impl.config.domain.key.envapp 14 97 623 77 564 157 331
de.smartics.properties.impl.config.domain.key.rtaware 14 95 560 64 429 144 315
de.smartics.properties.spi.config.ds 21 109 559 81 547 234 476
de.smartics.properties.spi.config.cache 18 100 417 78 441 173 470
de.smartics.properties.impl.config.cache 4 70 329 15 76 55 142
de.smartics.properties.impl.config.ds 9 44 329 32 196 91 203
de.smartics.properties.api.config.domain.key 7 51 272 51 353 52 192
de.smartics.properties.impl.config.jndi 8 39 239 20 133 108 243
de.smartics.properties.spi.config.proxy 7 42 219 27 181 82 168
de.smartics.properties.spi.config.domain 2 56 169 8 52 22 72
de.smartics.properties.spi.config.resolve 10 28 161 30 179 104 224
de.smartics.properties.spi.config.transfer 6 23 159 15 92 70 179
de.smartics.properties.spi.config.config 4 32 137 31 179 46 103
de.smartics.properties.spi.config.domain.key 7 26 127 29 153 73 168
de.smartics.properties.api.config.app 5 33 116 38 310 42 129
de.smartics.properties.spi.config.validation 1 6 63 5 31 14 49
de.smartics.properties.impl.config.resource 2 6 49 7 30 22 69
de.smartics.properties.api.config.ds 1 12 42 12 105 11 48
de.smartics.properties.impl.config.properties 2 8 39 7 57 23 57
de.smartics.properties.impl.config.classpath 2 9 38 9 73 23 58
de.smartics.properties.api.config.cache 1 10 32 10 63 11 53
de.smartics.properties.spi.config.definition 4 7 29 10 67 19 91
de.smartics.properties.api.config.codes 3 4 23 6 29 22 86
de.smartics.properties.api.config.transfer 3 6 18 9 59 27 69
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
233 1433 7427 1024 6979 2417 6011

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesFactory 175 25 1 4
de.smartics.properties.spi.config.support.ClassPathLoader 171 22 0 10
de.smartics.properties.spi.config.ds.DefaultDataSourceManager 147 16 1 12
de.smartics.properties.spi.config.support.AbstractConfigurationProperties 142 41 0 12
de.smartics.properties.spi.config.support.ConfigurationPropertiesManagementWithDefaults 140 30 1 6
de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesManagement 124 32 0 11
de.smartics.properties.impl.config.cache.AbstractCacheConfigurationPropertiesManagement 121 45 0 5
de.smartics.properties.spi.config.ds.PropertiesStore 117 13 1 7
de.smartics.properties.spi.config.support.InMemoryConfigurationRepositoryManagement 116 18 0 6
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserDefinitionKeyHelper 116 15 0 4
de.smartics.properties.impl.config.cache.DependencyTrackingCache 104 11 0 5
de.smartics.properties.api.config.domain.key.ApplicationIdLoader 98 15 0 10
de.smartics.properties.spi.config.support.MultiSourceProperties 96 14 0 6
de.smartics.properties.spi.config.domain.ConfigurationPropertiesProxy 85 38 0 5
de.smartics.properties.spi.config.support.InMemoryPropertiesManager 83 15 0 5
de.smartics.properties.impl.config.domain.key.envapp.AbstractDefinitionConfigParser 81 11 0 11
de.smartics.properties.impl.config.domain.key.envapp.AbstractPropertiesDefinitionContext 74 15 0 12
de.smartics.properties.spi.config.support.BootLoader 73 8 0 5
de.smartics.properties.spi.config.proxy.PropertyMethodNameUtilities 73 12 0 3
de.smartics.properties.api.config.domain.key.ApplicationId 71 10 0 11
de.smartics.properties.impl.config.domain.key.envapp.EnvAppDefinitionKeyHelper 70 9 0 4
de.smartics.properties.spi.config.transfer.PropertyProviderList 69 9 0 4
de.smartics.properties.spi.config.proxy.PropertiesProxyInvocationHandler 65 11 0 5
de.smartics.properties.impl.config.ds.AutodetectDataSourceConfigurationPropertiesFactory 64 11 0 3
de.smartics.properties.spi.config.support.AbstractInMemoryConfigurationProperties 60 9 1 7
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserKeyListBuilder 60 7 0 2
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserConfigurationKey 56 11 0 8
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserDefinitionConfigParser 53 6 0 3
de.smartics.properties.spi.config.resolve.Resolver 52 5 1 3
de.smartics.properties.impl.config.domain.key.envapp.EnvAppConfigurationKeyBuilder 51 6 2 16

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
de.smartics.properties.impl.config.cache.AbstractCacheConfigurationPropertiesManagement 121 45 0 5
de.smartics.properties.spi.config.support.AbstractConfigurationProperties 142 41 0 12
de.smartics.properties.spi.config.domain.ConfigurationPropertiesProxy 85 38 0 5
de.smartics.properties.api.config.domain.ConfigurationProperties 35 34 0 34
de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesManagement 124 32 0 11
de.smartics.properties.spi.config.support.ConfigurationPropertiesManagementWithDefaults 140 30 1 6
de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesFactory 175 25 1 4
de.smartics.properties.spi.config.support.ClassPathLoader 171 22 0 10
de.smartics.properties.spi.config.support.InMemoryConfigurationRepositoryManagement 116 18 0 6
de.smartics.properties.spi.config.domain.ConfigurationPropertiesManagementProxy 44 18 0 3
de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesFactory.ConfigurationPropertiesManagementFactory 36 17 0 0
de.smartics.properties.spi.config.ds.DefaultDataSourceManager 147 16 1 12
de.smartics.properties.spi.config.support.InMemoryPropertiesManager 83 15 0 5
de.smartics.properties.api.config.domain.key.ApplicationIdLoader 98 15 0 10
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserDefinitionKeyHelper 116 15 0 4
de.smartics.properties.impl.config.domain.key.envapp.AbstractPropertiesDefinitionContext 74 15 0 12
de.smartics.properties.spi.config.support.MultiSourceProperties 96 14 0 6
de.smartics.properties.api.config.domain.ConfigurationPropertiesManagement 15 14 0 15
de.smartics.properties.spi.config.config.AdminResourceConfiguration 31 13 0 13
de.smartics.properties.spi.config.ds.PropertiesStore 117 13 1 7
de.smartics.properties.api.config.app.ConfigurationPropertiesFactory 14 13 0 14
de.smartics.properties.spi.config.proxy.PropertyMethodNameUtilities 73 12 0 3
de.smartics.properties.api.config.ds.DataSourceConfiguration 36 12 0 12
de.smartics.properties.spi.config.proxy.PropertiesProxyInvocationHandler 65 11 0 5
de.smartics.properties.api.config.app.FactoryConfiguration 32 11 0 12
de.smartics.properties.api.config.domain.Property 40 11 0 12
de.smartics.properties.api.config.domain.ConfigurationValidationException 42 11 0 12
de.smartics.properties.impl.config.cache.DependencyTrackingCache 104 11 0 5
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserConfigurationKey 56 11 0 8
de.smartics.properties.impl.config.domain.key.envapp.AbstractDefinitionConfigParser 81 11 0 11

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
26.00 7,427.00 0.08 6.15 4.49

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesFactory.createFactory() 38 1 0
de.smartics.properties.impl.config.cache.DependencyTrackingCache.getProperty(ConfigurationProperties,PropertyDescriptor,Object) 24 7 0
de.smartics.properties.spi.config.transfer.PropertyProviderList.addPropertyDefinitions(DefinitionConfigParser,ClassPathEnvironment) 23 7 1
de.smartics.properties.spi.config.validation.ConfigurationValidator.validate(PropertyCollection,Class) 23 10 1
de.smartics.properties.impl.config.cache.DependencyTrackingCache.getValidatedProperty(ConfigurationProperties,PropertyDescriptor,Object) 23 6 0
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserDefinitionKeyHelper.parse(String) 23 8 1
de.smartics.properties.impl.config.domain.key.envapp.AbstractDefinitionConfigParser.readFiles(String,Element) 22 5 1
de.smartics.properties.spi.config.support.MultiSourceProperties.contains(PropertyLocation,Object,Object) 20 6 0
de.smartics.properties.spi.config.ds.PropertiesStore.getProperty(String,String) 20 5 0
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserDefinitionConfigParser.parse(String,InputStream) 20 7 1
de.smartics.properties.impl.config.domain.key.envapp.EnvAppDefinitionConfigParser.parse(String,InputStream) 20 7 1
de.smartics.properties.impl.config.domain.key.envapp.EnvAppKeyListBuilder.createKeyList(ConfigurationKey) 20 4 0
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserDefinitionKeyHelper.parseEnvironmentKey(UserId,TenantId,String,StringTokenizer) 19 4 0
de.smartics.properties.impl.config.domain.key.envapp.EnvAppDefinitionKeyHelper.parseEnvironmentKey(String,StringTokenizer) 19 4 0
de.smartics.properties.spi.config.cache.CacheConfigurationPropertiesLoader.loadProperties() 18 6 0
de.smartics.properties.spi.config.support.ClassPathLoader.loadProperties(MultiSourcePropertiesManager) 18 6 0
de.smartics.properties.spi.config.support.ClassPathLoader.toString() 18 4 1
de.smartics.properties.spi.config.proxy.PropertiesProxyInvocationHandler.handlePropertyMethod(Method) 18 8 0
de.smartics.properties.impl.config.ds.DataSourceConfigurationPropertiesLoader.loadProperties() 18 6 0
de.smartics.properties.spi.config.transfer.PropertyProviderList.readDefinition(DefinitionConfigParser,ArtifactRef) 17 6 0
de.smartics.properties.spi.config.support.MultiSourceProperties.getValue(String,boolean) 17 9 0
de.smartics.properties.impl.config.ds.DataSourceConfigurationJndiLoader.load() 17 6 1
de.smartics.properties.spi.config.support.BootLoader.addProperties(MultiSourceProperties) 16 4 0
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserKeyListBuilder.addStaticKeys(ConfigurationKey,TenantUserConfigurationKey) 16 4 0
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserDefinitionKeyHelper.parseUserKey(String,StringTokenizer) 16 4 0
de.smartics.properties.impl.config.domain.key.envapp.AbstractPropertiesDefinitionContext.toString() 16 5 0
de.smartics.properties.spi.config.support.MappedPropertyCollection.iterator() 15 1 1
de.smartics.properties.spi.config.support.AbstractConfigurationProperties.resolveAndConvert(PropertyDescriptor,Object,Object) 15 7 1
de.smartics.properties.spi.config.support.PropertiesPropertyCollection.iterator() 15 1 1
de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesManagement.getValidatedProperty(PropertyDescriptor,Object) 15 12 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
7,427.00 3.62 1.61 0.56

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