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
com.pholser.util.properties.internal.conversions 12 34 224 0 0 2 288
com.pholser.util.properties.internal 9 35 185 0 0 6 216
com.pholser.util.properties 4 45 137 16 174 1 298
com.pholser.util.properties.internal.validation 1 8 73 0 0 0 24
com.pholser.util.properties.internal.exceptions 11 12 72 0 0 0 264
com.pholser.util.properties.internal.separators 4 13 57 0 0 1 96
com.pholser.util.properties.internal.defaultvalues 4 10 52 0 0 1 96
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
45 157 800 16 174 11 1282

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
com.pholser.util.properties.internal.conversions.ValueConverterFactory 63 8 0 0
com.pholser.util.properties.internal.validation.SchemaValidator 52 8 0 0
com.pholser.util.properties.internal.ValidatedSchema 33 7 0 0
com.pholser.util.properties.PropertyBinder 30 11 0 10
com.pholser.util.properties.SystemProperties 29 28 0 1
com.pholser.util.properties.internal.conversions.ListValueConverter 25 4 0 0
com.pholser.util.properties.internal.Schemata 22 8 0 0
com.pholser.util.properties.internal.Substitutions 20 3 0 0
com.pholser.util.properties.SubstitutableProperties 18 5 0 3
com.pholser.util.properties.internal.PropertyBinderInvocationHandler 18 4 0 0
com.pholser.util.properties.internal.Reflection 16 3 0 0
com.pholser.util.properties.internal.separators.SubstitutableRegexValueSeparator 16 4 0 0
com.pholser.util.properties.internal.conversions.ArrayValueConverter 15 3 0 0
com.pholser.util.properties.internal.conversions.ConstructorInvokingValueConverter 14 2 0 0
com.pholser.util.properties.internal.defaultvalues.SubstitutableDefaultValue 14 3 0 0
com.pholser.util.properties.internal.ResourceBundlePropertySource 12 3 0 0
com.pholser.util.properties.internal.conversions.SimpleDateFormatParseValueConverter 11 2 0 0
com.pholser.util.properties.internal.defaultvalues.ConvertedDefaultValue 11 4 0 0
com.pholser.util.properties.internal.separators.RegexValueSeparator 11 4 0 0
com.pholser.util.properties.internal.MapPropertySource 10 3 0 0
com.pholser.util.properties.internal.conversions.MethodInvokingValueConverter 10 2 0 0
com.pholser.util.properties.internal.IO 8 2 0 0
com.pholser.util.properties.internal.conversions.AggregateValueConverter 8 3 0 0
com.pholser.util.properties.internal.separators.ValueSeparatorFactory 8 2 0 0
com.pholser.util.properties.internal.Objects 6 2 0 0
com.pholser.util.properties.internal.exceptions.ValueConversionException 6 2 0 0
com.pholser.util.properties.internal.conversions.CharacterValueOfConverter 5 1 0 0
com.pholser.util.properties.internal.conversions.RawValueConverter 5 2 0 0
com.pholser.util.properties.internal.conversions.ValueConverter 5 4 0 0
com.pholser.util.properties.internal.defaultvalues.DefaultValueFactory 5 1 0 0

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
com.pholser.util.properties.SystemProperties 29 28 0 1
com.pholser.util.properties.PropertyBinder 30 11 0 10
com.pholser.util.properties.internal.Schemata 22 8 0 0
com.pholser.util.properties.internal.conversions.ValueConverterFactory 63 8 0 0
com.pholser.util.properties.internal.validation.SchemaValidator 52 8 0 0
com.pholser.util.properties.internal.ValidatedSchema 33 7 0 0
com.pholser.util.properties.SubstitutableProperties 18 5 0 3
com.pholser.util.properties.internal.PropertyBinderInvocationHandler 18 4 0 0
com.pholser.util.properties.internal.conversions.ListValueConverter 25 4 0 0
com.pholser.util.properties.internal.conversions.ValueConverter 5 4 0 0
com.pholser.util.properties.internal.defaultvalues.ConvertedDefaultValue 11 4 0 0
com.pholser.util.properties.internal.separators.RegexValueSeparator 11 4 0 0
com.pholser.util.properties.internal.separators.SubstitutableRegexValueSeparator 16 4 0 0
com.pholser.util.properties.internal.MapPropertySource 10 3 0 0
com.pholser.util.properties.internal.Reflection 16 3 0 0
com.pholser.util.properties.internal.ResourceBundlePropertySource 12 3 0 0
com.pholser.util.properties.internal.Substitutions 20 3 0 0
com.pholser.util.properties.internal.conversions.AggregateValueConverter 8 3 0 0
com.pholser.util.properties.internal.conversions.ArrayValueConverter 15 3 0 0
com.pholser.util.properties.internal.defaultvalues.SubstitutableDefaultValue 14 3 0 0
com.pholser.util.properties.internal.separators.ValueSeparator 4 3 0 0
com.pholser.util.properties.internal.IO 8 2 0 0
com.pholser.util.properties.internal.Objects 6 2 0 0
com.pholser.util.properties.internal.conversions.ConstructorInvokingValueConverter 14 2 0 0
com.pholser.util.properties.internal.conversions.MethodInvokingValueConverter 10 2 0 0
com.pholser.util.properties.internal.conversions.RawValueConverter 5 2 0 0
com.pholser.util.properties.internal.conversions.ScalarValueConverter 4 2 0 0
com.pholser.util.properties.internal.conversions.SimpleDateFormatParseValueConverter 11 2 0 0
com.pholser.util.properties.internal.defaultvalues.DefaultValue 3 2 0 0
com.pholser.util.properties.internal.exceptions.ValueConversionException 6 2 0 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
12.49 800.00 0.00 3.49 0.36

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
com.pholser.util.properties.internal.conversions.ValueConverterFactory.createScalarConverter(Class,ParsedAs,DefaultsTo,ValueSeparator) 14 11 0
com.pholser.util.properties.internal.validation.SchemaValidator.validate(T) 13 2 0
com.pholser.util.properties.internal.conversions.ListValueConverter.deduceElementType(Type) 12 10 0
com.pholser.util.properties.internal.validation.SchemaValidator.createDefaultValue(Method,ValueConverter) 11 9 0
com.pholser.util.properties.internal.conversions.ConstructorInvokingValueConverter.convert(String,Object) 10 10 0
com.pholser.util.properties.internal.validation.SchemaValidator.collectSeparatorIfAggregateType(ValueSeparator,Method,String) 10 8 0
com.pholser.util.properties.SubstitutableProperties.toString() 9 3 0
com.pholser.util.properties.internal.ValidatedSchema.convert(PropertySource,Method,Object) 9 5 0
com.pholser.util.properties.internal.conversions.ValueConverterFactory.createConverter(Method,ValueSeparator) 9 5 0
com.pholser.util.properties.internal.Reflection.invokeQuietly(Method,Object,Object) 8 8 0
com.pholser.util.properties.internal.Substitutions.substituteReferences(PropertySource,CharSequence) 8 3 0
com.pholser.util.properties.internal.Substitutions.substitute(PropertySource,String) 7 2 0
com.pholser.util.properties.internal.conversions.SimpleDateFormatParseValueConverter.convert(String,Object) 7 5 0
com.pholser.util.properties.internal.conversions.ValueConverterFactory.valueOfConverter(Class) 7 6 0
com.pholser.util.properties.PropertyBinder.bind(File) 6 2 1
com.pholser.util.properties.internal.PropertyBinderInvocationHandler.handleObjectMethod(Object,Method,Object[]) 6 5 0
com.pholser.util.properties.internal.ValidatedSchema.evaluate(PropertySource) 6 3 0
com.pholser.util.properties.internal.conversions.ArrayValueConverter.convert(String,Object) 6 2 0
com.pholser.util.properties.internal.conversions.ListValueConverter.convert(String,Object) 6 2 0
com.pholser.util.properties.internal.conversions.ValueConverterFactory.parsePatternsConverter(Class,ParsedAs) 6 6 0
com.pholser.util.properties.PropertyBinder.loadProperties(InputStream) 4 1 0
com.pholser.util.properties.internal.IO.closeQuietly(InputStream) 4 3 0
com.pholser.util.properties.internal.MapPropertySource.MapPropertySource(String) 4 3 0
com.pholser.util.properties.internal.PropertyBinderInvocationHandler.invoke(Object,Method,Object[]) 4 3 0
com.pholser.util.properties.internal.Reflection.invokeQuietly(Class,String,Object,Object) 4 4 0
com.pholser.util.properties.internal.ResourceBundlePropertySource.ResourceBundlePropertySource(ResourceBundle) 4 3 0
com.pholser.util.properties.internal.ResourceBundlePropertySource.propertyFor(String) 4 3 0
com.pholser.util.properties.internal.Schemata.annotationDefault(Annotation,String) 4 4 0
com.pholser.util.properties.internal.ValidatedSchema.ValidatedSchema(T,DefaultValue,ValueConverter) 4 1 0
com.pholser.util.properties.internal.conversions.ArrayValueConverter.ArrayValueConverter(Class,ValueSeparator,ParsedAs,DefaultsTo) 4 1 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
800.00 2.87 1.87 0.08

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