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.businessManager.common.service.impl4425421907291331733
org.slasoi.businessManager.common.service4425253996111375
org.slasoi.businessManager.common.service.policy6462610013195
org.slasoi.businessManager.common.service.promotion6462600013203
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
100598325016901603506

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
org.slasoi.businessManager.common.service.impl.ProductManagerImpl1552201
org.slasoi.businessManager.common.service.impl.CustomerProductManagerImpl1481803
org.slasoi.businessManager.common.service.impl.SlaUtilServiceImpl132500
org.slasoi.businessManager.common.service.impl.PolicyManagerImpl91900
org.slasoi.businessManager.common.service.policy.PolicyManagementImpl83400
org.slasoi.businessManager.common.service.promotion.PromotionManagementImpl82400
org.slasoi.businessManager.common.service.impl.PromotionManagerImpl75700
org.slasoi.businessManager.common.service.impl.ProductOfferManagerImpl71700
org.slasoi.businessManager.common.service.impl.ServiceManagerImpl651000
org.slasoi.businessManager.common.service.impl.PenaltyManagerImpl601100
org.slasoi.businessManager.common.service.impl.RuleTemplateManagerImpl51500
org.slasoi.businessManager.common.service.policy.PolicyParameter491700
org.slasoi.businessManager.common.service.promotion.PromotionParameter491700
org.slasoi.businessManager.common.service.impl.SatisfactionRateManagerImpl48700
org.slasoi.businessManager.common.service.impl.ParamTypeManagerImpl45600
org.slasoi.businessManager.common.service.impl.PartyManagerImpl361001
org.slasoi.businessManager.common.service.impl.RuleManagerImpl32500
org.slasoi.businessManager.common.service.policy.Policy311200
org.slasoi.businessManager.common.service.promotion.Promotion311200
org.slasoi.businessManager.common.service.impl.RuleContextManagerImpl27400
org.slasoi.businessManager.common.service.policy.Main27100
org.slasoi.businessManager.common.service.impl.PartyPartyRoleManagerImpl26600
org.slasoi.businessManager.common.service.promotion.Main26100
org.slasoi.businessManager.common.service.impl.CharacteristicManagerImpl23500
org.slasoi.businessManager.common.service.impl.SlaViolationManagerImpl23800
org.slasoi.businessManager.common.service.policy.PolicyType23900
org.slasoi.businessManager.common.service.promotion.PromotionType23900
org.slasoi.businessManager.common.service.impl.GeographicalServiceImpl21500
org.slasoi.businessManager.common.service.impl.GtTranslationManagerImpl21600
org.slasoi.businessManager.common.service.impl.SlaManagersManagerImpl21500

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
org.slasoi.businessManager.common.service.impl.ProductManagerImpl1552201
org.slasoi.businessManager.common.service.ProductManager212000
org.slasoi.businessManager.common.service.CustomerProductManager191802
org.slasoi.businessManager.common.service.impl.CustomerProductManagerImpl1481803
org.slasoi.businessManager.common.service.policy.PolicyParameter491700
org.slasoi.businessManager.common.service.promotion.PromotionParameter491700
org.slasoi.businessManager.common.service.policy.Policy311200
org.slasoi.businessManager.common.service.promotion.Promotion311200
org.slasoi.businessManager.common.service.impl.PenaltyManagerImpl601100
org.slasoi.businessManager.common.service.PenaltyManager121100
org.slasoi.businessManager.common.service.impl.PartyManagerImpl361001
org.slasoi.businessManager.common.service.impl.ServiceManagerImpl651000
org.slasoi.businessManager.common.service.PartyManager111000
org.slasoi.businessManager.common.service.ServiceManager111000
org.slasoi.businessManager.common.service.impl.PolicyManagerImpl91900
org.slasoi.businessManager.common.service.policy.PolicyType23900
org.slasoi.businessManager.common.service.PolicyManager10901
org.slasoi.businessManager.common.service.promotion.PromotionType23900
org.slasoi.businessManager.common.service.impl.SlaViolationManagerImpl23800
org.slasoi.businessManager.common.service.impl.UserServiceImpl20800
org.slasoi.businessManager.common.service.SlaViolationManager9800
org.slasoi.businessManager.common.service.UserService9800
org.slasoi.businessManager.common.service.impl.ProductOfferManagerImpl71700
org.slasoi.businessManager.common.service.impl.PromotionManagerImpl75700
org.slasoi.businessManager.common.service.impl.SatisfactionRateManagerImpl48700
org.slasoi.businessManager.common.service.ProductOfferManager8700
org.slasoi.businessManager.common.service.PromotionManager8700
org.slasoi.businessManager.common.service.SatisfactionRateManager8706
org.slasoi.businessManager.common.service.GtTranslationManager7600
org.slasoi.businessManager.common.service.impl.GtTranslationManagerImpl21600

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
22.893,250.000.005.980.16

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
org.slasoi.businessManager.common.service.impl.ProductOfferManagerImpl.getVariationsByPolicies(Long,GTDifference)47100
org.slasoi.businessManager.common.service.impl.SlaUtilServiceImpl.checkExpression(float,String,String)39130
org.slasoi.businessManager.common.service.impl.CustomerProductManagerImpl.applyPromotions(EmCustomersProducts)3870
org.slasoi.businessManager.common.service.impl.PenaltyManagerImpl.getPenaltiesPeriodOrderedByDate(String,Date,Date)3280
org.slasoi.businessManager.common.service.impl.SlaUtilServiceImpl.getPenaltiesFromSLA(SLA,String)2770
org.slasoi.businessManager.common.service.impl.SlaUtilServiceImpl.checkGuaranteed(SLA,String,float)2580
org.slasoi.businessManager.common.service.impl.SlaUtilServiceImpl.checkAvailability(SLA,float)2480
org.slasoi.businessManager.common.service.policy.Main.main(String[])2440
org.slasoi.businessManager.common.service.policy.PolicyManagementImpl.savePolicy(Policy)24100
org.slasoi.businessManager.common.service.impl.ProductManagerImpl.getProductOffer(ProductOffersAttr,int)2341
org.slasoi.businessManager.common.service.policy.PolicyManagementImpl.checkPolicyParameter(PolicyParameter,EmRuleTemplates)23160
org.slasoi.businessManager.common.service.promotion.Main.main(String[])2340
org.slasoi.businessManager.common.service.promotion.PromotionManagementImpl.savePromotion(Promotion)23130
org.slasoi.businessManager.common.service.promotion.PromotionManagementImpl.checkPromotionParameter(PromotionParameter,EmRuleTemplates)23160
org.slasoi.businessManager.common.service.impl.RuleTemplateManagerImpl.saveOrUpdateTemplate(EmRuleTemplates,String,String)2240
org.slasoi.businessManager.common.service.impl.PolicyManagerImpl.savePolicy(EmPolicies,Long,Long,Long,Long,String)2140
org.slasoi.businessManager.common.service.impl.CustomerProductManagerImpl.getVariationsByPromotion(Long,Long)2041
org.slasoi.businessManager.common.service.impl.ProductManagerImpl.saveProduct(EmSpProducts,ProductOffersAttr)2070
org.slasoi.businessManager.common.service.impl.PromotionManagerImpl.savePromotion(EmPromotions,Long,Long,Long,String)2040
org.slasoi.businessManager.common.service.impl.ServiceManagerImpl.saveService(EmSpServices,Long,EmSpServicesCharacteristic,String)1980
org.slasoi.businessManager.common.service.impl.CustomerProductManagerImpl.contractProductsOffer(EmParty,Long)1830
org.slasoi.businessManager.common.service.impl.CustomerProductManagerImpl.getServiceProvisioningName(EmCustomersProducts)18110
org.slasoi.businessManager.common.service.impl.ParamTypeManagerImpl.getTableColumns(String)1560
org.slasoi.businessManager.common.service.impl.PolicyManagerImpl.loadPolicyParams(Long)1520
org.slasoi.businessManager.common.service.impl.ProductManagerImpl.getComponentPrice(ProductOffersAttr,int)1510
org.slasoi.businessManager.common.service.impl.SlaUtilServiceImpl.checkTermination(SLA,String)1560
org.slasoi.businessManager.common.service.policy.PolicyManagementImpl.getPolicyByType(Long)1520
org.slasoi.businessManager.common.service.promotion.PromotionManagementImpl.getPromotionByType(Long)1520
org.slasoi.businessManager.common.service.impl.PolicyManagerImpl.getTemplateParams(Long)1420
org.slasoi.businessManager.common.service.impl.PromotionManagerImpl.getTemplateParams(Long)1420

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
3,250.003.381.440.03

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