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.metafacades.uml14 157 874 5212 865 3257 233 158
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
157 874 5212 865 3257 233 158

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.andromda.metafacades.uml14.ModelElementFacadeLogicImpl 360 53 8 54
org.andromda.metafacades.uml14.ClassifierFacadeLogicImpl 344 63 10 63
org.andromda.metafacades.uml14.EntityLogicImpl 313 53 14 54
org.andromda.metafacades.uml14.OperationFacadeLogicImpl 254 51 4 50
org.andromda.metafacades.uml14.UML14MetafacadeUtils 231 27 2 28
org.andromda.metafacades.uml14.ManageableEntityLogicImpl 225 32 2 30
org.andromda.metafacades.uml14.FrontEndActionLogicImpl 175 16 1 17
org.andromda.metafacades.uml14.AttributeFacadeLogicImpl 166 32 0 33
org.andromda.metafacades.uml14.AssociationEndFacadeLogicImpl 134 36 0 37
org.andromda.metafacades.uml14.FrontEndUseCaseLogicImpl 115 15 0 16
org.andromda.metafacades.uml14.FrontEndControllerOperationLogicImpl 110 7 0 8
org.andromda.metafacades.uml14.FrontEndForwardLogicImpl 97 17 0 18
org.andromda.metafacades.uml14.ParameterFacadeLogicImpl 97 27 0 28
org.andromda.metafacades.uml14.FrontEndParameterLogicImpl 83 12 2 13
org.andromda.metafacades.uml14.UMLModelAccessFacade 77 9 1 10
org.andromda.metafacades.uml14.ServiceLogicImpl 75 9 10 10
org.andromda.metafacades.uml14.FrontEndActionStateLogicImpl 72 9 2 10
org.andromda.metafacades.uml14.EntityAssociationEndLogicImpl 66 13 0 14
org.andromda.metafacades.uml14.EntityAttributeLogicImpl 66 13 0 14
org.andromda.metafacades.uml14.FrontEndViewLogicImpl 63 9 0 10
org.andromda.metafacades.uml14.GeneralizableElementFacadeLogicImpl 58 10 1 11
org.andromda.metafacades.uml14.TemplateParameterFacadeLogicImpl 55 16 0 8
org.andromda.metafacades.uml14.StateMachineFacadeLogicImpl 54 12 4 12
org.andromda.metafacades.uml14.ModelFacadeLogicImpl 50 17 1 17
org.andromda.metafacades.uml14.EnumerationFacadeLogicImpl 49 8 2 9
org.andromda.metafacades.uml14.ServiceOperationLogicImpl 46 8 5 9
org.andromda.metafacades.uml14.AssociationFacadeLogicImpl 41 12 0 13
org.andromda.metafacades.uml14.ConstraintFacadeLogicImpl 39 10 0 11
org.andromda.metafacades.uml14.FrontEndFinalStateLogicImpl 39 5 0 6
org.andromda.metafacades.uml14.TransitionFacadeLogicImpl 33 14 0 15

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.andromda.metafacades.uml14.ClassifierFacadeLogicImpl 344 63 10 63
org.andromda.metafacades.uml14.EntityLogicImpl 313 53 14 54
org.andromda.metafacades.uml14.ModelElementFacadeLogicImpl 360 53 8 54
org.andromda.metafacades.uml14.OperationFacadeLogicImpl 254 51 4 50
org.andromda.metafacades.uml14.AssociationEndFacadeLogicImpl 134 36 0 37
org.andromda.metafacades.uml14.AttributeFacadeLogicImpl 166 32 0 33
org.andromda.metafacades.uml14.ManageableEntityLogicImpl 225 32 2 30
org.andromda.metafacades.uml14.ParameterFacadeLogicImpl 97 27 0 28
org.andromda.metafacades.uml14.UML14MetafacadeUtils 231 27 2 28
org.andromda.metafacades.uml14.FrontEndForwardLogicImpl 97 17 0 18
org.andromda.metafacades.uml14.ModelFacadeLogicImpl 50 17 1 17
org.andromda.metafacades.uml14.FrontEndActionLogicImpl 175 16 1 17
org.andromda.metafacades.uml14.TemplateParameterFacadeLogicImpl 55 16 0 8
org.andromda.metafacades.uml14.FrontEndUseCaseLogicImpl 115 15 0 16
org.andromda.metafacades.uml14.TransitionFacadeLogicImpl 33 14 0 15
org.andromda.metafacades.uml14.EntityAssociationEndLogicImpl 66 13 0 14
org.andromda.metafacades.uml14.EntityAttributeLogicImpl 66 13 0 14
org.andromda.metafacades.uml14.PseudostateFacadeLogicImpl 28 13 0 14
org.andromda.metafacades.uml14.AssociationFacadeLogicImpl 41 12 0 13
org.andromda.metafacades.uml14.FrontEndParameterLogicImpl 83 12 2 13
org.andromda.metafacades.uml14.StateMachineFacadeLogicImpl 54 12 4 12
org.andromda.metafacades.uml14.ConstraintFacadeLogicImpl 39 10 0 11
org.andromda.metafacades.uml14.GeneralizableElementFacadeLogicImpl 58 10 1 11
org.andromda.metafacades.uml14.FrontEndActionStateLogicImpl 72 9 2 10
org.andromda.metafacades.uml14.FrontEndViewLogicImpl 63 9 0 10
org.andromda.metafacades.uml14.ServiceLogicImpl 75 9 10 10
org.andromda.metafacades.uml14.UMLModelAccessFacade 77 9 1 10
org.andromda.metafacades.uml14.EnumerationFacadeLogicImpl 49 8 2 9
org.andromda.metafacades.uml14.ServiceOperationLogicImpl 46 8 5 9
org.andromda.metafacades.uml14.FrontEndControllerOperationLogicImpl 110 7 0 8

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
29.39 5,212.00 0.48 5.57 5.52

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.andromda.metafacades.uml14.FrontEndActionLogicImpl.handleGetFormFields() 65 25 1
org.andromda.metafacades.uml14.ManageableEntityLogicImpl.createListWithManageableMembers(ListType) 51 20 0
org.andromda.metafacades.uml14.ModelElementFacadeLogicImpl.handleGetBindedFullyQualifiedName(boolean,BindingFacade) 44 17 1
org.andromda.metafacades.uml14.FrontEndControllerOperationLogicImpl.handleGetFormFields() 33 14 1
org.andromda.metafacades.uml14.FrontEndControllerOperationLogicImpl.handleGetDeferringActions() 32 12 1
org.andromda.metafacades.uml14.FrontEndActionLogicImpl.collectTransitions(TransitionFacade,Collection) 26 12 1
org.andromda.metafacades.uml14.FrontEndControllerOperationLogicImpl.handleIsAllArgumentsHaveFormFields() 26 12 1
org.andromda.metafacades.uml14.OperationFacadeLogicImpl.handleGetExceptions() 24 3 1
org.andromda.metafacades.uml14.OperationFacadeLogicImpl.getTypedArgumentList(boolean,String) 23 7 0
org.andromda.metafacades.uml14.FrontEndForwardLogicImpl.findActions(FrontEndAction,FrontEndForward) 22 8 1
org.andromda.metafacades.uml14.AttributeFacadeLogicImpl.getMultiplicityRangeLower() 21 9 1
org.andromda.metafacades.uml14.EntityLogicImpl.handleGetOperationCallFromAttributes(boolean,boolean) 21 9 1
org.andromda.metafacades.uml14.ModelElementFacadeLogicImpl.handleGetDocumentation(String,int,boolean) 20 9 1
org.andromda.metafacades.uml14.FrontEndActionStateLogicImpl.handleGetControllerCalls() 19 6 1
org.andromda.metafacades.uml14.ManageableEntityLogicImpl.handleGetDisplayAttribute() 19 9 1
org.andromda.metafacades.uml14.ModelElementFacadeLogicImpl.handleFindTaggedValues(String) 19 11 1
org.andromda.metafacades.uml14.ServiceOperationLogicImpl.handleGetRoles() 19 2 1
org.andromda.metafacades.uml14.EntityAssociationEndLogicImpl.handleGetSqlType() 18 9 1
org.andromda.metafacades.uml14.EntityLogicImpl.getTypeList(Collection) 18 2 1
org.andromda.metafacades.uml14.FrontEndUseCaseLogicImpl.handleGetInitialView() 18 9 1
org.andromda.metafacades.uml14.RoleLogicImpl.handleIsReferencesPresent() 18 6 1
org.andromda.metafacades.uml14.TemplateParameterFacadeLogicImpl.handleGetDocumentation(String,int,boolean) 18 8 1
org.andromda.metafacades.uml14.EntityLogicImpl.handleGetRequiredProperties(boolean,boolean) 17 1 1
org.andromda.metafacades.uml14.ModelElementFacadeLogicImpl.handleGetVisibility() 17 6 1
org.andromda.metafacades.uml14.UML14MetafacadeUtils.findFinalStatesWithNameOrHyperlink(UseCase) 17 8 1
org.andromda.metafacades.uml14.ClassifierFacadeLogicImpl.handleGetJavaNewString() 16 5 1
org.andromda.metafacades.uml14.EntityLogicImpl.checkForAndAddForeignIdentifiers() 16 6 1
org.andromda.metafacades.uml14.FrontEndFinalStateLogicImpl.handleGetTargetUseCase() 16 7 1
org.andromda.metafacades.uml14.FrontEndUseCaseLogicImpl.handleGetViewVariables() 16 6 1
org.andromda.metafacades.uml14.ModelElementFacadeLogicImpl.handleHasStereotype(String) 16 4 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
5,212.00 5.04 2.16 0.89

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