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.

PackageClassesMethodsNCSSJavadocsJavadoc linesSingle lines commentMulti lines comment
com.pholser.util.properties.internal.conversions1234224002288
com.pholser.util.properties.internal1042205001240
com.pholser.util.properties445138161741305
com.pholser.util.properties.internal.validation187400024
com.pholser.util.properties.internal.exceptions111272000264
com.pholser.util.properties.internal.separators4135700196
com.pholser.util.properties.internal.defaultvalues4105200196
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
461648221617461313

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
com.pholser.util.properties.internal.conversions.ValueConverterFactory63800
com.pholser.util.properties.internal.validation.SchemaValidator52800
com.pholser.util.properties.internal.ValidatedSchema33700
com.pholser.util.properties.PropertyBinder3011010
com.pholser.util.properties.SystemProperties292801
com.pholser.util.properties.internal.conversions.ListValueConverter25400
com.pholser.util.properties.internal.Schemata21800
com.pholser.util.properties.internal.Substitutions21400
com.pholser.util.properties.internal.PropertyBinderInvocationHandler18400
com.pholser.util.properties.SubstitutableProperties18503
com.pholser.util.properties.internal.separators.SubstitutableRegexValueSeparator16400
com.pholser.util.properties.internal.conversions.ArrayValueConverter15300
com.pholser.util.properties.internal.Reflection15300
com.pholser.util.properties.internal.conversions.ConstructorInvokingValueConverter14200
com.pholser.util.properties.internal.defaultvalues.SubstitutableDefaultValue14300
com.pholser.util.properties.internal.InternalBoundProperty14600
com.pholser.util.properties.internal.ResourceBundlePropertySource12300
com.pholser.util.properties.internal.conversions.SimpleDateFormatParseValueConverter11200
com.pholser.util.properties.internal.defaultvalues.ConvertedDefaultValue11400
com.pholser.util.properties.internal.separators.RegexValueSeparator11400
com.pholser.util.properties.internal.conversions.MethodInvokingValueConverter10200
com.pholser.util.properties.internal.MapPropertySource10300
com.pholser.util.properties.internal.conversions.AggregateValueConverter8300
com.pholser.util.properties.internal.separators.ValueSeparatorFactory8200
com.pholser.util.properties.internal.IO7200
com.pholser.util.properties.internal.exceptions.ValueConversionException6200
com.pholser.util.properties.internal.conversions.CharacterValueOfConverter5100
com.pholser.util.properties.internal.conversions.RawValueConverter5200
com.pholser.util.properties.internal.conversions.ValueConverter5400
com.pholser.util.properties.internal.defaultvalues.DefaultValueFactory5100

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
com.pholser.util.properties.SystemProperties292801
com.pholser.util.properties.PropertyBinder3011010
com.pholser.util.properties.internal.conversions.ValueConverterFactory63800
com.pholser.util.properties.internal.Schemata21800
com.pholser.util.properties.internal.validation.SchemaValidator52800
com.pholser.util.properties.internal.ValidatedSchema33700
com.pholser.util.properties.internal.InternalBoundProperty14600
com.pholser.util.properties.SubstitutableProperties18503
com.pholser.util.properties.internal.conversions.ListValueConverter25400
com.pholser.util.properties.internal.conversions.ValueConverter5400
com.pholser.util.properties.internal.defaultvalues.ConvertedDefaultValue11400
com.pholser.util.properties.internal.PropertyBinderInvocationHandler18400
com.pholser.util.properties.internal.separators.RegexValueSeparator11400
com.pholser.util.properties.internal.separators.SubstitutableRegexValueSeparator16400
com.pholser.util.properties.internal.Substitutions21400
com.pholser.util.properties.internal.conversions.AggregateValueConverter8300
com.pholser.util.properties.internal.conversions.ArrayValueConverter15300
com.pholser.util.properties.internal.defaultvalues.SubstitutableDefaultValue14300
com.pholser.util.properties.internal.MapPropertySource10300
com.pholser.util.properties.internal.Reflection15300
com.pholser.util.properties.internal.ResourceBundlePropertySource12300
com.pholser.util.properties.internal.separators.ValueSeparator4300
com.pholser.util.properties.internal.conversions.ConstructorInvokingValueConverter14200
com.pholser.util.properties.internal.conversions.MethodInvokingValueConverter10200
com.pholser.util.properties.internal.conversions.RawValueConverter5200
com.pholser.util.properties.internal.conversions.ScalarValueConverter4200
com.pholser.util.properties.internal.conversions.SimpleDateFormatParseValueConverter11200
com.pholser.util.properties.internal.defaultvalues.DefaultValue3200
com.pholser.util.properties.internal.exceptions.ValueConversionException6200
com.pholser.util.properties.internal.IO7200

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
12.46822.000.003.570.35

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
com.pholser.util.properties.internal.conversions.ValueConverterFactory.createScalarConverter(Class,ParsedAs,DefaultsTo,ValueSeparator)14110
com.pholser.util.properties.internal.validation.SchemaValidator.validate(T)1320
com.pholser.util.properties.internal.conversions.ListValueConverter.deduceElementType(Type)12100
com.pholser.util.properties.internal.validation.SchemaValidator.createDefaultValue(Method,ValueConverter)1190
com.pholser.util.properties.internal.conversions.ConstructorInvokingValueConverter.convert(String,Object)10100
com.pholser.util.properties.internal.validation.SchemaValidator.collectSeparatorIfAggregateType(ValueSeparator,Method,BoundProperty)1080
com.pholser.util.properties.internal.conversions.ValueConverterFactory.createConverter(Method,ValueSeparator)950
com.pholser.util.properties.internal.ValidatedSchema.convert(PropertySource,Method,Object)950
com.pholser.util.properties.SubstitutableProperties.toString()930
com.pholser.util.properties.internal.Reflection.invokeQuietly(Method,Object,Object)880
com.pholser.util.properties.internal.Substitutions.substituteReferences(PropertySource,CharSequence)830
com.pholser.util.properties.internal.conversions.SimpleDateFormatParseValueConverter.convert(String,Object)750
com.pholser.util.properties.internal.conversions.ValueConverterFactory.valueOfConverter(Class)760
com.pholser.util.properties.internal.Substitutions.substitute(PropertySource,String)720
com.pholser.util.properties.internal.conversions.ArrayValueConverter.convert(String,Object)620
com.pholser.util.properties.internal.conversions.ListValueConverter.convert(String,Object)620
com.pholser.util.properties.internal.conversions.ValueConverterFactory.parsePatternsConverter(Class,ParsedAs)660
com.pholser.util.properties.internal.PropertyBinderInvocationHandler.handleObjectMethod(Object,Method,Object[])650
com.pholser.util.properties.internal.ValidatedSchema.evaluate(PropertySource)630
com.pholser.util.properties.PropertyBinder.bind(File)621
com.pholser.util.properties.internal.conversions.ArrayValueConverter.ArrayValueConverter(Class,ValueSeparator,ParsedAs,DefaultsTo)410
com.pholser.util.properties.internal.conversions.CharacterValueOfConverter.convert(String,Object)430
com.pholser.util.properties.internal.conversions.MethodInvokingValueConverter.convert(String,Object)440
com.pholser.util.properties.internal.conversions.ValueConverterFactory.constructorConverter(Class)430
com.pholser.util.properties.internal.defaultvalues.ConvertedDefaultValue.ConvertedDefaultValue(String,ValueConverter,Method)430
com.pholser.util.properties.internal.defaultvalues.DefaultValueFactory.createDefaultValue(DefaultsTo,ValueConverter,Method)430
com.pholser.util.properties.internal.defaultvalues.SubstitutableDefaultValue.SubstitutableDefaultValue(DefaultsTo,ValueConverter,Method)410
com.pholser.util.properties.internal.IO.closeQuietly(InputStream)430
com.pholser.util.properties.internal.MapPropertySource.MapPropertySource(String)430
com.pholser.util.properties.internal.PropertyBinderInvocationHandler.invoke(Object,Method,Object[])430

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
822.002.871.880.07

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 declarationpackage java.lang;
Import declarationimport java.awt.*;
Class declaration
  • public class Foo {
  • public class Foo extends Bla {
Interface declarationpublic interface Able ; {
Field declaration
  • int a;
  • int a, b, c = 5, d = 6;
Method declaration
  • public void cry();
  • public void gib() throws DeadException {
Constructor declarationpublic Foo() {
Constructor invocation
  • this();
  • super();
Statement declaration
  • i = 0;
  • if (ok)
  • if (exit) {
  • if (3 == 4);
  • if (4 == 4) { ;
  • } else {
Label declarationfine :

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