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
org.andromda.cartridges.jsf.metafacades 26 395 2331 401 1710 80 58
org.andromda.cartridges.jsf 3 52 540 53 275 16 208
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
29 447 2871 454 1985 96 266

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.andromda.cartridges.jsf.metafacades.JSFParameterLogicImpl 469 62 0 63
org.andromda.cartridges.jsf.JSFUtils 422 52 0 51
org.andromda.cartridges.jsf.metafacades.JSFUseCaseLogicImpl 300 42 3 40
org.andromda.cartridges.jsf.metafacades.JSFActionLogicImpl 295 48 1 49
org.andromda.cartridges.jsf.metafacades.JSFAttributeLogicImpl 253 45 0 46
org.andromda.cartridges.jsf.metafacades.JSFManageableEntityAttributeLogicImpl 210 48 0 48
org.andromda.cartridges.jsf.metafacades.JSFManageableEntityLogicImpl 187 58 3 58
org.andromda.cartridges.jsf.metafacades.JSFViewLogicImpl 142 25 0 26
org.andromda.cartridges.jsf.JSFProfile 46 0 0 1
org.andromda.cartridges.jsf.metafacades.JSFForwardLogicImpl 44 10 0 11
org.andromda.cartridges.jsf.JSFGlobals 42 0 0 1
org.andromda.cartridges.jsf.metafacades.JSFControllerOperationLogicImpl 39 8 0 9
org.andromda.cartridges.jsf.metafacades.JSFControllerLogicImpl 32 8 0 8
org.andromda.cartridges.jsf.metafacades.JSFManageableEntityAssociationEndLogicImpl 32 8 0 9
org.andromda.cartridges.jsf.metafacades.JSFExceptionHandlerLogicImpl 23 5 0 6
org.andromda.cartridges.jsf.metafacades.JSFEventLogicImpl 22 6 0 7
org.andromda.cartridges.jsf.metafacades.JSFFinalStateLogicImpl 19 2 0 3
org.andromda.cartridges.jsf.metafacades.JSFPortletPreferencesLogicImpl 14 2 0 3
org.andromda.cartridges.jsf.metafacades.JSFActionLogicImpl.Predicate 12 1 0 0
org.andromda.cartridges.jsf.metafacades.JSFEnumerationLogicImpl 12 5 0 6
org.andromda.cartridges.jsf.metafacades.JSFBackendServiceLogicImpl 10 3 0 4
org.andromda.cartridges.jsf.metafacades.JSFSessionObjectLogicImpl 6 2 0 3
org.andromda.cartridges.jsf.metafacades.JSFUseCaseLogicImpl.Predicate 5 1 0 0
org.andromda.cartridges.jsf.metafacades.JSFActivityGraphLogicImpl 4 1 0 2
org.andromda.cartridges.jsf.metafacades.JSFManageableEntityLogicImpl.Predicate 3 1 0 0
org.andromda.cartridges.jsf.metafacades.JSFUseCaseLogicImpl.Predicate 3 1 0 0
org.andromda.cartridges.jsf.metafacades.JSFUseCaseLogicImpl.Transformer 3 1 0 0
org.andromda.cartridges.jsf.metafacades.JSFManageableEntityLogicImpl.Closure 2 1 0 0
org.andromda.cartridges.jsf.metafacades.JSFManageableEntityLogicImpl.Transformer 2 1 0 0

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.andromda.cartridges.jsf.metafacades.JSFParameterLogicImpl 469 62 0 63
org.andromda.cartridges.jsf.metafacades.JSFManageableEntityLogicImpl 187 58 3 58
org.andromda.cartridges.jsf.JSFUtils 422 52 0 51
org.andromda.cartridges.jsf.metafacades.JSFActionLogicImpl 295 48 1 49
org.andromda.cartridges.jsf.metafacades.JSFManageableEntityAttributeLogicImpl 210 48 0 48
org.andromda.cartridges.jsf.metafacades.JSFAttributeLogicImpl 253 45 0 46
org.andromda.cartridges.jsf.metafacades.JSFUseCaseLogicImpl 300 42 3 40
org.andromda.cartridges.jsf.metafacades.JSFViewLogicImpl 142 25 0 26
org.andromda.cartridges.jsf.metafacades.JSFForwardLogicImpl 44 10 0 11
org.andromda.cartridges.jsf.metafacades.JSFControllerLogicImpl 32 8 0 8
org.andromda.cartridges.jsf.metafacades.JSFControllerOperationLogicImpl 39 8 0 9
org.andromda.cartridges.jsf.metafacades.JSFManageableEntityAssociationEndLogicImpl 32 8 0 9
org.andromda.cartridges.jsf.metafacades.JSFEventLogicImpl 22 6 0 7
org.andromda.cartridges.jsf.metafacades.JSFEnumerationLogicImpl 12 5 0 6
org.andromda.cartridges.jsf.metafacades.JSFExceptionHandlerLogicImpl 23 5 0 6
org.andromda.cartridges.jsf.metafacades.JSFBackendServiceLogicImpl 10 3 0 4
org.andromda.cartridges.jsf.metafacades.JSFFinalStateLogicImpl 19 2 0 3
org.andromda.cartridges.jsf.metafacades.JSFPortletPreferencesLogicImpl 14 2 0 3
org.andromda.cartridges.jsf.metafacades.JSFSessionObjectLogicImpl 6 2 0 3
org.andromda.cartridges.jsf.metafacades.JSFActionLogicImpl.Predicate 12 1 0 0
org.andromda.cartridges.jsf.metafacades.JSFActivityGraphLogicImpl 4 1 0 2
org.andromda.cartridges.jsf.metafacades.JSFManageableEntityLogicImpl.Closure 2 1 0 0
org.andromda.cartridges.jsf.metafacades.JSFManageableEntityLogicImpl.Predicate 3 1 0 0
org.andromda.cartridges.jsf.metafacades.JSFManageableEntityLogicImpl.Transformer 2 1 0 0
org.andromda.cartridges.jsf.metafacades.JSFUseCaseLogicImpl.Predicate 3 1 0 0
org.andromda.cartridges.jsf.metafacades.JSFUseCaseLogicImpl.Predicate 5 1 0 0
org.andromda.cartridges.jsf.metafacades.JSFUseCaseLogicImpl.Transformer 3 1 0 0
org.andromda.cartridges.jsf.JSFGlobals 42 0 0 1
org.andromda.cartridges.jsf.JSFProfile 46 0 0 1

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
91.48 2,871.00 0.24 15.41 15.66

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.andromda.cartridges.jsf.metafacades.JSFParameterLogicImpl.handleGetAnnotations() 88 34 1
org.andromda.cartridges.jsf.metafacades.JSFUseCaseLogicImpl.handleGetAllMessages() 80 28 1
org.andromda.cartridges.jsf.JSFUtils.getValidatorTypes(ModelElementFacade,ClassifierFacade) 72 35 1
org.andromda.cartridges.jsf.JSFUtils.getValidatorVars(ModelElementFacade,ClassifierFacade,ParameterFacade) 63 21 1
org.andromda.cartridges.jsf.metafacades.JSFAttributeLogicImpl.handleGetDummyValue() 52 56 1
org.andromda.cartridges.jsf.metafacades.JSFManageableEntityAttributeLogicImpl.handleGetDummyValue() 52 56 1
org.andromda.cartridges.jsf.JSFUtils.getValidatorArgs(ModelElementFacade,String) 48 18 1
org.andromda.cartridges.jsf.metafacades.JSFParameterLogicImpl.handleGetDummyValue() 40 10 1
org.andromda.cartridges.jsf.metafacades.JSFAttributeLogicImpl.handleIsBackingValueRequired(FrontEndParameter) 36 19 1
org.andromda.cartridges.jsf.metafacades.JSFParameterLogicImpl.handleIsSelectable() 36 23 1
org.andromda.cartridges.jsf.metafacades.JSFParameterLogicImpl.handleIsBackingValueRequired() 36 19 1
org.andromda.cartridges.jsf.metafacades.JSFAttributeLogicImpl.handleIsSelectable(FrontEndParameter) 34 23 1
org.andromda.cartridges.jsf.metafacades.JSFActionLogicImpl.handleGetFormSerialVersionUID() 32 11 1
org.andromda.cartridges.jsf.metafacades.JSFParameterLogicImpl.getTableColumns() 23 12 1
org.andromda.cartridges.jsf.JSFUtils.parseValidatorArgs(String) 20 9 1
org.andromda.cartridges.jsf.metafacades.JSFViewLogicImpl.handleGetBackingValueVariables() 20 11 1
org.andromda.cartridges.jsf.metafacades.JSFParameterLogicImpl.getTableActions(boolean) 18 12 1
org.andromda.cartridges.jsf.JSFUtils.parseValidatorVars(String) 17 8 1
org.andromda.cartridges.jsf.JSFUtils.getFormat(ModelElementFacade,ClassifierFacade,String,String) 17 9 1
org.andromda.cartridges.jsf.metafacades.JSFActionLogicImpl.handleGetHiddenParameters() 16 1 1
org.andromda.cartridges.jsf.metafacades.JSFParameterLogicImpl.handleGetMessageKey() 16 5 1
org.andromda.cartridges.jsf.metafacades.JSFParameterLogicImpl.handleIsValidationRequired() 16 8 1
org.andromda.cartridges.jsf.metafacades.JSFUseCaseLogicImpl.getInitialTarget() 16 9 1
org.andromda.cartridges.jsf.metafacades.JSFFinalStateLogicImpl.handleGetPath() 15 8 1
org.andromda.cartridges.jsf.metafacades.JSFActionLogicImpl.handleGetFormImplementationInterfaceList() 14 8 1
org.andromda.cartridges.jsf.metafacades.JSFActionLogicImpl.handleGetTableLinkParameter() 14 7 1
org.andromda.cartridges.jsf.metafacades.JSFManageableEntityLogicImpl.handleGetRoles() 14 1 1
org.andromda.cartridges.jsf.metafacades.JSFParameterLogicImpl.getView() 14 5 1
org.andromda.cartridges.jsf.metafacades.JSFUseCaseLogicImpl.handleGetNavigationRules() 14 4 1
org.andromda.cartridges.jsf.metafacades.JSFActionLogicImpl.handleIsNeedsFileUpload() 13 11 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
2,871.00 5.58 2.78 0.97

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