Fork me on GitHub

JavaNCSS Metric Results

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

The following document contains the results of a JavaNCSS metric analysis, using JavaNCSS version 33.54.
JavaNCSS web site.

Packages

Packages

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

Packages sorted by NCSS.

Package Classes Methods NCSS Javadocs Javadoc lines Single lines comment Multi lines comment
fr.paris.lutece.plugins.jsr168.pluto 7 46 512 53 261 66 280
fr.paris.lutece.plugins.jsr168.pluto.core 10 77 451 87 421 30 675
org.apache.pluto.portalImpl 1 5 316 1 7 22 34
org.apache.pluto.portalImpl.util 1 22 147 5 42 5 33
fr.paris.lutece.plugins.jsr168.business.portlet 3 20 127 23 109 8 127
org.apache.pluto.invoker.impl 1 10 125 1 6 10 45
org.apache.pluto.portalImpl.services 1 5 120 6 89 9 42
fr.paris.lutece.plugins.jsr168.pluto.services.portletentityregistry 1 10 112 11 34 9 94
fr.paris.lutece.plugins.jsr168.pluto.services.portletdefinitionregistry 1 6 108 7 18 18 52
fr.paris.lutece.plugins.jsr168.pluto.xml 5 18 107 23 109 0 165
org.apache.pluto.portalImpl.om.window.impl 1 17 99 6 30 3 35
fr.paris.lutece.plugins.jsr168.web.portlet 1 8 87 9 50 17 33
fr.paris.lutece.plugins.jsr168.pluto.services.factorymanager 1 5 80 6 44 8 86
org.apache.pluto.portalImpl.xml 1 2 62 0 0 6 36
fr.paris.lutece.plugins.jsr168.pluto.servlet 2 9 60 11 36 2 172
fr.paris.lutece.plugins.jsr168.pluto.services.log 1 13 42 12 39 2 33
fr.paris.lutece.plugins.jsr168.pluto.exception 2 7 20 9 43 0 66
fr.paris.lutece.plugins.jsr168.pluto.factory 2 4 17 2 6 0 66
org.apache.pluto.core.impl 1 1 17 0 0 2 36
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
43 285 2609 272 1344 217 2110

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.apache.pluto.portalImpl.Deploy 268 5 0 1
fr.paris.lutece.plugins.jsr168.pluto.LuteceToPlutoConnector 149 10 0 11
org.apache.pluto.portalImpl.util.NameValuePairs 142 22 2 5
fr.paris.lutece.plugins.jsr168.pluto.core.PortalURL 116 20 0 21
org.apache.pluto.portalImpl.services.ServiceManager 102 5 0 6
fr.paris.lutece.plugins.jsr168.pluto.PortletContainerImpl 99 7 0 8
fr.paris.lutece.plugins.jsr168.pluto.core.PortletURLProviderImpl 90 11 0 12
org.apache.pluto.invoker.impl.PortletInvokerImpl 89 10 0 1
org.apache.pluto.portalImpl.om.window.impl.PortletWindowImpl 87 17 0 6
fr.paris.lutece.plugins.jsr168.pluto.services.portletentityregistry.PortletEntityRegistryServiceFileImpl 86 10 0 11
fr.paris.lutece.plugins.jsr168.web.portlet.Jsr168PortletJspBean 75 8 0 9
fr.paris.lutece.plugins.jsr168.pluto.services.portletdefinitionregistry.PortletDefinitionRegistryServiceFileImpl 74 6 0 7
fr.paris.lutece.plugins.jsr168.pluto.services.factorymanager.FactoryManagerServiceImpl 68 5 0 6
fr.paris.lutece.plugins.jsr168.business.portlet.Jsr168Portlet 57 10 0 11
fr.paris.lutece.plugins.jsr168.pluto.LuteceHttpServletResponse 57 19 1 20
org.apache.pluto.portalImpl.xml.XmlParser 51 2 2 0
fr.paris.lutece.plugins.jsr168.pluto.LutecePlutoConstant 42 0 0 1
fr.paris.lutece.plugins.jsr168.pluto.core.DynamicInformationProviderImpl 39 12 0 13
fr.paris.lutece.plugins.jsr168.pluto.core.PortalContextProviderImpl 39 9 0 10
fr.paris.lutece.plugins.jsr168.business.portlet.Jsr168PortletDAO 38 6 0 7
fr.paris.lutece.plugins.jsr168.pluto.servlet.ServletRequestImpl 38 6 0 7
fr.paris.lutece.plugins.jsr168.pluto.Buttons 38 4 0 5
fr.paris.lutece.plugins.jsr168.pluto.services.log.LogServiceImpl 34 13 0 12
fr.paris.lutece.plugins.jsr168.pluto.xml.ServicesXMLHandler 30 4 0 5
fr.paris.lutece.plugins.jsr168.pluto.core.PortalEnvironment 22 7 0 8
fr.paris.lutece.plugins.jsr168.pluto.xml.XMLFactory 19 2 0 3
fr.paris.lutece.plugins.jsr168.pluto.PlutoSession 19 3 0 4
fr.paris.lutece.plugins.jsr168.pluto.core.ResourceURLProviderImpl 18 4 0 5
fr.paris.lutece.plugins.jsr168.pluto.xml.ServiceXML 16 5 0 6
fr.paris.lutece.plugins.jsr168.pluto.core.PortletContainerEnvironment 16 3 0 4

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.apache.pluto.portalImpl.util.NameValuePairs 142 22 2 5
fr.paris.lutece.plugins.jsr168.pluto.core.PortalURL 116 20 0 21
fr.paris.lutece.plugins.jsr168.pluto.LuteceHttpServletResponse 57 19 1 20
org.apache.pluto.portalImpl.om.window.impl.PortletWindowImpl 87 17 0 6
fr.paris.lutece.plugins.jsr168.pluto.services.log.LogServiceImpl 34 13 0 12
fr.paris.lutece.plugins.jsr168.pluto.core.DynamicInformationProviderImpl 39 12 0 13
fr.paris.lutece.plugins.jsr168.pluto.core.PortletURLProviderImpl 90 11 0 12
org.apache.pluto.invoker.impl.PortletInvokerImpl 89 10 0 1
fr.paris.lutece.plugins.jsr168.business.portlet.Jsr168Portlet 57 10 0 11
fr.paris.lutece.plugins.jsr168.pluto.services.portletentityregistry.PortletEntityRegistryServiceFileImpl 86 10 0 11
fr.paris.lutece.plugins.jsr168.pluto.LuteceToPlutoConnector 149 10 0 11
fr.paris.lutece.plugins.jsr168.pluto.core.PortalContextProviderImpl 39 9 0 10
fr.paris.lutece.plugins.jsr168.web.portlet.Jsr168PortletJspBean 75 8 0 9
fr.paris.lutece.plugins.jsr168.pluto.PortletContainerImpl 99 7 0 8
fr.paris.lutece.plugins.jsr168.pluto.core.PortalEnvironment 22 7 0 8
fr.paris.lutece.plugins.jsr168.business.portlet.Jsr168PortletDAO 38 6 0 7
fr.paris.lutece.plugins.jsr168.pluto.servlet.ServletRequestImpl 38 6 0 7
fr.paris.lutece.plugins.jsr168.pluto.services.portletdefinitionregistry.PortletDefinitionRegistryServiceFileImpl 74 6 0 7
org.apache.pluto.portalImpl.services.ServiceManager 102 5 0 6
org.apache.pluto.portalImpl.Deploy 268 5 0 1
fr.paris.lutece.plugins.jsr168.pluto.services.factorymanager.FactoryManagerServiceImpl 68 5 0 6
fr.paris.lutece.plugins.jsr168.pluto.xml.ServiceXML 16 5 0 6
fr.paris.lutece.plugins.jsr168.pluto.core.InformationProviderServiceFactoryImpl 14 5 0 6
fr.paris.lutece.plugins.jsr168.business.portlet.Jsr168PortletHome 15 4 0 5
fr.paris.lutece.plugins.jsr168.pluto.exception.LutecePlutoException 11 4 0 5
fr.paris.lutece.plugins.jsr168.pluto.Buttons 38 4 0 5
fr.paris.lutece.plugins.jsr168.pluto.xml.XMLFactoryException 12 4 0 5
fr.paris.lutece.plugins.jsr168.pluto.xml.ServicesXMLHandler 30 4 0 5
fr.paris.lutece.plugins.jsr168.pluto.core.ResourceURLProviderImpl 18 4 0 5
fr.paris.lutece.plugins.jsr168.pluto.exception.ContainerInitLutecePlutoException 7 3 0 4

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
49.74 2,609.00 0.12 6.63 6.33

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.apache.pluto.portalImpl.Deploy.prepareWebArchive(String,String) 145 27 0
org.apache.pluto.portalImpl.services.ServiceManager.init(ServletConfig,String) 60 20 1
org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletRequest,PortletResponse,Integer) 54 13 0
fr.paris.lutece.plugins.jsr168.pluto.services.factorymanager.FactoryManagerServiceImpl.init(ServletConfig,Properties) 51 14 1
org.apache.pluto.portalImpl.Deploy.deployArchive(String,String) 42 13 0
fr.paris.lutece.plugins.jsr168.pluto.PortletContainerImpl.processPortletAction(PortletWindow,HttpServletRequest,HttpServletResponse) 39 11 1
org.apache.pluto.portalImpl.Deploy.main(String[]) 33 21 0
org.apache.pluto.portalImpl.Deploy.addToEntityReg(String[]) 31 5 0
fr.paris.lutece.plugins.jsr168.pluto.services.portletdefinitionregistry.PortletDefinitionRegistryServiceFileImpl.load(Mapping,Mapping) 31 3 1
fr.paris.lutece.plugins.jsr168.pluto.LuteceToPlutoConnector.getPortletTitles() 28 6 1
fr.paris.lutece.plugins.jsr168.pluto.core.PortalURL.buildParameterParam(Map) 26 8 1
fr.paris.lutece.plugins.jsr168.pluto.Buttons.init(HttpServletRequest,HttpServletResponse,PortletDefinition,PortletWindowImpl) 25 7 1
fr.paris.lutece.plugins.jsr168.pluto.LuteceToPlutoConnector.requestAction(int,String) 25 4 1
fr.paris.lutece.plugins.jsr168.pluto.LuteceToPlutoConnector.init(ServletConfig) 24 4 1
fr.paris.lutece.plugins.jsr168.pluto.LuteceToPlutoConnector.render(int,String) 24 5 1
fr.paris.lutece.plugins.jsr168.pluto.core.PortalURL.buildParams(ObjectID,boolean,PortletMode,WindowState,Map) 24 11 1
fr.paris.lutece.plugins.jsr168.pluto.services.portletentityregistry.PortletEntityRegistryServiceFileImpl.store() 23 10 1
fr.paris.lutece.plugins.jsr168.pluto.services.portletdefinitionregistry.PortletDefinitionRegistryServiceFileImpl.init(ServletConfig,Properties) 22 5 1
fr.paris.lutece.plugins.jsr168.pluto.PortletContainerImpl.renderPortlet(PortletWindow,HttpServletRequest,HttpServletResponse) 22 8 1
fr.paris.lutece.plugins.jsr168.pluto.services.portletentityregistry.PortletEntityRegistryServiceFileImpl.internalLoad() 21 9 1
org.apache.pluto.portalImpl.om.window.impl.PortletWindowImpl.setRenderParameter(Map) 20 9 0
fr.paris.lutece.plugins.jsr168.pluto.servlet.ServletRequestImpl.ServletRequestImpl(HttpServletRequest,PortletWindowImpl) 20 4 1
org.apache.pluto.portalImpl.services.ServiceManager.destroy(ServletConfig) 18 8 1
org.apache.pluto.portalImpl.util.NameValuePairs.add(String,String[]) 17 9 0
fr.paris.lutece.plugins.jsr168.pluto.xml.XMLFactory.loadServicesXML(ServletContext,String) 17 10 1
org.apache.pluto.portalImpl.services.ServiceManager.postInit(ServletConfig) 16 7 1
fr.paris.lutece.plugins.jsr168.pluto.xml.ServicesXMLHandler.startElement(String,String,String,Attributes) 16 6 1
org.apache.pluto.portalImpl.xml.XmlParser.parsePortletXml(InputStream) 15 4 0
fr.paris.lutece.plugins.jsr168.pluto.core.PortletURLProviderImpl.toString() 15 5 1
fr.paris.lutece.plugins.jsr168.pluto.core.PortletURLProviderImpl.getRenderURL(HttpServletRequest,HttpServletResponse,PortletMode,WindowState,ObjectID) 15 4 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
2,609.00 6.34 2.27 0.78

Explanations

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