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.infrastructure.servicemanager.impl8595923116538162
org.slasoi.infrastructure.servicemanager.util.occi245404442093927
eu.slasoi.infrastructure.model675319372641182
org.slasoi.infrastructure.servicemanager.types832120158606
org.slasoi.infrastructure.servicemanager.prediction2101001533
eu.slasoi.infrastructure.model.infrastructure22982217808
org.slasoi.infrastructure.servicemanager.util.monitoring246816343
org.slasoi.infrastructure.servicemanager1214317197383
org.slasoi.infrastructure.servicemanager.exceptions83311166027
org.slasoi.infrastructure.servicemanager.occi.types10261623
org.slasoi.infrastructure.servicemanager.registry261553903
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
4228418001841121130407

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
org.slasoi.infrastructure.servicemanager.util.occi.InfrastructureUtil27730031
org.slasoi.infrastructure.servicemanager.impl.InfrastructureImpl24340018
org.slasoi.infrastructure.servicemanager.util.occi.CategoryPayload8815013
org.slasoi.infrastructure.servicemanager.prediction.PredictionQueryImpl83901
eu.slasoi.infrastructure.model.Category801503
eu.slasoi.infrastructure.model.MetricImpl781101
org.slasoi.infrastructure.servicemanager.impl.MetricDetailRegistryImpl75504
eu.slasoi.infrastructure.model.ProvisionRequest7427021
eu.slasoi.infrastructure.model.infrastructure.Compute6626017
org.slasoi.infrastructure.servicemanager.util.monitoring.MonitoringUtil52311
eu.slasoi.infrastructure.model.CapacityResponse40802
org.slasoi.infrastructure.servicemanager.impl.MetricRegistryImpl36403
org.slasoi.infrastructure.servicemanager.impl.Service2ProvisionResponseType33201
org.slasoi.infrastructure.servicemanager.impl.Reg32502
org.slasoi.infrastructure.servicemanager.Infrastructure2521017
org.slasoi.infrastructure.servicemanager.impl.LocRegistryImpl24101
org.slasoi.infrastructure.servicemanager.occi.types.Terms24001
org.slasoi.infrastructure.servicemanager.types.EndPoint23901
org.slasoi.infrastructure.servicemanager.types.Host23911
org.slasoi.infrastructure.servicemanager.impl.OSRegistryImpl22101
eu.slasoi.infrastructure.model.Kind21809
org.slasoi.infrastructure.servicemanager.impl.ImageRegistryImpl18101
org.slasoi.infrastructure.servicemanager.types.SchemaConstants16000
org.slasoi.infrastructure.servicemanager.types.ProvisionResponseType14505
org.slasoi.infrastructure.servicemanager.util.monitoring.MonitoringUtil.MessageListener14100
org.slasoi.infrastructure.servicemanager.types.Appliance11401
org.slasoi.infrastructure.servicemanager.types.ReservationResponseType11405
eu.slasoi.infrastructure.model.infrastructure.Service8304
eu.slasoi.infrastructure.model.IMetric7601
org.slasoi.infrastructure.servicemanager.registry.Registry6504

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
org.slasoi.infrastructure.servicemanager.impl.InfrastructureImpl24340018
org.slasoi.infrastructure.servicemanager.util.occi.InfrastructureUtil27730031
eu.slasoi.infrastructure.model.ProvisionRequest7427021
eu.slasoi.infrastructure.model.infrastructure.Compute6626017
org.slasoi.infrastructure.servicemanager.Infrastructure2521017
eu.slasoi.infrastructure.model.Category801503
org.slasoi.infrastructure.servicemanager.util.occi.CategoryPayload8815013
eu.slasoi.infrastructure.model.MetricImpl781101
org.slasoi.infrastructure.servicemanager.prediction.PredictionQueryImpl83901
org.slasoi.infrastructure.servicemanager.types.EndPoint23901
org.slasoi.infrastructure.servicemanager.types.Host23911
eu.slasoi.infrastructure.model.CapacityResponse40802
eu.slasoi.infrastructure.model.Kind21809
eu.slasoi.infrastructure.model.IMetric7601
org.slasoi.infrastructure.servicemanager.impl.MetricDetailRegistryImpl75504
org.slasoi.infrastructure.servicemanager.impl.Reg32502
org.slasoi.infrastructure.servicemanager.registry.Registry6504
org.slasoi.infrastructure.servicemanager.types.ProvisionResponseType14505
org.slasoi.infrastructure.servicemanager.impl.MetricRegistryImpl36403
org.slasoi.infrastructure.servicemanager.types.Appliance11401
org.slasoi.infrastructure.servicemanager.types.ReservationResponseType11405
eu.slasoi.infrastructure.model.infrastructure.Service8304
org.slasoi.infrastructure.servicemanager.util.monitoring.MonitoringUtil52311
org.slasoi.infrastructure.servicemanager.impl.Service2ProvisionResponseType33201
org.slasoi.infrastructure.servicemanager.exceptions.DescriptorException4102
org.slasoi.infrastructure.servicemanager.exceptions.ProvisionException4102
org.slasoi.infrastructure.servicemanager.exceptions.QueryException4102
org.slasoi.infrastructure.servicemanager.impl.ImageRegistryImpl18101
org.slasoi.infrastructure.servicemanager.impl.LocRegistryImpl24101
org.slasoi.infrastructure.servicemanager.impl.OSRegistryImpl22101

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
37.051,800.000.056.764.38

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
org.slasoi.infrastructure.servicemanager.prediction.PredictionQueryImpl.get(String)55190
org.slasoi.infrastructure.servicemanager.util.occi.CategoryPayload.equals(Object)45370
eu.slasoi.infrastructure.model.Category.equals(Object)37310
org.slasoi.infrastructure.servicemanager.impl.MetricDetailRegistryImpl.setup(IGrpResourceAvailMetadata)3691
eu.slasoi.infrastructure.model.MetricImpl.compareTo(IMetric)34120
org.slasoi.infrastructure.servicemanager.util.occi.InfrastructureUtil.createComputeConfiguration(String,String,String,String)3441
org.slasoi.infrastructure.servicemanager.util.occi.InfrastructureUtil.getCatgeorysForPayload(ProvisionRequestType)3461
org.slasoi.infrastructure.servicemanager.util.occi.InfrastructureUtil.getComputeAttribs(Compute,UUID)2821
org.slasoi.infrastructure.servicemanager.util.monitoring.MonitoringUtil.getMonitoringFeatures(int)2740
org.slasoi.infrastructure.servicemanager.impl.InfrastructureImpl.encompassUpdate(String,String,ProvisionRequestType)2461
org.slasoi.infrastructure.servicemanager.impl.LocRegistryImpl.setup(IGrpResourceAvailMetadata)2230
org.slasoi.infrastructure.servicemanager.impl.InfrastructureImpl.newServiceWithMD5(String,CategoryPayload,IServices)2131
org.slasoi.infrastructure.servicemanager.impl.MetricRegistryImpl.setup(IGrpResourceAvailMetadata)2160
org.slasoi.infrastructure.servicemanager.impl.InfrastructureImpl.encompassCreate(String,ProvisionRequestType)2031
org.slasoi.infrastructure.servicemanager.impl.OSRegistryImpl.setup(IGrpResourceAvailMetadata)2030
org.slasoi.infrastructure.servicemanager.impl.Service2ProvisionResponseType.apply(IService)2080
org.slasoi.infrastructure.servicemanager.util.occi.InfrastructureUtil.getCat(Category)1911
org.slasoi.infrastructure.servicemanager.impl.MetricDetailRegistryImpl.getMetricID(float,int,float)1830
eu.slasoi.infrastructure.model.CapacityResponse.equals(Object)17140
org.slasoi.infrastructure.servicemanager.impl.Reg.getCategoryByID(String)1740
org.slasoi.infrastructure.servicemanager.util.monitoring.MonitoringUtil.registerPubSubListener(PubSubManager)1710
org.slasoi.infrastructure.servicemanager.util.occi.InfrastructureUtil.setupActionList(IGrpResourceAvailMetadata)1761
org.slasoi.infrastructure.servicemanager.impl.ImageRegistryImpl.setup(IGrpResourceAvailMetadata)1620
org.slasoi.infrastructure.servicemanager.util.occi.InfrastructureUtil.createProvisionRequestType(Registry,String,String,String,String,String)1611
eu.slasoi.infrastructure.model.MetricImpl.equals(Object)15130
org.slasoi.infrastructure.servicemanager.util.occi.InfrastructureUtil.createProvisionRequestType(String,Compute)1511
org.slasoi.infrastructure.servicemanager.impl.InfrastructureImpl.reserve(ProvisionRequestType)1460
org.slasoi.infrastructure.servicemanager.util.monitoring.MonitoringUtil.MessageListener.processMessage(MessageEvent)1430
org.slasoi.infrastructure.servicemanager.impl.MetricDetailRegistryImpl.setCapacity(String,String,String,CapacityResponseType)1390
org.slasoi.infrastructure.servicemanager.util.occi.InfrastructureUtil.getDefaultServiceKind()1211

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
1,800.004.761.830.51

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