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.jsr286.pluto 8 57 503 41 209 37 284
fr.paris.lutece.plugins.jsr286.business.portlet 3 26 149 27 127 8 133
fr.paris.lutece.plugins.jsr286.web.portlet 1 10 103 8 41 22 51
com.mycomp.portal.jsr286 3 8 68 0 0 3 99
org.apache.pluto.examples 1 2 20 1 6 4 33
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
16 103 843 77 383 74 600

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.jsr286.pluto.LuteceToPlutoConnector 185 9 0 5
fr.paris.lutece.plugins.jsr286.web.portlet.Jsr286PortletJspBean 89 10 0 8
fr.paris.lutece.plugins.jsr286.business.portlet.Jsr286Portlet 73 16 0 15
fr.paris.lutece.plugins.jsr286.pluto.LuteceHttpServletResponse 57 19 1 20
fr.paris.lutece.plugins.jsr286.pluto.Buttons 52 4 0 5
fr.paris.lutece.plugins.jsr286.business.portlet.Jsr286PortletDAO 41 6 0 7
fr.paris.lutece.plugins.jsr286.pluto.RequiredContainerServicesImpl 25 6 0 0
fr.paris.lutece.plugins.jsr286.pluto.PortalContextImpl 24 5 0 3
fr.paris.lutece.plugins.jsr286.pluto.PlutoSession 20 3 0 4
fr.paris.lutece.plugins.jsr286.pluto.OptionalContainerServicesImpl 19 8 0 0
com.mycomp.portal.jsr286.SubscribeEventPortlet 17 2 0 0
com.mycomp.portal.jsr286.PublishEventPortlet 16 2 0 0
fr.paris.lutece.plugins.jsr286.business.portlet.Jsr286PortletHome 15 4 0 5
com.mycomp.portal.jsr286.WrapperEvent 13 4 0 0
fr.paris.lutece.plugins.jsr286.pluto.Button 10 3 0 4
org.apache.pluto.examples.HelloWorldPortlet 9 2 0 1

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.jsr286.pluto.LuteceHttpServletResponse 57 19 1 20
fr.paris.lutece.plugins.jsr286.business.portlet.Jsr286Portlet 73 16 0 15
fr.paris.lutece.plugins.jsr286.web.portlet.Jsr286PortletJspBean 89 10 0 8
fr.paris.lutece.plugins.jsr286.pluto.LuteceToPlutoConnector 185 9 0 5
fr.paris.lutece.plugins.jsr286.pluto.OptionalContainerServicesImpl 19 8 0 0
fr.paris.lutece.plugins.jsr286.business.portlet.Jsr286PortletDAO 41 6 0 7
fr.paris.lutece.plugins.jsr286.pluto.RequiredContainerServicesImpl 25 6 0 0
fr.paris.lutece.plugins.jsr286.pluto.PortalContextImpl 24 5 0 3
com.mycomp.portal.jsr286.WrapperEvent 13 4 0 0
fr.paris.lutece.plugins.jsr286.business.portlet.Jsr286PortletHome 15 4 0 5
fr.paris.lutece.plugins.jsr286.pluto.Buttons 52 4 0 5
fr.paris.lutece.plugins.jsr286.pluto.PlutoSession 20 3 0 4
fr.paris.lutece.plugins.jsr286.pluto.Button 10 3 0 4
org.apache.pluto.examples.HelloWorldPortlet 9 2 0 1
com.mycomp.portal.jsr286.PublishEventPortlet 16 2 0 0
com.mycomp.portal.jsr286.SubscribeEventPortlet 17 2 0 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
41.56 843.00 0.06 6.44 4.81

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.paris.lutece.plugins.jsr286.pluto.LuteceToPlutoConnector.render(int,String,PortletWindow) 41 9 0
fr.paris.lutece.plugins.jsr286.pluto.Buttons.init(HttpServletRequest,HttpServletResponse,PortletDefinition,PortletWindowImpl) 39 8 1
fr.paris.lutece.plugins.jsr286.pluto.LuteceToPlutoConnector.requestAction(int,String) 33 3 1
fr.paris.lutece.plugins.jsr286.pluto.LuteceToPlutoConnector.requestServeResource(int,String) 32 3 1
fr.paris.lutece.plugins.jsr286.web.portlet.Jsr286PortletJspBean.doCreate(HttpServletRequest) 17 4 1
fr.paris.lutece.plugins.jsr286.pluto.LuteceToPlutoConnector.getPortletTitles() 17 3 1
fr.paris.lutece.plugins.jsr286.web.portlet.Jsr286PortletJspBean.doModify(HttpServletRequest) 16 4 1
fr.paris.lutece.plugins.jsr286.pluto.LuteceToPlutoConnector.init() 15 4 0
fr.paris.lutece.plugins.jsr286.business.portlet.Jsr286Portlet.addPortletButtons(StringBuffer) 14 3 1
fr.paris.lutece.plugins.jsr286.pluto.LuteceToPlutoConnector.initPortletWindow(int,String,String) 13 1 0
com.mycomp.portal.jsr286.PublishEventPortlet.processAction(ActionRequest,ActionResponse) 11 5 0
fr.paris.lutece.plugins.jsr286.business.portlet.Jsr286PortletDAO.load(int) 11 2 1
fr.paris.lutece.plugins.jsr286.pluto.LuteceToPlutoConnector.request(int,String,int) 11 7 0
fr.paris.lutece.plugins.jsr286.business.portlet.Jsr286Portlet.addPortletTags(StringBuffer) 10 1 1
fr.paris.lutece.plugins.jsr286.web.portlet.Jsr286PortletJspBean.getModify(HttpServletRequest) 9 1 1
fr.paris.lutece.plugins.jsr286.web.portlet.Jsr286PortletJspBean.realiseAction(HttpServletRequest) 9 4 0
fr.paris.lutece.plugins.jsr286.pluto.LuteceToPlutoConnector.requestRender(int,String) 9 1 1
fr.paris.lutece.plugins.jsr286.pluto.RequiredContainerServicesImpl.RequiredContainerServicesImpl() 9 1 0
fr.paris.lutece.plugins.jsr286.business.portlet.Jsr286Portlet.getXml(HttpServletRequest) 8 1 1
fr.paris.lutece.plugins.jsr286.business.portlet.Jsr286Portlet.protectAmp(String) 8 3 1
fr.paris.lutece.plugins.jsr286.business.portlet.Jsr286PortletDAO.insert(Portlet) 8 1 1
fr.paris.lutece.plugins.jsr286.business.portlet.Jsr286PortletDAO.store(Portlet) 8 1 1
fr.paris.lutece.plugins.jsr286.web.portlet.Jsr286PortletJspBean.getCreate(HttpServletRequest) 8 1 1
fr.paris.lutece.plugins.jsr286.pluto.PortalContextImpl.getSupportedPortletModes() 8 2 1
fr.paris.lutece.plugins.jsr286.pluto.PlutoSession.getPortletWindow(String,String) 8 3 1
fr.paris.lutece.plugins.jsr286.pluto.PlutoSession.findSession(HttpServletRequest) 8 2 1
fr.paris.lutece.plugins.jsr286.pluto.LuteceToPlutoConnector.getButtons(int,String) 8 1 1
org.apache.pluto.examples.HelloWorldPortlet.doView(RenderRequest,RenderResponse) 7 1 0
fr.paris.lutece.plugins.jsr286.pluto.PortalContextImpl.getSupportedWindowStates() 7 2 1
fr.paris.lutece.plugins.jsr286.pluto.LuteceHttpServletResponse.LuteceHttpServletResponse(HttpServletResponse) 7 1 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
843.00 5.66 1.63 0.65

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