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.mytasks.web 3 13 270 16 91 15 99
fr.paris.lutece.plugins.mytasks.business 4 39 186 43 185 8 132
fr.paris.lutece.plugins.mytasks.service 3 19 122 22 99 3 99
fr.paris.lutece.plugins.mytasks.business.portlet 4 18 103 22 88 3 133
fr.paris.lutece.plugins.mytasks.web.portlet 1 4 71 5 25 4 33
fr.paris.lutece.plugins.mytasks.business.parameter 3 10 68 13 63 1 99
fr.paris.lutece.plugins.mytasks.service.portlet 1 7 21 8 34 0 33
fr.paris.lutece.plugins.mytasks.service.parameter 1 6 18 7 32 0 33
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
20 116 859 136 617 34 661

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.mytasks.web.MyTasksApp 187 11 0 12
fr.paris.lutece.plugins.mytasks.business.MyTaskDAO 108 10 0 11
fr.paris.lutece.plugins.mytasks.service.MyTasksService 73 14 0 15
fr.paris.lutece.plugins.mytasks.web.portlet.MyTasksPortletJspBean 59 4 0 5
fr.paris.lutece.plugins.mytasks.business.portlet.MyTasksPortlet 50 6 0 7
fr.paris.lutece.plugins.mytasks.business.parameter.MyTasksParameterDAO 37 3 0 4
fr.paris.lutece.plugins.mytasks.business.MyTaskHome 27 11 0 12
fr.paris.lutece.plugins.mytasks.business.MyTask 23 8 0 9
fr.paris.lutece.plugins.mytasks.service.MyTasksResourceIdService 21 4 0 5
fr.paris.lutece.plugins.mytasks.service.portlet.MyTasksPortletService 17 7 0 8
fr.paris.lutece.plugins.mytasks.web.MyTasksJspBean 16 1 0 2
fr.paris.lutece.plugins.mytasks.business.portlet.MyTasksPortletHome 15 4 0 5
fr.paris.lutece.plugins.mytasks.service.parameter.MyTasksParameterService 14 6 0 7
fr.paris.lutece.plugins.mytasks.web.MyTasksAdminDashboardComponent 12 1 0 2
fr.paris.lutece.plugins.mytasks.business.parameter.MyTasksParameterHome 11 4 0 5
fr.paris.lutece.plugins.mytasks.business.IMyTaskDAO 11 10 0 11
fr.paris.lutece.plugins.mytasks.business.portlet.MyTasksPortletDAO 8 4 0 5
fr.paris.lutece.plugins.mytasks.business.portlet.IMyTasksPortletDAO 5 4 0 5
fr.paris.lutece.plugins.mytasks.business.parameter.IMyTasksParameterDAO 4 3 0 4
fr.paris.lutece.plugins.mytasks.service.MyTasksPlugin 4 1 0 2

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.mytasks.service.MyTasksService 73 14 0 15
fr.paris.lutece.plugins.mytasks.business.MyTaskHome 27 11 0 12
fr.paris.lutece.plugins.mytasks.web.MyTasksApp 187 11 0 12
fr.paris.lutece.plugins.mytasks.business.MyTaskDAO 108 10 0 11
fr.paris.lutece.plugins.mytasks.business.IMyTaskDAO 11 10 0 11
fr.paris.lutece.plugins.mytasks.business.MyTask 23 8 0 9
fr.paris.lutece.plugins.mytasks.service.portlet.MyTasksPortletService 17 7 0 8
fr.paris.lutece.plugins.mytasks.business.portlet.MyTasksPortlet 50 6 0 7
fr.paris.lutece.plugins.mytasks.service.parameter.MyTasksParameterService 14 6 0 7
fr.paris.lutece.plugins.mytasks.business.portlet.IMyTasksPortletDAO 5 4 0 5
fr.paris.lutece.plugins.mytasks.business.portlet.MyTasksPortletDAO 8 4 0 5
fr.paris.lutece.plugins.mytasks.business.portlet.MyTasksPortletHome 15 4 0 5
fr.paris.lutece.plugins.mytasks.business.parameter.MyTasksParameterHome 11 4 0 5
fr.paris.lutece.plugins.mytasks.service.MyTasksResourceIdService 21 4 0 5
fr.paris.lutece.plugins.mytasks.web.portlet.MyTasksPortletJspBean 59 4 0 5
fr.paris.lutece.plugins.mytasks.business.parameter.IMyTasksParameterDAO 4 3 0 4
fr.paris.lutece.plugins.mytasks.business.parameter.MyTasksParameterDAO 37 3 0 4
fr.paris.lutece.plugins.mytasks.service.MyTasksPlugin 4 1 0 2
fr.paris.lutece.plugins.mytasks.web.MyTasksAdminDashboardComponent 12 1 0 2
fr.paris.lutece.plugins.mytasks.web.MyTasksJspBean 16 1 0 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
35.10 859.00 0.00 5.80 6.80

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.paris.lutece.plugins.mytasks.business.portlet.MyTasksPortlet.getXml(HttpServletRequest) 29 7 1
fr.paris.lutece.plugins.mytasks.web.MyTasksApp.doAddMyTask(HttpServletRequest) 29 10 1
fr.paris.lutece.plugins.mytasks.web.MyTasksApp.doUpdateMyTask(HttpServletRequest) 24 7 1
fr.paris.lutece.plugins.mytasks.web.MyTasksApp.getUpdateMyTaskPage(HttpServletRequest) 21 3 1
fr.paris.lutece.plugins.mytasks.web.MyTasksApp.doActionMyTask(HttpServletRequest) 21 8 1
fr.paris.lutece.plugins.mytasks.business.MyTaskDAO.selectMyTasksListFromUser(String,Plugin) 19 2 1
fr.paris.lutece.plugins.mytasks.web.portlet.MyTasksPortletJspBean.doModify(HttpServletRequest) 18 5 1
fr.paris.lutece.plugins.mytasks.web.portlet.MyTasksPortletJspBean.doCreate(HttpServletRequest) 16 4 1
fr.paris.lutece.plugins.mytasks.web.portlet.MyTasksPortletJspBean.getModify(HttpServletRequest) 15 4 1
fr.paris.lutece.plugins.mytasks.business.MyTaskDAO.load(int,Plugin) 14 2 1
fr.paris.lutece.plugins.mytasks.web.MyTasksApp.getPage(HttpServletRequest,int,Plugin) 14 5 1
fr.paris.lutece.plugins.mytasks.web.MyTasksApp.getAddMyTaskPage(HttpServletRequest) 14 2 1
fr.paris.lutece.plugins.mytasks.business.parameter.MyTasksParameterDAO.selectAll(Plugin) 13 3 1
fr.paris.lutece.plugins.mytasks.business.parameter.MyTasksParameterDAO.load(String,Plugin) 12 3 1
fr.paris.lutece.plugins.mytasks.service.MyTasksResourceIdService.register() 11 1 1
fr.paris.lutece.plugins.mytasks.web.MyTasksJspBean.doModifyMyTasksParameterDefaultValues(HttpServletRequest) 11 6 1
fr.paris.lutece.plugins.mytasks.business.MyTaskDAO.insert(MyTask,Plugin) 10 1 1
fr.paris.lutece.plugins.mytasks.service.MyTasksService.doUpdateMyTasksStatus(String[],LuteceUser) 10 5 1
fr.paris.lutece.plugins.mytasks.web.MyTasksApp.getMyTasksPage(HttpServletRequest) 10 1 1
fr.paris.lutece.plugins.mytasks.business.MyTaskDAO.newPrimaryKey(Plugin) 9 2 1
fr.paris.lutece.plugins.mytasks.business.MyTaskDAO.store(MyTask,Plugin) 9 1 1
fr.paris.lutece.plugins.mytasks.business.MyTaskDAO.getNbMyTasks(String,Plugin) 9 2 1
fr.paris.lutece.plugins.mytasks.service.MyTasksService.resetCacheFromUser(LuteceUser) 9 5 1
fr.paris.lutece.plugins.mytasks.web.MyTasksAdminDashboardComponent.getDashboardData(AdminUser,HttpServletRequest) 9 2 1
fr.paris.lutece.plugins.mytasks.web.MyTasksApp.doRemoveMyTask(HttpServletRequest) 8 2 1
fr.paris.lutece.plugins.mytasks.web.MyTasksApp.getUser(HttpServletRequest) 8 6 1
fr.paris.lutece.plugins.mytasks.business.MyTaskDAO.insertUserMyTask(String,int,Plugin) 7 1 1
fr.paris.lutece.plugins.mytasks.business.parameter.MyTasksParameterDAO.store(ReferenceItem,Plugin) 7 1 1
fr.paris.lutece.plugins.mytasks.service.MyTasksService.init() 7 2 1
fr.paris.lutece.plugins.mytasks.service.MyTasksService.getMyTasksList(LuteceUser) 7 2 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
859.00 5.06 1.71 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).