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.

PackageClassesMethodsNCSSJavadocsJavadoc linesSingle lines commentMulti lines comment
org.slasoi.slamodel.vocab108719701681173346
org.slasoi.slamodel.sla.tools969101600114183
org.slasoi.slamodel.sla1613955320794413
org.slasoi.slamodel.sla.business770372138254
org.slasoi.slamodel.core10602299300340
org.slasoi.slamodel.primitives10391918265340
org.slasoi.slamodel.service7531759360102
org.slasoi.slamodel.vocab.ext1037139000272
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
795544645632553042250

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
org.slasoi.slamodel.vocab.bnf115947016
org.slasoi.slamodel.sla.tools.ExprValidator3002300
org.slasoi.slamodel.sla.tools._acc2041300
org.slasoi.slamodel.sla.tools.Validator172730
org.slasoi.slamodel.sla.tools.MetaModel1651300
org.slasoi.slamodel.service.Interface120028
org.slasoi.slamodel.vocab.core117500
org.slasoi.slamodel.vocab.units108500
org.slasoi.slamodel.vocab.xsd107500
org.slasoi.slamodel.vocab.meta104000
org.slasoi.slamodel.sla.business.ProductOfferingPrice981801
org.slasoi.slamodel.sla.Guaranteed92322
org.slasoi.slamodel.service.Interface.Operation861616
org.slasoi.slamodel.sla.tools._ispec81610
org.slasoi.slamodel.sla.SLATemplate801806
org.slasoi.slamodel.vocab.sla77500
org.slasoi.slamodel.sla.business.TerminationClause731700
org.slasoi.slamodel.vocab.common61500
org.slasoi.slamodel.vocab.B4Terms55500
org.slasoi.slamodel.sla.Party511113
org.slasoi.slamodel.vocab.business49500
org.slasoi.slamodel.sla.AgreementTerm481403
org.slasoi.slamodel.sla.Guaranteed.Action471211
org.slasoi.slamodel.sla.business.ComponentProductOfferingPrice431300
org.slasoi.slamodel.sla.Invocation431001
org.slasoi.slamodel.sla.InterfaceDeclr401301
org.slasoi.slamodel.sla.business.Termination38700
org.slasoi.slamodel.service.Interface.Operation.Property341102
org.slasoi.slamodel.sla.Guaranteed.State341101
org.slasoi.slamodel.core.TypeConstraintExpr331104

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
org.slasoi.slamodel.vocab.bnf115947016
org.slasoi.slamodel.sla.tools.ExprValidator3002300
org.slasoi.slamodel.sla.business.ProductOfferingPrice981801
org.slasoi.slamodel.sla.SLATemplate801806
org.slasoi.slamodel.sla.business.TerminationClause731700
org.slasoi.slamodel.service.Interface.Operation861616
org.slasoi.slamodel.sla.AgreementTerm481403
org.slasoi.slamodel.sla.business.ComponentProductOfferingPrice431300
org.slasoi.slamodel.sla.InterfaceDeclr401301
org.slasoi.slamodel.sla.tools.MetaModel1651300
org.slasoi.slamodel.sla.tools._acc2041300
org.slasoi.slamodel.sla.Guaranteed.Action471211
org.slasoi.slamodel.core.TypeConstraintExpr331104
org.slasoi.slamodel.service.Interface.Operation.Property341102
org.slasoi.slamodel.sla.Endpoint321101
org.slasoi.slamodel.sla.Guaranteed.State341101
org.slasoi.slamodel.sla.Party511113
org.slasoi.slamodel.service.Interface.Specification321012
org.slasoi.slamodel.service.ServiceRef261000
org.slasoi.slamodel.sla.Invocation431001
org.slasoi.slamodel.core.CompoundConstraintExpr24801
org.slasoi.slamodel.core.CompoundDomainExpr24801
org.slasoi.slamodel.core.EventExpr24801
org.slasoi.slamodel.core.FunctionalExpr24801
org.slasoi.slamodel.core.SimpleDomainExpr24801
org.slasoi.slamodel.primitives.CONST26801
org.slasoi.slamodel.primitives.TIME28803
org.slasoi.slamodel.sla.SLA22800
org.slasoi.slamodel.sla.VariableDeclr27801
org.slasoi.slamodel.core.Annotated18700

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
56.874,645.000.197.010.96

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
org.slasoi.slamodel.vocab.bnf.x_RENDER_PRODUCT_OFFERING_PRICE(ProductOfferingPrice,String,boolean)140340
org.slasoi.slamodel.sla.tools.Validator.x_FIRST_PASS(ExprValidator)117490
org.slasoi.slamodel.sla.tools.MetaModel.x_ADD_EXT(Extensions,boolean,boolean)77440
org.slasoi.slamodel.vocab.bnf.x_SLAT_CONTENT(SLATemplate,boolean)74240
org.slasoi.slamodel.vocab.bnf.x_RENDER_TERMINATION_CLAUSE(TerminationClause,String,boolean)67160
org.slasoi.slamodel.vocab.bnf.x_RENDER_INVOCATION(Invocation,String,boolean)56130
org.slasoi.slamodel.vocab.bnf.x_RENDER(Interface.Operation.Property,String,String,boolean)51140
org.slasoi.slamodel.sla.tools.ExprValidator.x_ID_CAT(ID,String)49270
org.slasoi.slamodel.sla.tools.ExprValidator.x_VALUE_EXPR_CAT(ValueExpr,String)48330
org.slasoi.slamodel.vocab.bnf.x_RENDER(Interface.Operation,String,boolean)48160
org.slasoi.slamodel.vocab.bnf.x_SLA(SLA,boolean)47160
org.slasoi.slamodel.vocab.bnf.x_RENDER(Guaranteed.Action,String,boolean)44100
org.slasoi.slamodel.vocab.bnf.x_RENDER(DomainExpr,boolean)44200
org.slasoi.slamodel.sla.tools._acc.p_REGISTER_ID(String,Entity)41200
org.slasoi.slamodel.vocab.bnf.x_RENDER(Interface.Specification,String,boolean)41130
org.slasoi.slamodel.sla.tools.ExprValidator.x_CONST_CAT(CONST)40310
org.slasoi.slamodel.vocab.bnf.x_RENDER(InterfaceDeclr,String,boolean)40110
org.slasoi.slamodel.vocab.bnf.x_RENDER(Guaranteed.State,String,boolean)4090
org.slasoi.slamodel.sla.tools._acc.p_GET_REGISTERED_ROLE_OF_PARTY_REF(ID,boolean)39270
org.slasoi.slamodel.vocab.bnf.x_RENDER(ConstraintExpr,boolean)38190
org.slasoi.slamodel.sla.business.ProductOfferingPrice.validate(ExprValidator)37210
org.slasoi.slamodel.vocab.bnf.x_RENDER(AgreementTerm,String,boolean)37110
org.slasoi.slamodel.vocab.bnf.x_ANNOT(Annotated,String,boolean)36120
org.slasoi.slamodel.vocab.bnf.x_RENDER(Endpoint,String,boolean)3690
org.slasoi.slamodel.sla.tools._acc.x_ENT_FOR_ID(String[])33190
org.slasoi.slamodel.vocab.bnf.x_RENDER(Party,String,boolean)32100
org.slasoi.slamodel.primitives._STND_bnf.p_STRING(STND)31260
org.slasoi.slamodel.vocab.bnf.render(SLATemplate,boolean)2981
org.slasoi.slamodel.vocab.bnf.x_RENDER(VariableDeclr,String,boolean)28110
org.slasoi.slamodel.vocab.bnf.x_RENDER_TERMINATION(Termination,String,boolean)2760

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
4,645.005.972.960.11

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 declarationpackage java.lang;
Import declarationimport java.awt.*;
Class declaration
  • public class Foo {
  • public class Foo extends Bla {
Interface declarationpublic interface Able ; {
Field declaration
  • int a;
  • int a, b, c = 5, d = 6;
Method declaration
  • public void cry();
  • public void gib() throws DeadException {
Constructor declarationpublic Foo() {
Constructor invocation
  • this();
  • super();
Statement declaration
  • i = 0;
  • if (ok)
  • if (exit) {
  • if (3 == 4);
  • if (4 == 4) { ;
  • } else {
Label declarationfine :

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