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 33 308 1899 125 865 329 796
de.smartics.properties.api.config.domain 44 205 736 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 104 413 84 466 174 485
de.smartics.properties.impl.config.ds 10 50 346 39 253 102 253
de.smartics.properties.impl.config.cache 4 70 329 15 76 55 142
de.smartics.properties.api.config.domain.key 7 51 272 51 353 52 192
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.impl.config.jndi 6 24 140 14 86 58 156
de.smartics.properties.spi.config.domain.key 6 25 132 27 147 62 156
de.smartics.properties.api.config.app 5 31 123 36 293 41 132
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.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.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
224 1364 7101 970 6616 2288 5753

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
de.smartics.properties.spi.config.support.ClassPathLoader 187 23 0 10
de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesFactory 165 23 1 4
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.impl.config.domain.key.rtaware.TenantUserDefinitionKeyHelper 116 15 0 4
de.smartics.properties.spi.config.support.InMemoryConfigurationRepositoryManagement 116 18 0 6
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.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.support.BootLoader 66 7 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.impl.config.jndi.JndiConfigurationProperties 63 7 1 5
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserKeyListBuilder 60 7 0 2
de.smartics.properties.spi.config.support.AbstractInMemoryConfigurationProperties 60 9 1 7
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

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 165 23 1 4
de.smartics.properties.spi.config.support.ClassPathLoader 187 23 0 10
de.smartics.properties.spi.config.domain.ConfigurationPropertiesManagementProxy 44 18 0 3
de.smartics.properties.spi.config.support.InMemoryConfigurationRepositoryManagement 116 18 0 6
de.smartics.properties.spi.config.ds.DefaultDataSourceManager 147 16 1 12
de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesFactory.ConfigurationPropertiesManagementFactory 33 16 0 0
de.smartics.properties.api.config.domain.key.ApplicationIdLoader 98 15 0 10
de.smartics.properties.impl.config.domain.key.envapp.AbstractPropertiesDefinitionContext 74 15 0 12
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserDefinitionKeyHelper 116 15 0 4
de.smartics.properties.spi.config.support.InMemoryPropertiesManager 83 15 0 5
de.smartics.properties.api.config.domain.ConfigurationPropertiesManagement 15 14 0 15
de.smartics.properties.spi.config.support.MultiSourceProperties 96 14 0 6
de.smartics.properties.spi.config.ds.PropertiesStore 117 13 1 7
de.smartics.properties.api.config.app.ConfigurationPropertiesFactory 13 12 0 13
de.smartics.properties.spi.config.proxy.PropertyMethodNameUtilities 73 12 0 3
de.smartics.properties.api.config.app.FactoryConfiguration 43 11 0 12
de.smartics.properties.api.config.domain.ConfigurationValidationException 42 11 0 12
de.smartics.properties.api.config.domain.Property 40 11 0 12
de.smartics.properties.impl.config.cache.DependencyTrackingCache 104 11 0 5
de.smartics.properties.impl.config.domain.key.envapp.AbstractDefinitionConfigParser 81 11 0 11
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserConfigurationKey 56 11 0 8
de.smartics.properties.impl.config.ds.AutodetectDataSourceConfigurationPropertiesFactory 64 11 0 3
de.smartics.properties.spi.config.proxy.PropertiesProxyInvocationHandler 65 11 0 5
de.smartics.properties.api.config.domain.key.ApplicationId 71 10 0 11

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
26.11 7,101.00 0.08 6.09 4.43

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesFactory.createFactory() 35 1 0
de.smartics.properties.impl.config.cache.DependencyTrackingCache.getProperty(ConfigurationProperties,PropertyDescriptor,Object) 24 7 0
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.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.domain.key.envapp.AbstractDefinitionConfigParser.readFiles(String,Element) 22 5 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.TenantUserDefinitionConfigParser.parse(String,InputStream) 20 7 1
de.smartics.properties.spi.config.ds.PropertiesStore.getProperty(String,String) 20 5 0
de.smartics.properties.spi.config.support.MultiSourceProperties.contains(PropertyLocation,Object,Object) 20 6 0
de.smartics.properties.impl.config.domain.key.envapp.EnvAppDefinitionKeyHelper.parseEnvironmentKey(String,StringTokenizer) 19 4 0
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserDefinitionKeyHelper.parseEnvironmentKey(UserId,TenantId,String,StringTokenizer) 19 4 0
de.smartics.properties.impl.config.ds.DataSourceConfigurationPropertiesLoader.loadProperties() 18 6 0
de.smartics.properties.spi.config.cache.CacheConfigurationPropertiesLoader.loadProperties() 18 6 0
de.smartics.properties.spi.config.proxy.PropertiesProxyInvocationHandler.handlePropertyMethod(Method) 18 8 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.api.config.app.FactoryConfiguration.createDecrypter() 17 7 1
de.smartics.properties.impl.config.ds.DataSourceConfigurationJndiLoader.load() 17 6 1
de.smartics.properties.spi.config.support.MultiSourceProperties.getValue(String,boolean) 17 9 0
de.smartics.properties.spi.config.transfer.PropertyProviderList.readDefinition(DefinitionConfigParser,ArtifactRef) 17 6 0
de.smartics.properties.impl.config.domain.key.envapp.AbstractPropertiesDefinitionContext.toString() 16 5 0
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserDefinitionKeyHelper.parseUserKey(String,StringTokenizer) 16 4 0
de.smartics.properties.impl.config.domain.key.rtaware.TenantUserKeyListBuilder.addStaticKeys(ConfigurationKey,TenantUserConfigurationKey) 16 4 0
de.smartics.properties.spi.config.support.BootLoader.addProperties(MultiSourceProperties) 16 4 0
de.smartics.properties.impl.config.domain.key.envapp.EnvAppDefinitionKeyHelper.parse(String) 15 6 1
de.smartics.properties.spi.config.domain.key.ConfigurationKeyContextManager.createContext() 15 6 0
de.smartics.properties.spi.config.ds.DefaultDataSourceManager.getConfigurationKeys() 15 5 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
7,101.00 3.65 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).