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.jsf2.metafacades 28 421 2492 416 1764 95 61
org.andromda.cartridges.jsf2 3 51 545 52 272 17 220
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
31 472 3037 468 2036 112 281

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.andromda.cartridges.jsf2.metafacades.JSFParameterLogicImpl 478 63 1 64
org.andromda.cartridges.jsf2.JSFUtils 419 51 0 50
org.andromda.cartridges.jsf2.metafacades.JSFUseCaseLogicImpl 300 42 3 40
org.andromda.cartridges.jsf2.metafacades.JSFActionLogicImpl 290 49 1 50
org.andromda.cartridges.jsf2.metafacades.JSFAttributeLogicImpl 253 45 0 46
org.andromda.cartridges.jsf2.metafacades.JSFManageableEntityLogicImpl 249 65 3 60
org.andromda.cartridges.jsf2.metafacades.JSFManageableEntityAttributeLogicImpl 221 51 0 50
org.andromda.cartridges.jsf2.metafacades.JSFViewLogicImpl 154 29 0 30
org.andromda.cartridges.jsf2.JSFProfile 52 0 0 1
org.andromda.cartridges.jsf2.metafacades.JSFControllerLogicImpl 51 10 1 10
org.andromda.cartridges.jsf2.metafacades.JSFFinalStateLogicImpl 51 6 0 6
org.andromda.cartridges.jsf2.JSFGlobals 44 0 0 1
org.andromda.cartridges.jsf2.metafacades.JSFForwardLogicImpl 44 10 0 11
org.andromda.cartridges.jsf2.metafacades.JSFControllerOperationLogicImpl 39 8 0 9
org.andromda.cartridges.jsf2.metafacades.JSFManageableEntityAssociationEndLogicImpl 34 9 0 9
org.andromda.cartridges.jsf2.metafacades.JSFExceptionHandlerLogicImpl 23 5 0 6
org.andromda.cartridges.jsf2.metafacades.JSFEventLogicImpl 22 6 0 7
org.andromda.cartridges.jsf2.metafacades.JSFPortletPreferencesLogicImpl 14 2 0 3
org.andromda.cartridges.jsf2.metafacades.JSFActionLogicImpl.Predicate 12 1 0 0
org.andromda.cartridges.jsf2.metafacades.JSFEnumerationLogicImpl 12 5 0 6
org.andromda.cartridges.jsf2.metafacades.JSFBackendServiceLogicImpl 10 3 0 4
org.andromda.cartridges.jsf2.metafacades.JSFParameterLogicImpl.ActionFilter 6 2 0 0
org.andromda.cartridges.jsf2.metafacades.JSFSessionObjectLogicImpl 6 2 0 3
org.andromda.cartridges.jsf2.metafacades.JSFUseCaseLogicImpl.Predicate 5 1 0 0
org.andromda.cartridges.jsf2.metafacades.JSFActivityGraphLogicImpl 4 1 0 2
org.andromda.cartridges.jsf2.metafacades.JSFControllerLogicImpl.FilteredCollection 3 1 0 0
org.andromda.cartridges.jsf2.metafacades.JSFManageableEntityLogicImpl.Predicate 3 1 0 0
org.andromda.cartridges.jsf2.metafacades.JSFUseCaseLogicImpl.Predicate 3 1 0 0
org.andromda.cartridges.jsf2.metafacades.JSFUseCaseLogicImpl.Transformer 3 1 0 0
org.andromda.cartridges.jsf2.metafacades.JSFManageableEntityLogicImpl.Closure 2 1 0 0

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.andromda.cartridges.jsf2.metafacades.JSFManageableEntityLogicImpl 249 65 3 60
org.andromda.cartridges.jsf2.metafacades.JSFParameterLogicImpl 478 63 1 64
org.andromda.cartridges.jsf2.JSFUtils 419 51 0 50
org.andromda.cartridges.jsf2.metafacades.JSFManageableEntityAttributeLogicImpl 221 51 0 50
org.andromda.cartridges.jsf2.metafacades.JSFActionLogicImpl 290 49 1 50
org.andromda.cartridges.jsf2.metafacades.JSFAttributeLogicImpl 253 45 0 46
org.andromda.cartridges.jsf2.metafacades.JSFUseCaseLogicImpl 300 42 3 40
org.andromda.cartridges.jsf2.metafacades.JSFViewLogicImpl 154 29 0 30
org.andromda.cartridges.jsf2.metafacades.JSFControllerLogicImpl 51 10 1 10
org.andromda.cartridges.jsf2.metafacades.JSFForwardLogicImpl 44 10 0 11
org.andromda.cartridges.jsf2.metafacades.JSFManageableEntityAssociationEndLogicImpl 34 9 0 9
org.andromda.cartridges.jsf2.metafacades.JSFControllerOperationLogicImpl 39 8 0 9
org.andromda.cartridges.jsf2.metafacades.JSFEventLogicImpl 22 6 0 7
org.andromda.cartridges.jsf2.metafacades.JSFFinalStateLogicImpl 51 6 0 6
org.andromda.cartridges.jsf2.metafacades.JSFEnumerationLogicImpl 12 5 0 6
org.andromda.cartridges.jsf2.metafacades.JSFExceptionHandlerLogicImpl 23 5 0 6
org.andromda.cartridges.jsf2.metafacades.JSFBackendServiceLogicImpl 10 3 0 4
org.andromda.cartridges.jsf2.metafacades.JSFParameterLogicImpl.ActionFilter 6 2 0 0
org.andromda.cartridges.jsf2.metafacades.JSFPortletPreferencesLogicImpl 14 2 0 3
org.andromda.cartridges.jsf2.metafacades.JSFSessionObjectLogicImpl 6 2 0 3
org.andromda.cartridges.jsf2.metafacades.JSFActionLogicImpl.Predicate 12 1 0 0
org.andromda.cartridges.jsf2.metafacades.JSFActivityGraphLogicImpl 4 1 0 2
org.andromda.cartridges.jsf2.metafacades.JSFControllerLogicImpl.FilteredCollection 3 1 0 0
org.andromda.cartridges.jsf2.metafacades.JSFManageableEntityLogicImpl.Closure 2 1 0 0
org.andromda.cartridges.jsf2.metafacades.JSFManageableEntityLogicImpl.Predicate 3 1 0 0
org.andromda.cartridges.jsf2.metafacades.JSFManageableEntityLogicImpl.Transformer 2 1 0 0
org.andromda.cartridges.jsf2.metafacades.JSFUseCaseLogicImpl.Predicate 3 1 0 0
org.andromda.cartridges.jsf2.metafacades.JSFUseCaseLogicImpl.Predicate 5 1 0 0
org.andromda.cartridges.jsf2.metafacades.JSFUseCaseLogicImpl.Transformer 3 1 0 0
org.andromda.cartridges.jsf2.JSFGlobals 44 0 0 1

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
90.61 3,037.00 0.29 15.23 15.10

Methods

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

TOP 30 Methods containing the most NCSS.

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

Averages.

Program NCSS NCSS average CCN average Javadocs average
3,037.00 5.57 2.79 0.94

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