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
gboat2.cxf.businessImpl 1 17 185 4 16 63 8
gboat2.cxf.utils 2 16 151 15 133 19 4
gboat2.cxf.action 2 22 150 1 8 12 5
gboat2.cxf.model 2 22 71 1 25 0 4
gboat2.cxf 4 4 31 2 12 3 29
gboat2.cxf.business 1 5 17 6 32 2 22
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
12 86 605 29 226 99 72

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
gboat2.cxf.businessImpl.WebServiceConfigBusinessImpl 156 17 0 4
gboat2.cxf.action.WebServiceConfigAction 104 19 0 0
gboat2.cxf.utils.CXFUtil 97 13 0 14
gboat2.cxf.model.WebServiceConfig 31 12 0 1
gboat2.cxf.model.WebServiceConfigParam 26 10 0 0
gboat2.cxf.utils.DTOFactory 19 3 0 1
gboat2.cxf.Activator 15 2 1 1
gboat2.cxf.business.IWebServiceConfigBusiness 12 5 0 6
gboat2.cxf.Activator.ServiceTracker 9 1 1 0
gboat2.cxf.action.WebServiceConfigParamAction 8 3 0 1
gboat2.cxf.Constant 7 0 0 1
gboat2.cxf.Activator.ServiceTracker.ActivatorInnerThread 6 1 0 0

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
gboat2.cxf.action.WebServiceConfigAction 104 19 0 0
gboat2.cxf.businessImpl.WebServiceConfigBusinessImpl 156 17 0 4
gboat2.cxf.utils.CXFUtil 97 13 0 14
gboat2.cxf.model.WebServiceConfig 31 12 0 1
gboat2.cxf.model.WebServiceConfigParam 26 10 0 0
gboat2.cxf.business.IWebServiceConfigBusiness 12 5 0 6
gboat2.cxf.action.WebServiceConfigParamAction 8 3 0 1
gboat2.cxf.utils.DTOFactory 19 3 0 1
gboat2.cxf.Activator 15 2 1 1
gboat2.cxf.Activator.ServiceTracker 9 1 1 0
gboat2.cxf.Activator.ServiceTracker.ActivatorInnerThread 6 1 0 0
gboat2.cxf.Constant 7 0 0 1

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
40.83 605.00 0.17 7.17 2.42

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
gboat2.cxf.utils.CXFUtil.invokeWebService(Client,String,Object) 31 15 1
gboat2.cxf.businessImpl.WebServiceConfigBusinessImpl.publishService(WebServiceConfig) 26 7 1
gboat2.cxf.businessImpl.WebServiceConfigBusinessImpl.initWebServiceAddress() 24 6 1
gboat2.cxf.action.WebServiceConfigAction.initEdit() 22 10 0
gboat2.cxf.utils.CXFUtil.invokeWrappedWebService(Client,Object) 21 8 1
gboat2.cxf.action.WebServiceConfigAction.getInterfaces() 19 8 0
gboat2.cxf.businessImpl.WebServiceConfigBusinessImpl.unpublishService(WebServiceConfig) 14 4 0
gboat2.cxf.businessImpl.WebServiceConfigBusinessImpl.tryPortFree(String) 13 6 0
gboat2.cxf.Activator.start(BundleContext) 12 1 0
gboat2.cxf.businessImpl.WebServiceConfigBusinessImpl.startPublishAndTrackWebService() 12 5 0
gboat2.cxf.utils.CXFUtil.getBindingOperationInfo(Client,String) 10 5 1
gboat2.cxf.action.WebServiceConfigAction.activeWebservice() 9 2 0
gboat2.cxf.Activator.ServiceTracker.addingService(IWebServiceConfigBusiness) 9 1 0
gboat2.cxf.businessImpl.WebServiceConfigBusinessImpl.getWebSerConfParam(String) 9 3 0
gboat2.cxf.businessImpl.WebServiceConfigBusinessImpl.addingService(ServiceReference) 8 5 0
gboat2.cxf.utils.CXFUtil.getParameters(BindingOperationInfo,boolean) 8 4 1
gboat2.cxf.businessImpl.WebServiceConfigBusinessImpl.removedService(ServiceReference,Object) 7 5 0
gboat2.cxf.utils.CXFUtil.createJaxWsDynamicClient(String,ClassLoader) 7 1 1
gboat2.cxf.utils.DTOFactory.getXMLGregorianCalendar(GregorianCalendar) 7 3 0
gboat2.cxf.utils.DTOFactory.getXMLGregorianCalendarDate(int,int,int) 7 3 0
gboat2.cxf.action.WebServiceConfigAction.postSave() 6 2 0
gboat2.cxf.action.WebServiceConfigAction.getBundleBySymbolicName(BundleContext,String) 6 4 0
gboat2.cxf.Activator.ServiceTracker.ActivatorInnerThread.task() 6 1 0
gboat2.cxf.businessImpl.WebServiceConfigBusinessImpl.getHost() 6 3 1
gboat2.cxf.businessImpl.WebServiceConfigBusinessImpl.initInterfacesToListening() 5 3 0
gboat2.cxf.businessImpl.WebServiceConfigBusinessImpl.decideCurrentService(String,String) 5 3 0
gboat2.cxf.action.WebServiceConfigAction.postList(Page) 4 2 0
gboat2.cxf.action.WebServiceConfigAction.getHostAddress() 4 1 0
gboat2.cxf.action.WebServiceConfigAction.inactiveWebservice() 4 1 0
gboat2.cxf.businessImpl.WebServiceConfigBusinessImpl.getActiveWebServiceConfigs() 4 1 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
605.00 5.07 2.08 0.26

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