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.whatsnew.business 11 98 494 107 461 3 372
fr.paris.lutece.plugins.whatsnew.business.portlet 4 75 388 79 341 16 133
fr.paris.lutece.plugins.whatsnew.service 3 22 167 25 129 4 100
fr.paris.lutece.plugins.whatsnew.web.portlet 1 11 157 12 62 4 33
fr.paris.lutece.plugins.whatsnew.web 2 2 67 4 19 2 66
fr.paris.lutece.plugins.whatsnew.utils.constants 1 1 63 2 8 7 33
fr.paris.lutece.plugins.whatsnew.business.parameter 3 10 61 13 66 1 99
fr.paris.lutece.plugins.whatsnew.service.portlet 1 21 58 22 112 0 33
fr.paris.lutece.plugins.whatsnew.utils.sort 1 2 37 3 21 0 33
fr.paris.lutece.plugins.whatsnew.service.daemon 1 1 34 2 8 3 33
fr.paris.lutece.plugins.whatsnew.service.parameter 1 4 16 5 22 0 33
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
29 247 1542 274 1249 40 968

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.whatsnew.business.WhatsNewDAO 214 9 0 10
fr.paris.lutece.plugins.whatsnew.business.portlet.WhatsNewPortletDAO 200 20 0 21
fr.paris.lutece.plugins.whatsnew.web.portlet.WhatsNewPortletJspBean 135 11 0 12
fr.paris.lutece.plugins.whatsnew.service.WhatsNewService 99 17 0 18
fr.paris.lutece.plugins.whatsnew.business.portlet.WhatsNewPortlet 93 21 0 22
fr.paris.lutece.plugins.whatsnew.utils.constants.WhatsNewConstants 62 1 0 2
fr.paris.lutece.plugins.whatsnew.business.WhatsNew 61 19 0 20
fr.paris.lutece.plugins.whatsnew.service.portlet.WhatsNewPortletService 49 21 0 22
fr.paris.lutece.plugins.whatsnew.business.portlet.WhatsNewPortletHome 40 17 0 18
fr.paris.lutece.plugins.whatsnew.business.parameter.WhatsNewParameterDAO 34 3 0 4
fr.paris.lutece.plugins.whatsnew.utils.sort.WhatsNewComparator 32 2 0 3
fr.paris.lutece.plugins.whatsnew.business.WhatsNewTypeDocument 27 6 0 7
fr.paris.lutece.plugins.whatsnew.business.WhatsNewTypePortlet 27 6 0 7
fr.paris.lutece.plugins.whatsnew.business.WhatsNewHome 22 10 0 11
fr.paris.lutece.plugins.whatsnew.business.IWhatsNew 22 21 0 22
fr.paris.lutece.plugins.whatsnew.service.WhatsNewResourceIdService 21 4 0 5
fr.paris.lutece.plugins.whatsnew.service.daemon.DaemonCleanerModeratedElements 20 1 0 2
fr.paris.lutece.plugins.whatsnew.business.WhatsNewType 18 7 0 8
fr.paris.lutece.plugins.whatsnew.business.WhatsNewTypePage 18 4 0 5
fr.paris.lutece.plugins.whatsnew.business.portlet.IWhatsNewPortletDAO 18 17 0 18
fr.paris.lutece.plugins.whatsnew.web.WhatsNewAdminDashboardComponent 16 1 0 2
fr.paris.lutece.plugins.whatsnew.web.WhatsNewJspBean 14 1 0 2
fr.paris.lutece.plugins.whatsnew.business.PortletDocumentLink 14 5 0 6
fr.paris.lutece.plugins.whatsnew.service.parameter.WhatsNewParameterService 11 4 0 5
fr.paris.lutece.plugins.whatsnew.business.IWhatsNewDAO 10 9 0 10
fr.paris.lutece.plugins.whatsnew.business.parameter.WhatsNewParameterHome 9 4 0 5
fr.paris.lutece.plugins.whatsnew.business.ElementOrderEnum 5 2 0 1
fr.paris.lutece.plugins.whatsnew.service.WhatsNewPlugin 5 1 0 2
fr.paris.lutece.plugins.whatsnew.business.parameter.IWhatsNewParameterDAO 4 3 0 4

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.whatsnew.business.IWhatsNew 22 21 0 22
fr.paris.lutece.plugins.whatsnew.business.portlet.WhatsNewPortlet 93 21 0 22
fr.paris.lutece.plugins.whatsnew.service.portlet.WhatsNewPortletService 49 21 0 22
fr.paris.lutece.plugins.whatsnew.business.portlet.WhatsNewPortletDAO 200 20 0 21
fr.paris.lutece.plugins.whatsnew.business.WhatsNew 61 19 0 20
fr.paris.lutece.plugins.whatsnew.business.portlet.WhatsNewPortletHome 40 17 0 18
fr.paris.lutece.plugins.whatsnew.business.portlet.IWhatsNewPortletDAO 18 17 0 18
fr.paris.lutece.plugins.whatsnew.service.WhatsNewService 99 17 0 18
fr.paris.lutece.plugins.whatsnew.web.portlet.WhatsNewPortletJspBean 135 11 0 12
fr.paris.lutece.plugins.whatsnew.business.WhatsNewHome 22 10 0 11
fr.paris.lutece.plugins.whatsnew.business.IWhatsNewDAO 10 9 0 10
fr.paris.lutece.plugins.whatsnew.business.WhatsNewDAO 214 9 0 10
fr.paris.lutece.plugins.whatsnew.business.WhatsNewType 18 7 0 8
fr.paris.lutece.plugins.whatsnew.business.WhatsNewTypeDocument 27 6 0 7
fr.paris.lutece.plugins.whatsnew.business.WhatsNewTypePortlet 27 6 0 7
fr.paris.lutece.plugins.whatsnew.business.PortletDocumentLink 14 5 0 6
fr.paris.lutece.plugins.whatsnew.business.WhatsNewTypePage 18 4 0 5
fr.paris.lutece.plugins.whatsnew.business.parameter.WhatsNewParameterHome 9 4 0 5
fr.paris.lutece.plugins.whatsnew.service.WhatsNewResourceIdService 21 4 0 5
fr.paris.lutece.plugins.whatsnew.service.parameter.WhatsNewParameterService 11 4 0 5
fr.paris.lutece.plugins.whatsnew.business.parameter.IWhatsNewParameterDAO 4 3 0 4
fr.paris.lutece.plugins.whatsnew.business.parameter.WhatsNewParameterDAO 34 3 0 4
fr.paris.lutece.plugins.whatsnew.business.ElementOrderEnum 5 2 0 1
fr.paris.lutece.plugins.whatsnew.utils.sort.WhatsNewComparator 32 2 0 3
fr.paris.lutece.plugins.whatsnew.web.WhatsNewAdminDashboardComponent 16 1 0 2
fr.paris.lutece.plugins.whatsnew.web.WhatsNewJspBean 14 1 0 2
fr.paris.lutece.plugins.whatsnew.service.WhatsNewPlugin 5 1 0 2
fr.paris.lutece.plugins.whatsnew.service.daemon.DaemonCleanerModeratedElements 20 1 0 2
fr.paris.lutece.plugins.whatsnew.utils.constants.WhatsNewConstants 62 1 0 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
44.83 1,542.00 0.00 8.52 9.45

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.paris.lutece.plugins.whatsnew.business.portlet.WhatsNewPortlet.getXml(HttpServletRequest) 44 12 1
fr.paris.lutece.plugins.whatsnew.web.portlet.WhatsNewPortletJspBean.getPortletData(WhatsNewPortlet,HttpServletRequest) 37 11 1
fr.paris.lutece.plugins.whatsnew.business.WhatsNewDAO.selectPortlets(Integer,Locale) 29 6 1
fr.paris.lutece.plugins.whatsnew.business.WhatsNewDAO.selectDocuments(PortletDocumentLink,Locale) 28 6 1
fr.paris.lutece.plugins.whatsnew.business.WhatsNewDAO.selectPages(Integer,Locale) 25 6 1
fr.paris.lutece.plugins.whatsnew.utils.sort.WhatsNewComparator.compare(IWhatsNew,IWhatsNew) 25 19 1
fr.paris.lutece.plugins.whatsnew.business.WhatsNewDAO.selectPortletsByCriterias(Timestamp,Locale) 23 2 1
fr.paris.lutece.plugins.whatsnew.business.WhatsNewDAO.selectDocumentsByCriterias(Timestamp,Plugin,Locale) 23 2 1
fr.paris.lutece.plugins.whatsnew.service.WhatsNewService.getModeratedElementsListHtml(WhatsNewPortlet,Locale) 23 5 1
fr.paris.lutece.plugins.whatsnew.business.WhatsNewDAO.isDocumentOutOfDate(PortletDocumentLink,Timestamp,Plugin) 20 2 1
fr.paris.lutece.plugins.whatsnew.web.portlet.WhatsNewPortletJspBean.getModify(HttpServletRequest) 19 4 1
fr.paris.lutece.plugins.whatsnew.web.portlet.WhatsNewPortletJspBean.doModify(HttpServletRequest) 19 5 1
fr.paris.lutece.plugins.whatsnew.business.WhatsNewDAO.selectPagesByCriterias(Timestamp,Locale) 19 2 1
fr.paris.lutece.plugins.whatsnew.business.portlet.WhatsNewPortletDAO.findAll() 19 2 1
fr.paris.lutece.plugins.whatsnew.service.daemon.DaemonCleanerModeratedElements.run() 19 8 1
fr.paris.lutece.plugins.whatsnew.business.portlet.WhatsNewPortletDAO.load(int) 18 2 1
fr.paris.lutece.plugins.whatsnew.business.WhatsNewDAO.isPageOutOfDate(int,Timestamp) 17 2 1
fr.paris.lutece.plugins.whatsnew.business.WhatsNewDAO.isPortletOutOfDate(int,Timestamp) 17 2 1
fr.paris.lutece.plugins.whatsnew.web.portlet.WhatsNewPortletJspBean.doCreate(HttpServletRequest) 16 4 1
fr.paris.lutece.plugins.whatsnew.business.WhatsNew.getXml(HttpServletRequest) 16 3 1
fr.paris.lutece.plugins.whatsnew.business.portlet.WhatsNewPortletDAO.insert(Portlet) 15 1 1
fr.paris.lutece.plugins.whatsnew.business.portlet.WhatsNewPortletDAO.store(Portlet) 15 1 1
fr.paris.lutece.plugins.whatsnew.web.WhatsNewAdminDashboardComponent.getDashboardData(AdminUser,HttpServletRequest) 14 2 1
fr.paris.lutece.plugins.whatsnew.business.portlet.WhatsNewPortletDAO.loadDocumentFromWhatsNewPortletId(int,Plugin) 13 2 1
fr.paris.lutece.plugins.whatsnew.web.WhatsNewJspBean.doModifyWhatsNewParameterDefaultValues(HttpServletRequest) 12 5 1
fr.paris.lutece.plugins.whatsnew.business.parameter.WhatsNewParameterDAO.selectAll(Plugin) 12 3 1
fr.paris.lutece.plugins.whatsnew.business.WhatsNewTypeDocument.buildUrl() 11 1 1
fr.paris.lutece.plugins.whatsnew.business.WhatsNewTypePortlet.buildUrl() 11 1 1
fr.paris.lutece.plugins.whatsnew.business.parameter.WhatsNewParameterDAO.load(String,Plugin) 11 2 1
fr.paris.lutece.plugins.whatsnew.service.WhatsNewResourceIdService.register() 11 1 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,542.00 4.58 1.49 1.00

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