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.managewferror.business 14 165 828 158 836 23 483
fr.paris.lutece.plugins.managewferror.web 6 27 548 30 217 64 246
fr.paris.lutece.plugins.managewferror.business.service 4 15 148 5 14 5 153
fr.paris.lutece.plugins.managewferror.service.deamon 1 1 6 0 0 0 33
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
25 208 1530 193 1067 92 915

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.managewferror.web.ConfigJspBean 215 11 0 10
fr.paris.lutece.plugins.managewferror.business.ResourceDAO 202 13 0 14
fr.paris.lutece.plugins.managewferror.business.ConfigDAO 156 14 0 15
fr.paris.lutece.plugins.managewferror.web.ResourceJspBean 97 6 0 6
fr.paris.lutece.plugins.managewferror.business.ErrorDAO 90 8 0 9
fr.paris.lutece.plugins.managewferror.web.ErrorJspBean 66 7 0 8
fr.paris.lutece.plugins.managewferror.business.Resource 55 20 0 19
fr.paris.lutece.plugins.managewferror.business.Config 52 15 0 9
fr.paris.lutece.plugins.managewferror.business.service.ConfigService 44 5 0 1
fr.paris.lutece.plugins.managewferror.business.ResourceFilter 43 16 0 17
fr.paris.lutece.plugins.managewferror.business.service.ProcessTaskErrorService 38 4 0 1
fr.paris.lutece.plugins.managewferror.business.ConfigHome 33 14 0 10
fr.paris.lutece.plugins.managewferror.business.Error 27 10 0 11
fr.paris.lutece.plugins.managewferror.web.ConfigurationJspBean 24 1 0 2
fr.paris.lutece.plugins.managewferror.web.ManageQueueJspBean 24 1 0 2
fr.paris.lutece.plugins.managewferror.web.ManageErrorJspBean 24 1 0 2
fr.paris.lutece.plugins.managewferror.business.ResourceHome 24 10 0 11
fr.paris.lutece.plugins.managewferror.business.service.ConfigResourceIdService 21 3 0 0
fr.paris.lutece.plugins.managewferror.business.MappingAction 21 8 0 8
fr.paris.lutece.plugins.managewferror.business.ErrorHome 20 8 0 9
fr.paris.lutece.plugins.managewferror.business.IConfigDAO 14 13 0 9
fr.paris.lutece.plugins.managewferror.business.IResourceDAO 10 9 0 9
fr.paris.lutece.plugins.managewferror.business.IErrorDAO 8 7 0 8
fr.paris.lutece.plugins.managewferror.business.service.IProcessTaskErrorService 4 3 0 3
fr.paris.lutece.plugins.managewferror.service.deamon.RelaunchResourceDaemon 3 1 0 0

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.managewferror.business.Resource 55 20 0 19
fr.paris.lutece.plugins.managewferror.business.ResourceFilter 43 16 0 17
fr.paris.lutece.plugins.managewferror.business.Config 52 15 0 9
fr.paris.lutece.plugins.managewferror.business.ConfigHome 33 14 0 10
fr.paris.lutece.plugins.managewferror.business.ConfigDAO 156 14 0 15
fr.paris.lutece.plugins.managewferror.business.ResourceDAO 202 13 0 14
fr.paris.lutece.plugins.managewferror.business.IConfigDAO 14 13 0 9
fr.paris.lutece.plugins.managewferror.web.ConfigJspBean 215 11 0 10
fr.paris.lutece.plugins.managewferror.business.Error 27 10 0 11
fr.paris.lutece.plugins.managewferror.business.ResourceHome 24 10 0 11
fr.paris.lutece.plugins.managewferror.business.IResourceDAO 10 9 0 9
fr.paris.lutece.plugins.managewferror.business.ErrorDAO 90 8 0 9
fr.paris.lutece.plugins.managewferror.business.ErrorHome 20 8 0 9
fr.paris.lutece.plugins.managewferror.business.MappingAction 21 8 0 8
fr.paris.lutece.plugins.managewferror.web.ErrorJspBean 66 7 0 8
fr.paris.lutece.plugins.managewferror.business.IErrorDAO 8 7 0 8
fr.paris.lutece.plugins.managewferror.web.ResourceJspBean 97 6 0 6
fr.paris.lutece.plugins.managewferror.business.service.ConfigService 44 5 0 1
fr.paris.lutece.plugins.managewferror.business.service.ProcessTaskErrorService 38 4 0 1
fr.paris.lutece.plugins.managewferror.business.service.ConfigResourceIdService 21 3 0 0
fr.paris.lutece.plugins.managewferror.business.service.IProcessTaskErrorService 4 3 0 3
fr.paris.lutece.plugins.managewferror.web.ConfigurationJspBean 24 1 0 2
fr.paris.lutece.plugins.managewferror.web.ManageQueueJspBean 24 1 0 2
fr.paris.lutece.plugins.managewferror.web.ManageErrorJspBean 24 1 0 2
fr.paris.lutece.plugins.managewferror.service.deamon.RelaunchResourceDaemon 3 1 0 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
52.60 1,530.00 0.00 8.32 7.72

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.paris.lutece.plugins.managewferror.web.ConfigJspBean.getModifyConfig(HttpServletRequest) 72 36 1
fr.paris.lutece.plugins.managewferror.web.ConfigJspBean.getCreateConfig(HttpServletRequest) 44 23 1
fr.paris.lutece.plugins.managewferror.business.ResourceDAO.getSqlQueryFromFilter(ResourceFilter) 32 14 1
fr.paris.lutece.plugins.managewferror.web.ResourceJspBean.doProcessWorkflowAction(HttpServletRequest) 19 11 1
fr.paris.lutece.plugins.managewferror.web.ResourceJspBean.getManageResources(HttpServletRequest) 17 9 1
fr.paris.lutece.plugins.managewferror.business.ResourceDAO.load(int,Plugin) 17 2 1
fr.paris.lutece.plugins.managewferror.business.ResourceDAO.selectResourcesList(Plugin) 17 2 1
fr.paris.lutece.plugins.managewferror.business.ResourceDAO.loadByIdResource(int,Plugin) 17 2 1
fr.paris.lutece.plugins.managewferror.business.ErrorDAO.selectErrorsList(int,Plugin) 16 2 1
fr.paris.lutece.plugins.managewferror.business.ResourceDAO.addFilterParametersToDAOUtil(ResourceFilter,DAOUtil) 16 8 1
fr.paris.lutece.plugins.managewferror.web.ResourceJspBean.getWorkflowActionForm(HttpServletRequest) 15 8 1
fr.paris.lutece.plugins.managewferror.business.ErrorDAO.load(int,Plugin) 15 2 1
fr.paris.lutece.plugins.managewferror.business.ConfigDAO.loadMapping(int,Plugin) 15 2 1
fr.paris.lutece.plugins.managewferror.business.ConfigDAO.loadActionMapping(int,Plugin) 15 2 1
fr.paris.lutece.plugins.managewferror.business.service.ProcessTaskErrorService.saveErrorTrace(Resource) 15 5 0
fr.paris.lutece.plugins.managewferror.web.ConfigurationJspBean.getPaginatedListModel(HttpServletRequest,String,List,String) 14 2 1
fr.paris.lutece.plugins.managewferror.web.ManageQueueJspBean.getPaginatedListModel(HttpServletRequest,String,List,String) 14 2 1
fr.paris.lutece.plugins.managewferror.web.ManageErrorJspBean.getPaginatedListModel(HttpServletRequest,String,List,String) 14 2 1
fr.paris.lutece.plugins.managewferror.business.ResourceDAO.store(Resource,Plugin) 14 1 1
fr.paris.lutece.plugins.managewferror.business.ConfigDAO.load(int,Plugin) 14 2 1
fr.paris.lutece.plugins.managewferror.business.ConfigDAO.loadByWorkflow(int,Plugin) 14 2 1
fr.paris.lutece.plugins.managewferror.business.ConfigDAO.selectConfigsList(Plugin) 14 2 1
fr.paris.lutece.plugins.managewferror.business.service.ProcessTaskErrorService.doProcess() 14 6 0
fr.paris.lutece.plugins.managewferror.business.ResourceDAO.insert(Resource,Plugin) 13 1 1
fr.paris.lutece.plugins.managewferror.business.service.ConfigService.createConfig(Config) 13 4 0
fr.paris.lutece.plugins.managewferror.business.ResourceDAO.getResourceFormValues(DAOUtil) 12 1 1
fr.paris.lutece.plugins.managewferror.business.service.ConfigService.updateConfig(Config) 12 4 0
fr.paris.lutece.plugins.managewferror.business.ErrorDAO.insert(Error,Plugin) 11 1 1
fr.paris.lutece.plugins.managewferror.business.ErrorDAO.store(Error,Plugin) 11 1 1
fr.paris.lutece.plugins.managewferror.business.service.ConfigResourceIdService.register() 11 1 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,530.00 5.14 1.86 0.84

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