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.myapps.web 3 4 129 7 44 9 99
fr.paris.lutece.plugins.myapps.business.portlet 4 17 118 21 90 9 132
fr.paris.lutece.plugins.myapps.web.portlet 1 5 90 6 36 2 33
fr.paris.lutece.plugins.myapps.service 5 21 89 26 134 0 165
fr.paris.lutece.plugins.myapps.business.parameter 3 10 64 13 66 1 99
fr.paris.lutece.plugins.myapps.business 2 20 59 22 107 1 69
fr.paris.lutece.plugins.myapps.util.crypto 1 3 47 4 20 16 33
fr.paris.lutece.plugins.myapps.service.portlet 1 6 20 7 32 0 33
fr.paris.lutece.plugins.myapps.service.parameter 1 5 18 6 32 0 33
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
21 91 634 112 561 38 696

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.myapps.web.portlet.MyAppsPortletJspBean 74 5 0 6
fr.paris.lutece.plugins.myapps.business.portlet.MyAppsPortlet 62 5 0 6
fr.paris.lutece.plugins.myapps.web.MyAppsApp 44 2 0 3
fr.paris.lutece.plugins.myapps.util.crypto.CryptoUtil 40 3 0 4
fr.paris.lutece.plugins.myapps.business.MyApps 38 14 0 15
fr.paris.lutece.plugins.myapps.business.parameter.MyAppsParameterDAO 37 3 0 4
fr.paris.lutece.plugins.myapps.service.MyAppsManager 23 5 0 6
fr.paris.lutece.plugins.myapps.service.MyAppsResourceIdService 21 4 0 5
fr.paris.lutece.plugins.myapps.business.MyAppsUser 16 6 0 7
fr.paris.lutece.plugins.myapps.service.portlet.MyAppsPortletService 15 6 0 7
fr.paris.lutece.plugins.myapps.web.MyAppsJspBean 15 1 0 2
fr.paris.lutece.plugins.myapps.business.portlet.MyAppsPortletHome 14 4 0 5
fr.paris.lutece.plugins.myapps.service.parameter.MyAppsParameterService 13 5 0 6
fr.paris.lutece.plugins.myapps.web.MyAppsAdminDashboardComponent 13 1 0 2
fr.paris.lutece.plugins.myapps.service.MyAppsProvider 10 9 0 10
fr.paris.lutece.plugins.myapps.business.parameter.MyAppsParameterHome 9 4 0 5
fr.paris.lutece.plugins.myapps.business.portlet.MyAppsPortletDAO 7 4 0 5
fr.paris.lutece.plugins.myapps.service.MyAppsService 7 2 0 3
fr.paris.lutece.plugins.myapps.business.portlet.IMyAppsPortletDAO 5 4 0 5
fr.paris.lutece.plugins.myapps.business.parameter.IMyAppsParameterDAO 4 3 0 4
fr.paris.lutece.plugins.myapps.service.MyAppsPlugin 3 1 0 2

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.myapps.business.MyApps 38 14 0 15
fr.paris.lutece.plugins.myapps.service.MyAppsProvider 10 9 0 10
fr.paris.lutece.plugins.myapps.business.MyAppsUser 16 6 0 7
fr.paris.lutece.plugins.myapps.service.portlet.MyAppsPortletService 15 6 0 7
fr.paris.lutece.plugins.myapps.business.portlet.MyAppsPortlet 62 5 0 6
fr.paris.lutece.plugins.myapps.service.parameter.MyAppsParameterService 13 5 0 6
fr.paris.lutece.plugins.myapps.service.MyAppsManager 23 5 0 6
fr.paris.lutece.plugins.myapps.web.portlet.MyAppsPortletJspBean 74 5 0 6
fr.paris.lutece.plugins.myapps.business.portlet.MyAppsPortletHome 14 4 0 5
fr.paris.lutece.plugins.myapps.business.portlet.IMyAppsPortletDAO 5 4 0 5
fr.paris.lutece.plugins.myapps.business.portlet.MyAppsPortletDAO 7 4 0 5
fr.paris.lutece.plugins.myapps.business.parameter.MyAppsParameterHome 9 4 0 5
fr.paris.lutece.plugins.myapps.service.MyAppsResourceIdService 21 4 0 5
fr.paris.lutece.plugins.myapps.business.parameter.IMyAppsParameterDAO 4 3 0 4
fr.paris.lutece.plugins.myapps.business.parameter.MyAppsParameterDAO 37 3 0 4
fr.paris.lutece.plugins.myapps.util.crypto.CryptoUtil 40 3 0 4
fr.paris.lutece.plugins.myapps.service.MyAppsService 7 2 0 3
fr.paris.lutece.plugins.myapps.web.MyAppsApp 44 2 0 3
fr.paris.lutece.plugins.myapps.service.MyAppsPlugin 3 1 0 2
fr.paris.lutece.plugins.myapps.web.MyAppsJspBean 15 1 0 2
fr.paris.lutece.plugins.myapps.web.MyAppsAdminDashboardComponent 13 1 0 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
22.38 634.00 0.00 4.33 5.33

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.paris.lutece.plugins.myapps.business.portlet.MyAppsPortlet.getXml(HttpServletRequest) 36 7 1
fr.paris.lutece.plugins.myapps.web.MyAppsApp.getManageMyAppsPage(XPage,HttpServletRequest,Plugin) 25 5 1
fr.paris.lutece.plugins.myapps.web.portlet.MyAppsPortletJspBean.doModify(HttpServletRequest) 20 5 1
fr.paris.lutece.plugins.myapps.util.crypto.CryptoUtil.encrypt(String,String) 18 2 1
fr.paris.lutece.plugins.myapps.util.crypto.CryptoUtil.decrypt(String,String) 18 3 1
fr.paris.lutece.plugins.myapps.web.portlet.MyAppsPortletJspBean.doCreate(HttpServletRequest) 16 4 1
fr.paris.lutece.plugins.myapps.web.portlet.MyAppsPortletJspBean.getModify(HttpServletRequest) 14 4 1
fr.paris.lutece.plugins.myapps.web.portlet.MyAppsPortletJspBean.doOpenMyApp(HttpServletRequest) 14 7 1
fr.paris.lutece.plugins.myapps.business.parameter.MyAppsParameterDAO.selectAll(Plugin) 13 3 1
fr.paris.lutece.plugins.myapps.business.parameter.MyAppsParameterDAO.load(String,Plugin) 12 3 1
fr.paris.lutece.plugins.myapps.web.MyAppsJspBean.doModifyMyAppsParameterDefaultValues(HttpServletRequest) 12 5 1
fr.paris.lutece.plugins.myapps.service.MyAppsResourceIdService.register() 11 1 1
fr.paris.lutece.plugins.myapps.service.MyAppsManager.getProvidersList() 10 5 1
fr.paris.lutece.plugins.myapps.web.MyAppsAdminDashboardComponent.getDashboardData(AdminUser,HttpServletRequest) 10 2 1
fr.paris.lutece.plugins.myapps.business.MyApps.equals(Object) 7 3 1
fr.paris.lutece.plugins.myapps.business.parameter.MyAppsParameterDAO.store(ReferenceItem,Plugin) 7 1 1
fr.paris.lutece.plugins.myapps.web.MyAppsApp.getPage(HttpServletRequest,int,Plugin) 6 1 1
fr.paris.lutece.plugins.myapps.web.portlet.MyAppsPortletJspBean.getCreate(HttpServletRequest) 5 1 1
fr.paris.lutece.plugins.myapps.business.portlet.MyAppsPortletHome.getInstance() 4 2 1
fr.paris.lutece.plugins.myapps.business.portlet.MyAppsPortletHome.getPortletTypeId() 4 1 1
fr.paris.lutece.plugins.myapps.service.portlet.MyAppsPortletService.getInstance() 4 2 1
fr.paris.lutece.plugins.myapps.service.parameter.MyAppsParameterService.getInstance() 4 2 1
fr.paris.lutece.plugins.myapps.service.MyAppsService.getInstance() 4 2 1
fr.paris.lutece.plugins.myapps.service.MyAppsManager.getInstance() 4 2 1
fr.paris.lutece.plugins.myapps.business.portlet.MyAppsPortletDAO.load(int) 3 1 1
fr.paris.lutece.plugins.myapps.business.MyApps.getIdApplication() 2 1 1
fr.paris.lutece.plugins.myapps.business.MyApps.setIdApplication(int) 2 1 1
fr.paris.lutece.plugins.myapps.business.MyApps.getName() 2 1 1
fr.paris.lutece.plugins.myapps.business.MyApps.setName(String) 2 1 1
fr.paris.lutece.plugins.myapps.business.MyApps.getDescription() 2 1 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
634.00 4.21 1.54 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).