Fork me on GitHub

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.lexicalscope.fluentreflection9552817847849215767
com.lexicalscope.fluentreflection.bean2765220221060
com.lexicalscope.fluentreflection.dynamicproxy142916300060
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
13662221678051315887

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
com.lexicalscope.fluentreflection.bean.BeanMap12410102
com.lexicalscope.fluentreflection.ReflectionMatchers1215017
com.lexicalscope.fluentreflection.dynamicproxy.Implementing1181660
com.lexicalscope.fluentreflection.FluentMethodImpl1122010
com.lexicalscope.fluentreflection.FluentClassImpl1084201
com.lexicalscope.fluentreflection.FluentObjectImpl954100
com.lexicalscope.fluentreflection.bean.BeanMap.BeanMapImpl851420
com.lexicalscope.fluentreflection.FluentFieldImpl831710
com.lexicalscope.fluentreflection.BoundFluentMemberImpl601910
com.lexicalscope.fluentreflection.FluentConstructorImpl461410
com.lexicalscope.fluentreflection.ReflectedMembersImpl441400
com.lexicalscope.fluentreflection.ReflectedFieldsImpl29400
com.lexicalscope.fluentreflection.bean.MapBean29210
com.lexicalscope.fluentreflection.bean.BeanMap.BeanMapImpl.BeanMapEntrySet29210
com.lexicalscope.fluentreflection.ReflectedMethodsImpl28400
com.lexicalscope.fluentreflection.FluentAccess2827027
com.lexicalscope.fluentreflection.TypeHierarchyCalculation27500
com.lexicalscope.fluentreflection.bean.MapBean.Implementing24070
com.lexicalscope.fluentreflection.bean.BeanMap.BeanMapImpl.BeanMapEntrySet.Iterator24310
com.lexicalscope.fluentreflection.MatcherArgumentTypes21500
com.lexicalscope.fluentreflection.bean.BeanMapBuilderImpl21510
com.lexicalscope.fluentreflection.FieldNotFoundException20700
com.lexicalscope.fluentreflection.MethodNotFoundException20700
com.lexicalscope.fluentreflection.MatcherReturnType17500
com.lexicalscope.fluentreflection.bean.BeanMap.BeanMapImpl.BeanMapEntrySet.Iterator.Entry17600
com.lexicalscope.fluentreflection.ReflectedTypeFactoryImpl17800
com.lexicalscope.fluentreflection.MatcherOr16403
com.lexicalscope.fluentreflection.ReflectionMatcher16303
com.lexicalscope.fluentreflection.FluentAnnotatedImpl16600
com.lexicalscope.fluentreflection.MatcherAnd16403

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
com.lexicalscope.fluentreflection.ReflectionMatchers1215017
com.lexicalscope.fluentreflection.FluentClassImpl1084201
com.lexicalscope.fluentreflection.FluentObjectImpl954100
com.lexicalscope.fluentreflection.FluentAccess2827027
com.lexicalscope.fluentreflection.FluentMethodImpl1122010
com.lexicalscope.fluentreflection.BoundFluentMemberImpl601910
com.lexicalscope.fluentreflection.FluentFieldImpl831710
com.lexicalscope.fluentreflection.dynamicproxy.Implementing1181660
com.lexicalscope.fluentreflection.ReflectedMembersImpl441400
com.lexicalscope.fluentreflection.FluentConstructorImpl461410
com.lexicalscope.fluentreflection.bean.BeanMap.BeanMapImpl851420
com.lexicalscope.fluentreflection.ReflectedMembers141300
com.lexicalscope.fluentreflection.FluentMember1413013
com.lexicalscope.fluentreflection.bean.BeanMap12410102
com.lexicalscope.fluentreflection.ReflectedTypeFactoryImpl17800
com.lexicalscope.fluentreflection.ReflectedTypeFactory8700
com.lexicalscope.fluentreflection.FluentClass8708
com.lexicalscope.fluentreflection.FieldNotFoundException20700
com.lexicalscope.fluentreflection.FluentReflection16701
com.lexicalscope.fluentreflection.MethodNotFoundException20700
com.lexicalscope.fluentreflection.IllegalArgumentRuntimeException14600
com.lexicalscope.fluentreflection.FluentAnnotatedImpl16600
com.lexicalscope.fluentreflection.bean.BeanMap.BeanMapImpl.BeanMapEntrySet.Iterator.Entry17600
com.lexicalscope.fluentreflection.MatcherReflectingOn14500
com.lexicalscope.fluentreflection.TypeHierarchyCalculation27500
com.lexicalscope.fluentreflection.MatcherReturnType17500
com.lexicalscope.fluentreflection.MatcherArgumentTypes21500
com.lexicalscope.fluentreflection.AbstractFluentAnnotated12500
com.lexicalscope.fluentreflection.InstantiationRuntimeException11500
com.lexicalscope.fluentreflection.bean.BeanMapBuilder6500

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
15.012,167.000.254.570.59

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
com.lexicalscope.fluentreflection.FluentMethodImpl.toString()2760
com.lexicalscope.fluentreflection.bean.MapBean.bean(T,Object)2610
com.lexicalscope.fluentreflection.bean.BeanMap.BeanMapImpl.BeanMapEntrySet.iterator()2610
com.lexicalscope.fluentreflection.dynamicproxy.Implementing.invoke(Object,Method,Object[])2590
com.lexicalscope.fluentreflection.bean.BeanMap.BeanMapImpl.BeanMapEntrySet.Iterator.next()1910
com.lexicalscope.fluentreflection.FluentFieldImpl.toString()1740
com.lexicalscope.fluentreflection.ReflectionMatchers.canBeCalledWithArguments(Object)1550
com.lexicalscope.fluentreflection.FluentFieldImpl.callRaw(Object)14130
com.lexicalscope.fluentreflection.dynamicproxy.Implementing.whenProxying(FluentMethod)1150
com.lexicalscope.fluentreflection.FluentMethodImpl.invokeMethod(Object,Object[])1090
com.lexicalscope.fluentreflection.dynamicproxy.Implementing.registerDeclaredMethods()1030
com.lexicalscope.fluentreflection.MatcherArgumentTypes.matchesSafely(FluentMember)960
com.lexicalscope.fluentreflection.FluentMethodImpl.callRaw(Object)950
com.lexicalscope.fluentreflection.FluentMethodImpl.property()980
com.lexicalscope.fluentreflection.dynamicproxy.Implementing.MethodInvoker.body()960
com.lexicalscope.fluentreflection.ReflectedFieldsImpl.fields()930
com.lexicalscope.fluentreflection.bean.BeanMap.BeanMapImpl.containsValue(Object)970
com.lexicalscope.fluentreflection.Visibility.visibilityFromModifiers(int)870
com.lexicalscope.fluentreflection.ReflectedMethodsImpl.methods()830
com.lexicalscope.fluentreflection.BoundFluentMemberImpl.equals(Object)870
com.lexicalscope.fluentreflection.FluentConstructorImpl.callRaw(Object)880
com.lexicalscope.fluentreflection.FluentFieldImpl.FluentFieldImpl(ReflectedTypeFactory,FluentClass,TypeLiteral,Field)820
com.lexicalscope.fluentreflection.bean.BeanMap.BeanMapImpl.put(String,Object)840
com.lexicalscope.fluentreflection.TypeHierarchyCalculation.queueSuperclassAndInterfaces(TypeLiteral)740
com.lexicalscope.fluentreflection.TypeHierarchyCalculation.processClass(TypeLiteral)630
com.lexicalscope.fluentreflection.ReflectedMembersImpl.ReflectedMembersImpl(ReflectedTypeFactory,T)610
com.lexicalscope.fluentreflection.FluentMethodImpl.FluentMethodImpl(ReflectedTypeFactory,FluentClass,TypeLiteral,Method)610
com.lexicalscope.fluentreflection.ReflectedMethodsImpl.getDeclaredMethodsOfClass(TypeLiteral)620
com.lexicalscope.fluentreflection.dynamicproxy.Implementing.matcherForMethodSignature(FluentMethod)610
com.lexicalscope.fluentreflection.ReflectedFieldsImpl.getDeclaredFieldsOfClass(TypeLiteral)620

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
2,167.002.641.360.10

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