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.emf.uml22 177 1956 8138 1966 7220 568 715
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
177 1956 8138 1966 7220 568 715

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.andromda.metafacades.emf.uml22.AttributeImpl 546 263 0 264
org.andromda.metafacades.emf.uml22.AssociationEndImpl 541 260 0 261
org.andromda.metafacades.emf.uml22.UmlUtilities 486 36 8 37
org.andromda.metafacades.emf.uml22.ClassifierFacadeLogicImpl 375 67 9 67
org.andromda.metafacades.emf.uml22.ModelElementFacadeLogicImpl 362 53 7 54
org.andromda.metafacades.emf.uml22.EntityLogicImpl 339 53 15 54
org.andromda.metafacades.emf.uml22.LinkInstanceImpl 282 139 0 140
org.andromda.metafacades.emf.uml22.ObjectInstanceImpl 264 130 0 131
org.andromda.metafacades.emf.uml22.OperationFacadeLogicImpl 243 49 4 49
org.andromda.metafacades.emf.uml22.ManageableEntityLogicImpl 229 32 2 30
org.andromda.metafacades.emf.uml22.TagDefinitionImpl 221 112 0 113
org.andromda.metafacades.emf.uml22.AttributeLinkImpl 164 80 0 81
org.andromda.metafacades.emf.uml22.FrontEndActionLogicImpl 163 16 1 17
org.andromda.metafacades.emf.uml22.LinkEndImpl 162 79 0 80
org.andromda.metafacades.emf.uml22.AttributeFacadeLogicImpl 125 31 0 32
org.andromda.metafacades.emf.uml22.ParameterFacadeLogicImpl 123 29 0 29
org.andromda.metafacades.emf.uml22.FrontEndControllerOperationLogicImpl 106 7 0 8
org.andromda.metafacades.emf.uml22.FrontEndForwardLogicImpl 100 17 0 18
org.andromda.metafacades.emf.uml22.FrontEndUseCaseLogicImpl 98 15 0 16
org.andromda.metafacades.emf.uml22.AssociationEndFacadeLogicImpl 92 34 0 35
org.andromda.metafacades.emf.uml22.UMLModelAccessFacade 91 9 1 10
org.andromda.metafacades.emf.uml22.ModelFacadeLogicImpl 90 16 3 17
org.andromda.metafacades.emf.uml22.FrontEndParameterLogicImpl 87 13 1 14
org.andromda.metafacades.emf.uml22.TemplateParameterFacadeLogicImpl 87 17 0 18
org.andromda.metafacades.emf.uml22.ServiceLogicImpl 75 9 10 10
org.andromda.metafacades.emf.uml22.FrontEndActionStateLogicImpl 68 9 2 10
org.andromda.metafacades.emf.uml22.EntityAssociationEndLogicImpl 66 13 0 14
org.andromda.metafacades.emf.uml22.EntityAttributeLogicImpl 64 13 0 14
org.andromda.metafacades.emf.uml22.StateMachineFacadeLogicImpl 62 12 4 12
org.andromda.metafacades.emf.uml22.FrontEndViewLogicImpl 61 9 0 10

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.andromda.metafacades.emf.uml22.AttributeImpl 546 263 0 264
org.andromda.metafacades.emf.uml22.AssociationEndImpl 541 260 0 261
org.andromda.metafacades.emf.uml22.LinkInstanceImpl 282 139 0 140
org.andromda.metafacades.emf.uml22.ObjectInstanceImpl 264 130 0 131
org.andromda.metafacades.emf.uml22.TagDefinitionImpl 221 112 0 113
org.andromda.metafacades.emf.uml22.AttributeLinkImpl 164 80 0 81
org.andromda.metafacades.emf.uml22.LinkEndImpl 162 79 0 80
org.andromda.metafacades.emf.uml22.ClassifierFacadeLogicImpl 375 67 9 67
org.andromda.metafacades.emf.uml22.EntityLogicImpl 339 53 15 54
org.andromda.metafacades.emf.uml22.ModelElementFacadeLogicImpl 362 53 7 54
org.andromda.metafacades.emf.uml22.OperationFacadeLogicImpl 243 49 4 49
org.andromda.metafacades.emf.uml22.UmlUtilities 486 36 8 37
org.andromda.metafacades.emf.uml22.AssociationEndFacadeLogicImpl 92 34 0 35
org.andromda.metafacades.emf.uml22.ManageableEntityLogicImpl 229 32 2 30
org.andromda.metafacades.emf.uml22.AttributeFacadeLogicImpl 125 31 0 32
org.andromda.metafacades.emf.uml22.ParameterFacadeLogicImpl 123 29 0 29
org.andromda.metafacades.emf.uml22.FrontEndForwardLogicImpl 100 17 0 18
org.andromda.metafacades.emf.uml22.TemplateParameterFacadeLogicImpl 87 17 0 18
org.andromda.metafacades.emf.uml22.FrontEndActionLogicImpl 163 16 1 17
org.andromda.metafacades.emf.uml22.ModelFacadeLogicImpl 90 16 3 17
org.andromda.metafacades.emf.uml22.FrontEndUseCaseLogicImpl 98 15 0 16
org.andromda.metafacades.emf.uml22.TransitionFacadeLogicImpl 41 14 0 15
org.andromda.metafacades.emf.uml22.EntityAssociationEndLogicImpl 66 13 0 14
org.andromda.metafacades.emf.uml22.EntityAttributeLogicImpl 64 13 0 14
org.andromda.metafacades.emf.uml22.FrontEndParameterLogicImpl 87 13 1 14
org.andromda.metafacades.emf.uml22.PseudostateFacadeLogicImpl 28 13 0 14
org.andromda.metafacades.emf.uml22.AssociationFacadeLogicImpl 37 12 0 13
org.andromda.metafacades.emf.uml22.StateMachineFacadeLogicImpl 62 12 4 12
org.andromda.metafacades.emf.uml22.GeneralizableElementFacadeLogicImpl 56 10 0 11
org.andromda.metafacades.emf.uml22.InstanceFacadeLogicImpl 48 10 3 11

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
40.76 8,138.00 0.46 11.05 11.11

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.andromda.metafacades.emf.uml22.FrontEndActionLogicImpl.handleGetFormFields() 58 26 1
org.andromda.metafacades.emf.uml22.ModelElementFacadeLogicImpl.handleGetBindedFullyQualifiedName(boolean,BindingFacade) 58 29 1
org.andromda.metafacades.emf.uml22.ManageableEntityLogicImpl.createListWithManageableMembers(ListType) 45 20 0
org.andromda.metafacades.emf.uml22.UmlUtilities.getTaggedValue(Element) 41 17 1
org.andromda.metafacades.emf.uml22.UmlUtilities.Transformer.transform(Object) 36 18 0
org.andromda.metafacades.emf.uml22.FrontEndControllerOperationLogicImpl.handleGetFormFields() 33 14 1
org.andromda.metafacades.emf.uml22.FrontEndControllerOperationLogicImpl.handleGetDeferringActions() 32 12 1
org.andromda.metafacades.emf.uml22.UmlUtilities.parseMultiplicity(ValueSpecification,int) 32 10 1
org.andromda.metafacades.emf.uml22.OperationFacadeLogicImpl.handleGetExceptions() 28 3 1
org.andromda.metafacades.emf.uml22.FrontEndActionLogicImpl.collectTransitions(TransitionFacade,TransitionFacade) 24 12 1
org.andromda.metafacades.emf.uml22.ManageableEntityLogicImpl.handleGetDisplayAttribute() 24 11 1
org.andromda.metafacades.emf.uml22.FrontEndControllerOperationLogicImpl.handleIsAllArgumentsHaveFormFields() 23 11 1
org.andromda.metafacades.emf.uml22.ModelElementFacadeLogicImpl.handleGetVisibility() 23 8 1
org.andromda.metafacades.emf.uml22.FrontEndForwardLogicImpl.findActions(FrontEndAction,MetafacadeBase) 22 8 1
org.andromda.metafacades.emf.uml22.UmlUtilities.containsStereotype(Element,String) 22 10 1
org.andromda.metafacades.emf.uml22.EntityLogicImpl.createIdentifier(String,String,String) 21 10 1
org.andromda.metafacades.emf.uml22.AttributeFacadeLogicImpl.handleGetGetterSetterTypeName() 20 16 1
org.andromda.metafacades.emf.uml22.EntityLogicImpl.handleGetOperationCallFromAttributes(boolean,boolean) 20 9 1
org.andromda.metafacades.emf.uml22.EnumerationFacadeLogicImpl.handleGetLiteralType() 20 9 1
org.andromda.metafacades.emf.uml22.OperationFacadeLogicImpl.handleGetGetterSetterReturnTypeName() 20 14 1
org.andromda.metafacades.emf.uml22.ParameterFacadeLogicImpl.handleGetGetterSetterTypeName() 20 14 1
org.andromda.metafacades.emf.uml22.ClassifierFacadeLogicImpl.handleGetImplementationOperations() 19 6 1
org.andromda.metafacades.emf.uml22.ModelElementFacadeLogicImpl.handleGetDocumentation(String,int,boolean) 19 10 1
org.andromda.metafacades.emf.uml22.ServiceOperationLogicImpl.handleGetRoles() 19 2 1
org.andromda.metafacades.emf.uml22.TemplateParameterFacadeLogicImpl.handleGetDocumentation(String,int,boolean) 19 11 1
org.andromda.metafacades.emf.uml22.UmlUtilities.getAssociationEnds(Classifier,boolean) 19 8 1
org.andromda.metafacades.emf.uml22.UmlUtilities.findByFullyQualifiedName(ResourceSet,String,String,boolean) 19 5 1
org.andromda.metafacades.emf.uml22.UmlUtilities.doesTagValueNameMatch(String,String) 19 8 1
org.andromda.metafacades.emf.uml22.EntityAssociationEndLogicImpl.handleGetSqlType() 18 9 1
org.andromda.metafacades.emf.uml22.EntityLogicImpl.getTypeList(ModelElementFacade) 18 2 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
8,138.00 3.54 1.66 0.96

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