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.exceptions.i18n.message 16 99 801 76 611 194 725
de.smartics.exceptions.i18n 17 174 562 150 1136 300 387
de.smartics.exceptions.i18n.context 3 16 79 6 31 38 121
de.smartics.exceptions.i18n.app 3 21 53 2 6 31 216
de.smartics.exceptions.ognl 1 4 15 5 32 11 41
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
40 314 1510 239 1816 574 1490

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
de.smartics.exceptions.i18n.message.DefaultMessageComposer 183 18 0 15
de.smartics.exceptions.i18n.message.IcuMessageComposer 162 16 0 2
de.smartics.exceptions.i18n.message.MessageParamParser 71 6 1 9
de.smartics.exceptions.i18n.AbstractMessageBean 67 26 0 23
de.smartics.exceptions.i18n.AbstractMessageException 65 25 0 18
de.smartics.exceptions.i18n.AbstractMessageRuntimeException 65 25 0 18
de.smartics.exceptions.i18n.AbstractLocalizedException 63 24 0 18
de.smartics.exceptions.i18n.AbstractLocalizedRuntimeException 59 21 0 16
de.smartics.exceptions.i18n.message.LocalizedInfo 56 16 0 17
de.smartics.exceptions.i18n.message.StructuredTextHandler 44 5 1 3
de.smartics.exceptions.i18n.CauseTrailMessages 36 6 0 4
de.smartics.exceptions.i18n.I18nExceptionContextManager 34 7 0 7
de.smartics.exceptions.i18n.message.MessageTemplateAnalyser 26 3 0 4
de.smartics.exceptions.i18n.message.Helper 25 4 0 5
de.smartics.exceptions.i18n.message.Messages 23 4 1 7
de.smartics.exceptions.i18n.app.ConfigurationExceptionCode 21 10 0 0
de.smartics.exceptions.i18n.app.ParseExceptionCode 21 10 0 0
de.smartics.exceptions.i18n.message.AbstractTextHandler 21 5 0 4
de.smartics.exceptions.i18n.context.AbstractI18nExceptionContext 20 5 0 2
de.smartics.exceptions.i18n.message.ParseException 18 6 0 7
de.smartics.exceptions.i18n.context.I18nExceptionContextProperty 17 8 0 0
de.smartics.exceptions.i18n.message.SingleLineTextHandler 16 2 0 3
de.smartics.exceptions.i18n.message.MessageType 15 5 0 0
de.smartics.exceptions.i18n.PropertyAccessConfigurationException 14 4 0 5
de.smartics.exceptions.i18n.context.SystemDefaultI18nExceptionContext 13 3 0 4
de.smartics.exceptions.i18n.DefaultI18nCodeMessageFormatter 13 5 0 2
de.smartics.exceptions.i18n.ConfigurationException 10 4 0 5
de.smartics.exceptions.i18n.message.MessageParamParser.MessageParamInfo 10 3 0 3
de.smartics.exceptions.i18n.MethodAccessConfigurationException 10 3 0 4
de.smartics.exceptions.ognl.OgnlExpression 10 4 0 5

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
de.smartics.exceptions.i18n.AbstractMessageBean 67 26 0 23
de.smartics.exceptions.i18n.AbstractMessageException 65 25 0 18
de.smartics.exceptions.i18n.AbstractMessageRuntimeException 65 25 0 18
de.smartics.exceptions.i18n.AbstractLocalizedException 63 24 0 18
de.smartics.exceptions.i18n.AbstractLocalizedRuntimeException 59 21 0 16
de.smartics.exceptions.i18n.message.DefaultMessageComposer 183 18 0 15
de.smartics.exceptions.i18n.message.IcuMessageComposer 162 16 0 2
de.smartics.exceptions.i18n.message.LocalizedInfo 56 16 0 17
de.smartics.exceptions.i18n.app.ConfigurationExceptionCode 21 10 0 0
de.smartics.exceptions.i18n.app.ParseExceptionCode 21 10 0 0
de.smartics.exceptions.i18n.context.I18nExceptionContextProperty 17 8 0 0
de.smartics.exceptions.i18n.LocalizedException 9 8 0 9
de.smartics.exceptions.i18n.I18nExceptionContextManager 34 7 0 7
de.smartics.exceptions.i18n.MessageBean 8 7 0 8
de.smartics.exceptions.i18n.CauseTrailMessages 36 6 0 4
de.smartics.exceptions.i18n.message.MessageParamParser 71 6 1 9
de.smartics.exceptions.i18n.message.ParseException 18 6 0 7
de.smartics.exceptions.i18n.context.AbstractI18nExceptionContext 20 5 0 2
de.smartics.exceptions.i18n.DefaultI18nCodeMessageFormatter 13 5 0 2
de.smartics.exceptions.i18n.message.AbstractTextHandler 21 5 0 4
de.smartics.exceptions.i18n.message.MessageType 15 5 0 0
de.smartics.exceptions.i18n.message.StructuredTextHandler 44 5 1 3
de.smartics.exceptions.i18n.ConfigurationException 10 4 0 5
de.smartics.exceptions.i18n.I18nExceptionContext 5 4 0 5
de.smartics.exceptions.i18n.message.Helper 25 4 0 5
de.smartics.exceptions.i18n.message.Messages 23 4 1 7
de.smartics.exceptions.i18n.PropertyAccessConfigurationException 14 4 0 5
de.smartics.exceptions.ognl.OgnlExpression 10 4 0 5
de.smartics.exceptions.i18n.context.SystemDefaultI18nExceptionContext 13 3 0 4
de.smartics.exceptions.i18n.I18nCodeMessageFormatter 4 3 0 4

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
31.48 1,510.00 0.08 7.85 6.10

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
de.smartics.exceptions.i18n.message.MessageParamParser.parse(String,String) 23 9 1
de.smartics.exceptions.i18n.message.DefaultMessageComposer.composeMessage(Object,Locale,ResourceBundle,String,MessageType) 22 8 0
de.smartics.exceptions.i18n.message.DefaultMessageComposer.supplyPropertyValues(Object,String,ResourceBundle,MessageFormat,MessageType,Object[],Method[]) 18 7 1
de.smartics.exceptions.i18n.message.DefaultMessageComposer.supplyPropertyValues(Object,String,ResourceBundle,MessageFormat,MessageType,Object[],Field[]) 17 7 1
de.smartics.exceptions.i18n.message.IcuMessageComposer.addMessageParamMethodArgs(Object,Class,Object,Locale,MessageType) 17 5 0
de.smartics.exceptions.i18n.message.DefaultMessageComposer.supplyParentPropertyValues(Object,String,ResourceBundle,MessageFormat,MessageType,Object[]) 16 6 1
de.smartics.exceptions.i18n.message.IcuMessageComposer.addMessageParamFieldArgs(Object,Class,Object,Locale,MessageType) 15 5 0
de.smartics.exceptions.i18n.message.IcuMessageComposer.applyOgnl(Object,Locale,String,MessageParamInfo,Object) 15 6 0
de.smartics.exceptions.i18n.message.IcuMessageComposer.getValue(Object,Method,Object[]) 15 11 0
de.smartics.exceptions.i18n.message.MessageTemplateAnalyser.maxIndex(String) 15 6 1
de.smartics.exceptions.i18n.message.StructuredTextHandler.appendWhatHasHappendMessage(Object,Locale,ClassLoader,StringBuilder,ResourceBundle) 15 7 0
de.smartics.exceptions.i18n.CauseTrailMessages.initCauseTrail(Locale,Throwable) 14 3 0
de.smartics.exceptions.i18n.I18nExceptionContextManager.fetchContextFromService(ClassLoader) 14 7 0
de.smartics.exceptions.i18n.message.DefaultMessageComposer.createLimitStrings(Object,String,String,int,ResourceBundle) 14 7 1
de.smartics.exceptions.i18n.message.DefaultMessageComposer.getValue(Object,String,String) 14 12 1
de.smartics.exceptions.i18n.message.IcuMessageComposer.getValue(Object,String,String) 14 12 0
de.smartics.exceptions.i18n.message.DefaultMessageComposer.getValue(Object,Field) 13 3 1
de.smartics.exceptions.i18n.message.IcuMessageComposer.getValue(Object,Field) 13 3 0
de.smartics.exceptions.i18n.message.MessageParamParser.parseToken(String,MessageParamInfo,String,int) 13 7 1
de.smartics.exceptions.i18n.message.Helper.capitalize(String) 12 7 1
de.smartics.exceptions.i18n.message.IcuMessageComposer.addParentMessageParamArgs(Object,Object,Locale,MessageType,Class) 12 4 0
de.smartics.exceptions.i18n.message.DefaultMessageComposer.getValue(Object,Method) 11 10 0
de.smartics.exceptions.i18n.message.DefaultMessageComposer.getProperty(Object,String) 11 8 1
de.smartics.exceptions.i18n.message.IcuMessageComposer.getProperty(Object,String) 11 8 0
de.smartics.exceptions.i18n.message.MessageParamParser.parseParentMessageParam(String) 11 5 1
de.smartics.exceptions.i18n.message.SingleLineTextHandler.getMessage(Object,Locale,ClassLoader) 11 3 1
de.smartics.exceptions.i18n.CauseTrailMessages.toString() 10 4 0
de.smartics.exceptions.i18n.message.StructuredTextHandler.fetchMessageBundle(Locale,ClassLoader) 10 3 0
de.smartics.exceptions.i18n.message.DefaultMessageComposer.getFieldValue(Object,Field) 9 4 1
de.smartics.exceptions.i18n.message.Helper.split(String,String) 9 5 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,510.00 3.68 1.73 0.65

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