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.bpm4struts.metafacades 22 374 2487 386 1377 96 31
org.andromda.cartridges.bpm4struts 4 11 182 14 85 6 127
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
26 385 2669 400 1462 102 158

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogicImpl 858 114 0 113
org.andromda.cartridges.bpm4struts.metafacades.StrutsActionLogicImpl 389 67 2 68
org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCaseLogicImpl 249 29 1 32
org.andromda.cartridges.bpm4struts.metafacades.StrutsJspLogicImpl 128 27 0 27
org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperationLogicImpl 125 12 0 13
org.andromda.cartridges.bpm4struts.metafacades.StrutsForwardLogicImpl 90 17 0 18
org.andromda.cartridges.bpm4struts.Bpm4StrutsUtils 86 9 1 12
org.andromda.cartridges.bpm4struts.metafacades.StrutsManageableEntityLogicImpl 78 32 0 33
org.andromda.cartridges.bpm4struts.metafacades.StrutsManageableEntityAttributeLogicImpl 65 14 0 14
org.andromda.cartridges.bpm4struts.Bpm4StrutsProfile 62 1 0 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsFinalStateLogicImpl 50 6 0 7
org.andromda.cartridges.bpm4struts.metafacades.StrutsTriggerLogicImpl 46 16 0 16
org.andromda.cartridges.bpm4struts.metafacades.StrutsAttributeLogicImpl 32 4 0 5
org.andromda.cartridges.bpm4struts.metafacades.StrutsExceptionHandlerLogicImpl 28 6 0 7
org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerLogicImpl 26 5 0 6
org.andromda.cartridges.bpm4struts.metafacades.StrutsActionStateLogicImpl 23 3 0 4
org.andromda.cartridges.bpm4struts.metafacades.StrutsManageableEntityAssociationEndLogicImpl 23 6 0 7
org.andromda.cartridges.bpm4struts.metafacades.StrutsPseudostateLogicImpl 20 4 0 5
org.andromda.cartridges.bpm4struts.Bpm4StrutsGlobals 18 0 0 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsActivityGraphLogicImpl 12 2 0 3
org.andromda.cartridges.bpm4struts.metafacades.StrutsBackendServiceLogicImpl 10 3 0 4
org.andromda.cartridges.bpm4struts.metafacades.StrutsSessionObjectLogicImpl 8 3 0 4
org.andromda.cartridges.bpm4struts.Bpm4StrutsUtils.ManageableEntityComparator 6 1 0 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCaseLogicImpl.UseCaseNode 6 2 0 2
org.andromda.cartridges.bpm4struts.metafacades.StrutsActionLogicImpl.FilteredCollection 3 1 0 0
org.andromda.cartridges.bpm4struts.metafacades.StrutsActionLogicImpl.Predicate 2 1 0 0

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogicImpl 858 114 0 113
org.andromda.cartridges.bpm4struts.metafacades.StrutsActionLogicImpl 389 67 2 68
org.andromda.cartridges.bpm4struts.metafacades.StrutsManageableEntityLogicImpl 78 32 0 33
org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCaseLogicImpl 249 29 1 32
org.andromda.cartridges.bpm4struts.metafacades.StrutsJspLogicImpl 128 27 0 27
org.andromda.cartridges.bpm4struts.metafacades.StrutsForwardLogicImpl 90 17 0 18
org.andromda.cartridges.bpm4struts.metafacades.StrutsTriggerLogicImpl 46 16 0 16
org.andromda.cartridges.bpm4struts.metafacades.StrutsManageableEntityAttributeLogicImpl 65 14 0 14
org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperationLogicImpl 125 12 0 13
org.andromda.cartridges.bpm4struts.Bpm4StrutsUtils 86 9 1 12
org.andromda.cartridges.bpm4struts.metafacades.StrutsExceptionHandlerLogicImpl 28 6 0 7
org.andromda.cartridges.bpm4struts.metafacades.StrutsFinalStateLogicImpl 50 6 0 7
org.andromda.cartridges.bpm4struts.metafacades.StrutsManageableEntityAssociationEndLogicImpl 23 6 0 7
org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerLogicImpl 26 5 0 6
org.andromda.cartridges.bpm4struts.metafacades.StrutsAttributeLogicImpl 32 4 0 5
org.andromda.cartridges.bpm4struts.metafacades.StrutsPseudostateLogicImpl 20 4 0 5
org.andromda.cartridges.bpm4struts.metafacades.StrutsActionStateLogicImpl 23 3 0 4
org.andromda.cartridges.bpm4struts.metafacades.StrutsBackendServiceLogicImpl 10 3 0 4
org.andromda.cartridges.bpm4struts.metafacades.StrutsSessionObjectLogicImpl 8 3 0 4
org.andromda.cartridges.bpm4struts.metafacades.StrutsActivityGraphLogicImpl 12 2 0 3
org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCaseLogicImpl.UseCaseNode 6 2 0 2
org.andromda.cartridges.bpm4struts.Bpm4StrutsProfile 62 1 0 1
org.andromda.cartridges.bpm4struts.Bpm4StrutsUtils.ManageableEntityComparator 6 1 0 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsActionLogicImpl.FilteredCollection 3 1 0 0
org.andromda.cartridges.bpm4struts.metafacades.StrutsActionLogicImpl.Predicate 2 1 0 0
org.andromda.cartridges.bpm4struts.Bpm4StrutsGlobals 18 0 0 1

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
93.96 2,669.00 0.15 14.81 15.50

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogicImpl.handleGetOnlineHelpValue() 98 24 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCaseLogicImpl.handleGetAllMessages() 78 25 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogicImpl.handleGetValidatorTypes() 66 30 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogicImpl.handleGetWidgetType() 55 22 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogicImpl.handleGetResetValue() 49 45 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogicImpl.handleGetValidatorVars() 42 15 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsActionLogicImpl.handleGetActionFormFields() 33 17 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperationLogicImpl.getDeferringActions() 32 12 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogicImpl.getTableColumns() 32 13 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogicImpl.handleIsSelectable() 32 16 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperationLogicImpl.getFormFields() 30 13 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogicImpl.handleGetValidatorArgs(String) 27 12 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperationLogicImpl.isAllArgumentsHaveFormFields() 23 11 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsActionLogicImpl.collectTransitions(TransitionFacade,TransitionFacade) 22 12 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsForwardLogicImpl.findActions(Set,Set) 22 8 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogicImpl.internalGetTableActions(boolean,boolean,boolean) 21 18 1
org.andromda.cartridges.bpm4struts.Bpm4StrutsUtils.parseValidatorArgs(String) 19 8 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogicImpl.handleGetOptionValues() 18 5 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsActionLogicImpl.handleGetTableNonColumnFormParameters() 17 5 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsAttributeLogicImpl.handleGetDummyValue(int) 17 5 1
org.andromda.cartridges.bpm4struts.Bpm4StrutsUtils.parseValidatorVars(String) 16 7 1
org.andromda.cartridges.bpm4struts.Bpm4StrutsUtils.getDisplayTagExportTypes(Collection,String) 16 8 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsFinalStateLogicImpl.getTargetUseCase() 16 7 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogicImpl.handleGetFormFields() 16 6 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogicImpl.handleGetMessageKey() 16 5 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogicImpl.handleIsAllGlobalTableActionsHaveSameParameter() 16 7 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsActionLogicImpl.handleGetActionPathRoot() 15 4 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsActionLogicImpl.handleGetDeferredOperations() 14 5 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsControllerOperationLogicImpl.handleIsBackEndServiceOperationMatchingParameters() 14 5 1
org.andromda.cartridges.bpm4struts.metafacades.StrutsFinalStateLogicImpl.handleGetFullPath() 14 6 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
2,669.00 5.97 2.75 0.98

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