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.dbpage.business 16 126 817 140 712 25 528
fr.paris.lutece.plugins.dbpage.web 3 25 528 27 152 30 105
fr.paris.lutece.plugins.dbpage.business.section 6 57 284 57 252 6 228
fr.paris.lutece.plugins.dbpage.business.portlet 4 25 132 29 141 5 133
fr.paris.lutece.plugins.dbpage.service 4 15 123 15 62 4 172
fr.paris.lutece.plugins.dbpage.web.portlet 1 7 94 8 43 14 33
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
34 255 1978 276 1362 84 1199

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean 420 22 1 22
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSectionDAO 208 15 0 16
fr.paris.lutece.plugins.dbpage.business.DbPageLoaderProperties 97 5 0 6
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseDAO 88 8 0 9
fr.paris.lutece.plugins.dbpage.web.portlet.DbPagePortletJspBean 77 7 0 8
fr.paris.lutece.plugins.dbpage.business.section.DbPageSection 64 22 0 23
fr.paris.lutece.plugins.dbpage.business.DbPageLoaderDatabase 59 3 0 4
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSection 57 21 0 22
fr.paris.lutece.plugins.dbpage.business.section.DbPageSectionForm 55 8 0 9
fr.paris.lutece.plugins.dbpage.business.portlet.DbPagePortletDAO 48 5 0 6
fr.paris.lutece.plugins.dbpage.business.DbPage 47 14 0 15
fr.paris.lutece.plugins.dbpage.business.section.DbPageSectionTable 46 9 0 10
fr.paris.lutece.plugins.dbpage.service.DbPageService 41 8 0 9
fr.paris.lutece.plugins.dbpage.business.section.DbPageSectionSelect 40 7 0 8
fr.paris.lutece.plugins.dbpage.business.portlet.DbPagePortlet 40 10 0 11
fr.paris.lutece.plugins.dbpage.web.DbpageApp 38 2 0 3
fr.paris.lutece.plugins.dbpage.service.DbPageContextService 35 3 0 0
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSectionHome 33 15 0 15
fr.paris.lutece.plugins.dbpage.business.DbPageDAO 29 1 0 2
fr.paris.lutece.plugins.dbpage.business.DbPageDatabase 21 8 0 9
fr.paris.lutece.plugins.dbpage.business.section.DbSectionService 20 5 0 0
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseHome 19 8 0 9
fr.paris.lutece.plugins.dbpage.business.portlet.DbPagePortletHome 18 5 0 6
fr.paris.lutece.plugins.dbpage.service.DbPageConnectionService 17 3 0 4
fr.paris.lutece.plugins.dbpage.business.IDbPageDatabaseSectionDAO 15 14 0 14
fr.paris.lutece.plugins.dbpage.business.DbPageWorkgroupRemovalListener 12 2 0 3
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSectionRoleRemovalListener 11 2 0 3
fr.paris.lutece.plugins.dbpage.web.DbPageInclude 9 1 0 2
fr.paris.lutece.plugins.dbpage.business.IDbPageDatabaseDAO 8 7 0 8
fr.paris.lutece.plugins.dbpage.business.section.IDbPageSection 7 6 0 7

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean 420 22 1 22
fr.paris.lutece.plugins.dbpage.business.section.DbPageSection 64 22 0 23
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSection 57 21 0 22
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSectionDAO 208 15 0 16
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSectionHome 33 15 0 15
fr.paris.lutece.plugins.dbpage.business.IDbPageDatabaseSectionDAO 15 14 0 14
fr.paris.lutece.plugins.dbpage.business.DbPage 47 14 0 15
fr.paris.lutece.plugins.dbpage.business.portlet.DbPagePortlet 40 10 0 11
fr.paris.lutece.plugins.dbpage.business.section.DbPageSectionTable 46 9 0 10
fr.paris.lutece.plugins.dbpage.business.section.DbPageSectionForm 55 8 0 9
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseDAO 88 8 0 9
fr.paris.lutece.plugins.dbpage.business.DbPageDatabase 21 8 0 9
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseHome 19 8 0 9
fr.paris.lutece.plugins.dbpage.service.DbPageService 41 8 0 9
fr.paris.lutece.plugins.dbpage.web.portlet.DbPagePortletJspBean 77 7 0 8
fr.paris.lutece.plugins.dbpage.business.section.DbPageSectionSelect 40 7 0 8
fr.paris.lutece.plugins.dbpage.business.IDbPageDatabaseDAO 8 7 0 8
fr.paris.lutece.plugins.dbpage.business.section.IDbPageSection 7 6 0 7
fr.paris.lutece.plugins.dbpage.business.section.DbSectionService 20 5 0 0
fr.paris.lutece.plugins.dbpage.business.DbPageLoaderProperties 97 5 0 6
fr.paris.lutece.plugins.dbpage.business.portlet.IDbPagePortletDAO 6 5 0 6
fr.paris.lutece.plugins.dbpage.business.portlet.DbPagePortletDAO 48 5 0 6
fr.paris.lutece.plugins.dbpage.business.portlet.DbPagePortletHome 18 5 0 6
fr.paris.lutece.plugins.dbpage.business.DbPageLoaderDatabase 59 3 0 4
fr.paris.lutece.plugins.dbpage.service.DbPageConnectionService 17 3 0 4
fr.paris.lutece.plugins.dbpage.service.DbPageContextService 35 3 0 0
fr.paris.lutece.plugins.dbpage.web.DbpageApp 38 2 0 3
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSectionRoleRemovalListener 11 2 0 3
fr.paris.lutece.plugins.dbpage.business.DbPageHome 5 2 0 3
fr.paris.lutece.plugins.dbpage.business.DbPageWorkgroupRemovalListener 12 2 0 3

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
49.88 1,978.00 0.03 7.50 8.12

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean.doCreateSection(HttpServletRequest) 54 15 1
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean.doModifySection(HttpServletRequest) 54 20 1
fr.paris.lutece.plugins.dbpage.business.DbPageLoaderDatabase.loadPage(String) 43 10 1
fr.paris.lutece.plugins.dbpage.business.DbPageLoaderProperties.loadListSection(Properties,int) 41 11 1
fr.paris.lutece.plugins.dbpage.business.DbPageDAO.selectRows(String,PluginConnectionService) 28 8 1
fr.paris.lutece.plugins.dbpage.service.DbPageContextService.getContext(String) 28 9 0
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean.getModifySection(HttpServletRequest) 23 3 1
fr.paris.lutece.plugins.dbpage.web.DbpageApp.getPage(HttpServletRequest,int,Plugin) 21 4 1
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSectionDAO.loadSectionsByPageId(int,Plugin) 21 2 1
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSectionDAO.loadSectionsByRoleKey(String,Plugin) 21 2 1
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean.getCreateSection(HttpServletRequest) 20 3 1
fr.paris.lutece.plugins.dbpage.business.section.DbPageSectionForm.buildForm(HtmlTemplate,List) 20 11 1
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSectionDAO.load(int,Plugin) 19 2 1
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSectionDAO.selectDbPageDatabaseSectionList(Plugin) 19 2 1
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean.localTemplateFile(DbPageDatabaseSection,FileItem,String,boolean,boolean) 18 7 1
fr.paris.lutece.plugins.dbpage.web.portlet.DbPagePortletJspBean.doCreate(HttpServletRequest) 17 5 1
fr.paris.lutece.plugins.dbpage.business.section.DbPageSectionSelect.getHtmlSection(String,HttpServletRequest) 17 5 1
fr.paris.lutece.plugins.dbpage.business.DbPageLoaderProperties.loadPage(File) 17 2 1
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean.getModifyDbPage(HttpServletRequest) 16 3 1
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean.doConfirmDelete(HttpServletRequest) 16 5 1
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean.deleteDirectory(File) 16 7 1
fr.paris.lutece.plugins.dbpage.web.portlet.DbPagePortletJspBean.doModify(HttpServletRequest) 16 5 1
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean.doSectionMoveUp(HttpServletRequest) 15 4 1
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean.doSectionMoveDown(HttpServletRequest) 15 4 1
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSectionDAO.insert(DbPageDatabaseSection,Plugin) 15 1 1
fr.paris.lutece.plugins.dbpage.business.DbPageDatabaseSectionDAO.store(DbPageDatabaseSection,Plugin) 15 1 1
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean.doCreateDbPage(HttpServletRequest) 14 6 1
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean.getManageDbPages(HttpServletRequest) 13 1 1
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean.doModifyDbPage(HttpServletRequest) 13 5 1
fr.paris.lutece.plugins.dbpage.web.DbPageJspBean.doDeleteDbPage(HttpServletRequest) 13 3 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,978.00 5.69 1.89 0.95

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