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.dao.impl5119313801052191639
org.slasoi.businessManager.common.dao508427731601561
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
10127716571368193200

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
org.slasoi.businessManager.common.dao.impl.ProductDAOImpl1041602
org.slasoi.businessManager.common.dao.impl.CustomerProductDAOImpl861100
org.slasoi.businessManager.common.dao.impl.PartyDAOImpl69704
org.slasoi.businessManager.common.dao.impl.ProductOfferDAOImpl621001
org.slasoi.businessManager.common.dao.impl.ServiceDAOImpl45800
org.slasoi.businessManager.common.dao.impl.PenaltyDAOImpl39900
org.slasoi.businessManager.common.dao.impl.UserDAOImpl39600
org.slasoi.businessManager.common.dao.impl.ParamTypeDAOImpl36500
org.slasoi.businessManager.common.dao.impl.AbstractHibernateDAOImpl281010
org.slasoi.businessManager.common.dao.impl.GtTranslationDAOImpl28301
org.slasoi.businessManager.common.dao.impl.SlaViolationDAOImpl26700
org.slasoi.businessManager.common.dao.impl.CharacteristicDAOImpl19300
org.slasoi.businessManager.common.dao.impl.CurrencyDAOImpl19300
org.slasoi.businessManager.common.dao.impl.PartyPartyRoleDAOImpl19300
org.slasoi.businessManager.common.dao.impl.SatisfactionRateDAOImpl17400
org.slasoi.businessManager.common.dao.impl.GeographicalAreaDAOImpl16400
org.slasoi.businessManager.common.dao.impl.SlspDAOImpl16401
org.slasoi.businessManager.common.dao.impl.SlaWarningDAOImpl15400
org.slasoi.businessManager.common.dao.impl.SlaManagerDAOImpl14301
org.slasoi.businessManager.common.dao.impl.AttributeDAOImpl13300
org.slasoi.businessManager.common.dao.ProductDAO131200
org.slasoi.businessManager.common.dao.AbstractHibernateDAO121100
org.slasoi.businessManager.common.dao.impl.ServiceCharacteristicDAOImpl12400
org.slasoi.businessManager.common.dao.CustomerProductDAO10900
org.slasoi.businessManager.common.dao.impl.IndividualDAOImpl10300
org.slasoi.businessManager.common.dao.impl.ProductPromotionDAOImpl10300
org.slasoi.businessManager.common.dao.ProductOfferDAO9801
org.slasoi.businessManager.common.dao.impl.ParamDAOImpl8300
org.slasoi.businessManager.common.dao.impl.PolDAOImpl8300
org.slasoi.businessManager.common.dao.impl.PolTypeDAOImpl8300

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
org.slasoi.businessManager.common.dao.impl.ProductDAOImpl1041602
org.slasoi.businessManager.common.dao.ProductDAO131200
org.slasoi.businessManager.common.dao.AbstractHibernateDAO121100
org.slasoi.businessManager.common.dao.impl.CustomerProductDAOImpl861100
org.slasoi.businessManager.common.dao.impl.AbstractHibernateDAOImpl281010
org.slasoi.businessManager.common.dao.impl.ProductOfferDAOImpl621001
org.slasoi.businessManager.common.dao.CustomerProductDAO10900
org.slasoi.businessManager.common.dao.impl.PenaltyDAOImpl39900
org.slasoi.businessManager.common.dao.impl.ServiceDAOImpl45800
org.slasoi.businessManager.common.dao.ProductOfferDAO9801
org.slasoi.businessManager.common.dao.impl.PartyDAOImpl69704
org.slasoi.businessManager.common.dao.impl.SlaViolationDAOImpl26700
org.slasoi.businessManager.common.dao.PenaltyDAO8700
org.slasoi.businessManager.common.dao.impl.UserDAOImpl39600
org.slasoi.businessManager.common.dao.impl.ParamTypeDAOImpl36500
org.slasoi.businessManager.common.dao.PartyDAO6500
org.slasoi.businessManager.common.dao.SlaViolationDAO6500
org.slasoi.businessManager.common.dao.impl.GeographicalAreaDAOImpl16400
org.slasoi.businessManager.common.dao.impl.SatisfactionRateDAOImpl17400
org.slasoi.businessManager.common.dao.impl.ServiceCharacteristicDAOImpl12400
org.slasoi.businessManager.common.dao.impl.SlaWarningDAOImpl15400
org.slasoi.businessManager.common.dao.impl.SlspDAOImpl16401
org.slasoi.businessManager.common.dao.ServiceDAO5400
org.slasoi.businessManager.common.dao.impl.AttributeDAOImpl13300
org.slasoi.businessManager.common.dao.impl.CharacteristicDAOImpl19300
org.slasoi.businessManager.common.dao.impl.CurrencyDAOImpl19300
org.slasoi.businessManager.common.dao.impl.GtTranslationDAOImpl28301
org.slasoi.businessManager.common.dao.impl.IndividualDAOImpl10300
org.slasoi.businessManager.common.dao.impl.ParamDAOImpl8300
org.slasoi.businessManager.common.dao.impl.PartyPartyRoleDAOImpl19300

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
10.211,657.000.012.740.13

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
org.slasoi.businessManager.common.dao.impl.ProductDAOImpl.genericFind(String,String,EmParty,String,Long,boolean)36150
org.slasoi.businessManager.common.dao.impl.GtTranslationDAOImpl.getGtTranslation(String,EmGtTranslation)2261
org.slasoi.businessManager.common.dao.impl.ProductOfferDAOImpl.searchPartyProductOffers(Long,String,boolean,boolean)2250
org.slasoi.businessManager.common.dao.impl.ProductOfferDAOImpl.getByBslat(String)1961
org.slasoi.businessManager.common.dao.impl.PartyDAOImpl.getByIndividualName(String,String)1771
org.slasoi.businessManager.common.dao.impl.ServiceDAOImpl.find(Long,String)1760
org.slasoi.businessManager.common.dao.impl.ProductDAOImpl.getProductsWithAllCategories(String,String)1680
org.slasoi.businessManager.common.dao.impl.CustomerProductDAOImpl.getCustomerProductsAndServicesAttributes(EmParty,String)1520
org.slasoi.businessManager.common.dao.impl.ParamTypeDAOImpl.loadParamValues(EmParamType)1540
org.slasoi.businessManager.common.dao.impl.PartyDAOImpl.getByIDLoad(Long)1571
org.slasoi.businessManager.common.dao.impl.PartyDAOImpl.getByOrganizationName(String)1571
org.slasoi.businessManager.common.dao.impl.ProductDAOImpl.getProductOffersLoaded(Long)1440
org.slasoi.businessManager.common.dao.impl.UserDAOImpl.getUserByParty(Long,String)1470
org.slasoi.businessManager.common.dao.impl.CharacteristicDAOImpl.getCharacteristicByName(String)1360
org.slasoi.businessManager.common.dao.impl.CurrencyDAOImpl.getByName(String)1370
org.slasoi.businessManager.common.dao.impl.CustomerProductDAOImpl.getCustomerProductsActiveByDate(Date)1310
org.slasoi.businessManager.common.dao.impl.ParamTypeDAOImpl.getRefValue(EmParamType,String)1340
org.slasoi.businessManager.common.dao.impl.PartyPartyRoleDAOImpl.getRolesByParty(Long)1330
org.slasoi.businessManager.common.dao.impl.CustomerProductDAOImpl.getCustomerProductsByDateAndState(Date,String)1230
org.slasoi.businessManager.common.dao.impl.CustomerProductDAOImpl.getCustomerProductByIdLoaded(String)1040
org.slasoi.businessManager.common.dao.impl.PenaltyDAOImpl.getPenaltiesOrderedByDate(String,boolean)1020
org.slasoi.businessManager.common.dao.impl.PartyDAOImpl.getPartiesByRole(Long)910
org.slasoi.businessManager.common.dao.impl.SlaManagerDAOImpl.find(String,String,String)941
org.slasoi.businessManager.common.dao.impl.UserDAOImpl.getUser(String,String)930
org.slasoi.businessManager.common.dao.impl.AttributeDAOImpl.getAttributeByName(String)830
org.slasoi.businessManager.common.dao.impl.CustomerProductDAOImpl.getCustomerProductsByProductOfferAndParty(EmSpProductsOffer,EmParty)830
org.slasoi.businessManager.common.dao.impl.CustomerProductDAOImpl.getCustomerProductsByProduct(EmSpProducts)810
org.slasoi.businessManager.common.dao.impl.ProductDAOImpl.getProductByService(Long)811
org.slasoi.businessManager.common.dao.impl.CustomerProductDAOImpl.getCustomerProductsByPublisher(EmParty)710
org.slasoi.businessManager.common.dao.impl.PartyDAOImpl.getPartiesWithNegativeBalance()711

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
1,657.003.311.390.05

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