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.sqlpage.web 7 36 544 43 282 59 237
fr.paris.lutece.plugins.sqlpage.business 8 71 354 79 431 14 264
fr.paris.lutece.plugins.sqlpage.service 6 25 212 27 184 4 198
fr.paris.lutece.plugins.sqlpage.business.parameter 4 32 164 36 178 3 135
fr.paris.lutece.plugins.sqlpage.business.query 3 4 55 7 39 0 99
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
28 168 1329 192 1114 80 933

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.sqlpage.web.SQLFragmentJspBean 176 12 0 13
fr.paris.lutece.plugins.sqlpage.web.ManageSQLPageParameterJspBean 99 9 0 10
fr.paris.lutece.plugins.sqlpage.web.SQLPageJspBean 99 9 0 10
fr.paris.lutece.plugins.sqlpage.business.SQLFragmentDAO 91 7 0 8
fr.paris.lutece.plugins.sqlpage.business.parameter.SQLPageParameterDAO 91 7 0 8
fr.paris.lutece.plugins.sqlpage.business.SQLPageDAO 87 8 0 9
fr.paris.lutece.plugins.sqlpage.service.SQLPageService 67 8 0 9
fr.paris.lutece.plugins.sqlpage.service.SQLService 49 9 0 10
fr.paris.lutece.plugins.sqlpage.business.SQLFragment 42 16 0 17
fr.paris.lutece.plugins.sqlpage.business.parameter.SQLPageParameter 32 12 0 13
fr.paris.lutece.plugins.sqlpage.business.SQLPage 32 12 0 13
fr.paris.lutece.plugins.sqlpage.business.query.QueryDAO 31 1 0 2
fr.paris.lutece.plugins.sqlpage.web.SQLPageSecondJspBean 29 2 0 3
fr.paris.lutece.plugins.sqlpage.business.SQLPageHome 28 8 0 9
fr.paris.lutece.plugins.sqlpage.web.SQLPageApp 24 3 0 4
fr.paris.lutece.plugins.sqlpage.web.ManageSQLPageJspBean 21 1 0 2
fr.paris.lutece.plugins.sqlpage.business.SQLFragmentHome 20 7 0 8
fr.paris.lutece.plugins.sqlpage.business.parameter.SQLPageParameterHome 18 7 0 8
fr.paris.lutece.plugins.sqlpage.service.SQLReportLauncher 16 3 0 0
fr.paris.lutece.plugins.sqlpage.service.SQLPageWorkgroupRemovalListener 11 2 0 3
fr.paris.lutece.plugins.sqlpage.web.SQLPageConstants 11 0 0 1
fr.paris.lutece.plugins.sqlpage.service.TemplateService 9 2 0 3
fr.paris.lutece.plugins.sqlpage.business.ISQLPageDAO 8 7 0 8
fr.paris.lutece.plugins.sqlpage.business.parameter.ISQLPageParameterDAO 7 6 0 7
fr.paris.lutece.plugins.sqlpage.business.ISQLFragmentDAO 7 6 0 7
fr.paris.lutece.plugins.sqlpage.business.query.ResultSetRow 6 2 0 3
fr.paris.lutece.plugins.sqlpage.service.SQLPagePlugin 5 1 0 2
fr.paris.lutece.plugins.sqlpage.business.query.SQLQueryException 3 1 0 2

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.sqlpage.business.SQLFragment 42 16 0 17
fr.paris.lutece.plugins.sqlpage.business.parameter.SQLPageParameter 32 12 0 13
fr.paris.lutece.plugins.sqlpage.business.SQLPage 32 12 0 13
fr.paris.lutece.plugins.sqlpage.web.SQLFragmentJspBean 176 12 0 13
fr.paris.lutece.plugins.sqlpage.service.SQLService 49 9 0 10
fr.paris.lutece.plugins.sqlpage.web.ManageSQLPageParameterJspBean 99 9 0 10
fr.paris.lutece.plugins.sqlpage.web.SQLPageJspBean 99 9 0 10
fr.paris.lutece.plugins.sqlpage.business.SQLPageDAO 87 8 0 9
fr.paris.lutece.plugins.sqlpage.business.SQLPageHome 28 8 0 9
fr.paris.lutece.plugins.sqlpage.service.SQLPageService 67 8 0 9
fr.paris.lutece.plugins.sqlpage.business.ISQLPageDAO 8 7 0 8
fr.paris.lutece.plugins.sqlpage.business.SQLFragmentHome 20 7 0 8
fr.paris.lutece.plugins.sqlpage.business.SQLFragmentDAO 91 7 0 8
fr.paris.lutece.plugins.sqlpage.business.parameter.SQLPageParameterHome 18 7 0 8
fr.paris.lutece.plugins.sqlpage.business.parameter.SQLPageParameterDAO 91 7 0 8
fr.paris.lutece.plugins.sqlpage.business.parameter.ISQLPageParameterDAO 7 6 0 7
fr.paris.lutece.plugins.sqlpage.business.ISQLFragmentDAO 7 6 0 7
fr.paris.lutece.plugins.sqlpage.service.SQLReportLauncher 16 3 0 0
fr.paris.lutece.plugins.sqlpage.web.SQLPageApp 24 3 0 4
fr.paris.lutece.plugins.sqlpage.business.query.ResultSetRow 6 2 0 3
fr.paris.lutece.plugins.sqlpage.service.TemplateService 9 2 0 3
fr.paris.lutece.plugins.sqlpage.service.SQLPageWorkgroupRemovalListener 11 2 0 3
fr.paris.lutece.plugins.sqlpage.web.SQLPageSecondJspBean 29 2 0 3
fr.paris.lutece.plugins.sqlpage.business.query.SQLQueryException 3 1 0 2
fr.paris.lutece.plugins.sqlpage.business.query.QueryDAO 31 1 0 2
fr.paris.lutece.plugins.sqlpage.service.SQLPagePlugin 5 1 0 2
fr.paris.lutece.plugins.sqlpage.web.ManageSQLPageJspBean 21 1 0 2
fr.paris.lutece.plugins.sqlpage.web.SQLPageConstants 11 0 0 1

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
39.96 1,329.00 0.00 6.00 6.86

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.paris.lutece.plugins.sqlpage.business.query.QueryDAO.getQueryResults(String,PluginConnectionService) 30 9 1
fr.paris.lutece.plugins.sqlpage.service.SQLPageService.getSQLTemplate(String) 19 6 1
fr.paris.lutece.plugins.sqlpage.business.SQLFragmentDAO.selectSQLFragmentsList(int,Plugin) 18 2 1
fr.paris.lutece.plugins.sqlpage.web.SQLFragmentJspBean.doCreateSQLFragment(HttpServletRequest) 18 9 1
fr.paris.lutece.plugins.sqlpage.business.SQLFragmentDAO.load(int,Plugin) 17 2 1
fr.paris.lutece.plugins.sqlpage.web.SQLFragmentJspBean.doModifySQLFragment(HttpServletRequest) 17 8 1
fr.paris.lutece.plugins.sqlpage.business.parameter.SQLPageParameterDAO.selectSQLPageParametersList(int,Plugin) 16 2 1
fr.paris.lutece.plugins.sqlpage.business.parameter.SQLPageParameterDAO.selectSQLPageParameterByKey(String,int,Plugin) 16 2 1
fr.paris.lutece.plugins.sqlpage.business.parameter.SQLPageParameterDAO.load(int,Plugin) 15 2 1
fr.paris.lutece.plugins.sqlpage.service.SQLPageService.getStringSQLFragment(int,HttpServletRequest) 15 5 1
fr.paris.lutece.plugins.sqlpage.web.SQLFragmentJspBean.doMoveUp(HttpServletRequest) 15 4 1
fr.paris.lutece.plugins.sqlpage.web.SQLFragmentJspBean.doMoveDown(HttpServletRequest) 15 4 1
fr.paris.lutece.plugins.sqlpage.business.SQLPageDAO.load(int,Plugin) 14 2 1
fr.paris.lutece.plugins.sqlpage.business.SQLPageDAO.selectSQLPagesList(Plugin) 14 2 1
fr.paris.lutece.plugins.sqlpage.web.ManageSQLPageParameterJspBean.getModifySQLPageParameter(HttpServletRequest) 14 5 1
fr.paris.lutece.plugins.sqlpage.web.ManageSQLPageParameterJspBean.doModifySQLPageParameter(HttpServletRequest) 14 8 1
fr.paris.lutece.plugins.sqlpage.web.SQLPageJspBean.getModifySQLPage(HttpServletRequest) 14 7 1
fr.paris.lutece.plugins.sqlpage.web.SQLPageJspBean.getShowSQLPage(HttpServletRequest) 14 3 1
fr.paris.lutece.plugins.sqlpage.business.SQLFragmentDAO.insert(SQLFragment,Plugin) 13 1 1
fr.paris.lutece.plugins.sqlpage.business.SQLFragmentDAO.store(SQLFragment,Plugin) 13 1 1
fr.paris.lutece.plugins.sqlpage.web.SQLFragmentJspBean.validateSQL(String,String,Locale) 13 6 1
fr.paris.lutece.plugins.sqlpage.business.parameter.SQLPageParameterDAO.insert(SQLPageParameter,Plugin) 12 1 1
fr.paris.lutece.plugins.sqlpage.web.SQLPageSecondJspBean.getShowSQLPage(HttpServletRequest) 12 7 1
fr.paris.lutece.plugins.sqlpage.web.ManageSQLPageJspBean.getPaginatedListModel(HttpServletRequest,String,List,String) 12 1 1
fr.paris.lutece.plugins.sqlpage.business.parameter.SQLPageParameterDAO.store(SQLPageParameter,Plugin) 11 1 1
fr.paris.lutece.plugins.sqlpage.service.SQLPageService.getSQLPage(String,HttpServletRequest) 11 3 1
fr.paris.lutece.plugins.sqlpage.service.SQLService.getConnectionService(String) 11 4 1
fr.paris.lutece.plugins.sqlpage.web.ManageSQLPageParameterJspBean.getManageParametersSQLPage(HttpServletRequest) 11 3 1
fr.paris.lutece.plugins.sqlpage.web.SQLFragmentJspBean.validateTemplate(String,Locale) 11 5 1
fr.paris.lutece.plugins.sqlpage.business.SQLPageDAO.insert(SQLPage,Plugin) 10 1 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,329.00 5.40 1.79 0.98

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