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.htmldocs.business 23 225 1155 215 1012 26 507
fr.paris.lutece.plugins.htmldocs.web 6 38 836 38 273 68 234
fr.paris.lutece.plugins.htmldocs.business.portlet 14 133 799 140 620 19 365
fr.paris.lutece.plugins.htmldocs.service.docsearch 7 30 392 36 170 26 46
fr.paris.lutece.plugins.htmldocs.business.rss 5 31 254 36 175 7 165
fr.paris.lutece.plugins.htmldocs.service 4 26 202 29 148 2 69
fr.paris.lutece.plugins.htmldocs.web.portlet 2 11 199 12 68 29 33
fr.paris.lutece.plugins.htmldocs.service.search 1 8 58 9 27 1 0
fr.paris.lutece.plugins.htmldocs.utils 1 4 33 5 29 2 8
fr.paris.lutece.plugins.htmldocs.service.resource 1 5 23 6 20 0 0
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
64 511 3951 526 2542 180 1427

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.htmldocs.web.HtmlDocJspBean 373 17 0 12
fr.paris.lutece.plugins.htmldocs.business.HtmlDocDAO 316 16 0 16
fr.paris.lutece.plugins.htmldocs.business.portlet.HtmlDocPublicationDAO 155 11 0 11
fr.paris.lutece.plugins.htmldocs.web.HtmlDocPublicationJspBean 150 8 0 9
fr.paris.lutece.plugins.htmldocs.business.portlet.HtmldocsListPortletDAO 130 11 0 12
fr.paris.lutece.plugins.htmldocs.business.rss.HtmlDocResourceRss 129 11 0 12
fr.paris.lutece.plugins.htmldocs.business.HtmlDoc 114 40 0 38
fr.paris.lutece.plugins.htmldocs.service.docsearch.HtmlDocSearchService 114 10 0 11
fr.paris.lutece.plugins.htmldocs.business.TagDAO 112 12 0 11
fr.paris.lutece.plugins.htmldocs.service.docsearch.DefaultHtmldocIndexer 110 10 0 11
fr.paris.lutece.plugins.htmldocs.web.portlet.HtmldocsListPortletJspBean 89 6 0 6
fr.paris.lutece.plugins.htmldocs.business.portlet.HtmldocsPortletDAO 86 7 0 8
fr.paris.lutece.plugins.htmldocs.web.portlet.HtmldocsPortletJspBean 80 5 0 6
fr.paris.lutece.plugins.htmldocs.service.HtmlDocService 74 9 0 10
fr.paris.lutece.plugins.htmldocs.service.PublishingService 73 13 0 14
fr.paris.lutece.plugins.htmldocs.web.TagJspBean 71 7 0 8
fr.paris.lutece.plugins.htmldocs.business.IndexerActionDAO 67 5 0 6
fr.paris.lutece.plugins.htmldocs.business.portlet.HtmlDocsListPortlet 65 13 0 13
fr.paris.lutece.plugins.htmldocs.business.DocumentPageTemplateDAO 65 6 0 7
fr.paris.lutece.plugins.htmldocs.business.portlet.PortletFilter 62 13 0 14
fr.paris.lutece.plugins.htmldocs.business.DocContentDAO 53 5 0 5
fr.paris.lutece.plugins.htmldocs.service.docsearch.HtmldocLuceneSearchEngine 52 2 0 3
fr.paris.lutece.plugins.htmldocs.business.rss.HtmlDocResourceRssConfigDAO 50 5 0 6
fr.paris.lutece.plugins.htmldocs.business.portlet.PortletOrder 44 7 0 8
fr.paris.lutece.plugins.htmldocs.business.HtmlDocHome 42 16 0 17
fr.paris.lutece.plugins.htmldocs.service.search.HtmlDocsSearchIndexer 40 8 0 9
fr.paris.lutece.plugins.htmldocs.web.ManageHtmldocsJspBean 39 1 0 2
fr.paris.lutece.plugins.htmldocs.business.HtmlDocFilter 35 14 0 15
fr.paris.lutece.plugins.htmldocs.web.HtmlDocFileServlet 35 4 0 5
fr.paris.lutece.plugins.htmldocs.business.portlet.HtmlDocPublication 33 13 0 13

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.htmldocs.business.HtmlDoc 114 40 0 38
fr.paris.lutece.plugins.htmldocs.web.HtmlDocJspBean 373 17 0 12
fr.paris.lutece.plugins.htmldocs.business.HtmlDocDAO 316 16 0 16
fr.paris.lutece.plugins.htmldocs.business.HtmlDocHome 42 16 0 17
fr.paris.lutece.plugins.htmldocs.business.HtmlDocFilter 35 14 0 15
fr.paris.lutece.plugins.htmldocs.business.portlet.PortletFilter 62 13 0 14
fr.paris.lutece.plugins.htmldocs.business.portlet.HtmlDocsListPortlet 65 13 0 13
fr.paris.lutece.plugins.htmldocs.business.portlet.HtmlDocPublication 33 13 0 13
fr.paris.lutece.plugins.htmldocs.business.IHtmlDocDAO 14 13 0 14
fr.paris.lutece.plugins.htmldocs.service.PublishingService 73 13 0 14
fr.paris.lutece.plugins.htmldocs.business.TagDAO 112 12 0 11
fr.paris.lutece.plugins.htmldocs.business.portlet.HtmlDocPublicationDAO 155 11 0 11
fr.paris.lutece.plugins.htmldocs.business.portlet.IHtmlDocPublicationDAO 12 11 0 11
fr.paris.lutece.plugins.htmldocs.business.portlet.HtmldocsListPortletDAO 130 11 0 12
fr.paris.lutece.plugins.htmldocs.business.portlet.HtmlDocPublicationHome 25 11 0 11
fr.paris.lutece.plugins.htmldocs.business.TagHome 26 11 0 8
fr.paris.lutece.plugins.htmldocs.business.rss.HtmlDocResourceRss 129 11 0 12
fr.paris.lutece.plugins.htmldocs.business.ITagDAO 12 11 0 0
fr.paris.lutece.plugins.htmldocs.business.portlet.HtmldocsPortlet 31 10 0 11
fr.paris.lutece.plugins.htmldocs.business.DocContent 26 10 0 10
fr.paris.lutece.plugins.htmldocs.service.docsearch.HtmlDocSearchService 114 10 0 11
fr.paris.lutece.plugins.htmldocs.service.docsearch.DefaultHtmldocIndexer 110 10 0 11
fr.paris.lutece.plugins.htmldocs.service.HtmlDocService 74 9 0 10
fr.paris.lutece.plugins.htmldocs.business.portlet.IHtmlDocsListPortletDAO 9 8 0 8
fr.paris.lutece.plugins.htmldocs.business.Tag 20 8 0 6
fr.paris.lutece.plugins.htmldocs.business.HtmldocSearchFilter 21 8 0 9
fr.paris.lutece.plugins.htmldocs.business.DocumentPageTemplate 21 8 0 9
fr.paris.lutece.plugins.htmldocs.service.search.HtmlDocsSearchIndexer 40 8 0 9
fr.paris.lutece.plugins.htmldocs.web.HtmlDocPublicationJspBean 150 8 0 9
fr.paris.lutece.plugins.htmldocs.business.portlet.PortletOrder 44 7 0 8

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
52.59 3,951.00 0.00 7.98 8.22

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.paris.lutece.plugins.htmldocs.business.HtmlDocDAO.getDaoFromFilter(String,HtmlDocFilter) 53 25 1
fr.paris.lutece.plugins.htmldocs.web.HtmlDocJspBean.getManageHtmlDocs(HttpServletRequest) 53 14 1
fr.paris.lutece.plugins.htmldocs.web.HtmlDocJspBean.getDiffHtmlDoc(HttpServletRequest) 49 7 1
fr.paris.lutece.plugins.htmldocs.service.docsearch.HtmlDocSearchService.processIndexing(boolean) 42 6 1
fr.paris.lutece.plugins.htmldocs.service.docsearch.HtmldocLuceneSearchEngine.getSearchResults(HtmldocSearchFilter,Plugin,SearchResult) 39 7 1
fr.paris.lutece.plugins.htmldocs.web.HtmlDocPublicationJspBean.getManageHtmlDocsPublication(HttpServletRequest) 39 14 1
fr.paris.lutece.plugins.htmldocs.business.rss.HtmlDocResourceRss.getFeed() 33 2 1
fr.paris.lutece.plugins.htmldocs.web.HtmlDocJspBean.doModifyHtmlDoc(HttpServletRequest) 33 10 1
fr.paris.lutece.plugins.htmldocs.service.docsearch.DefaultHtmldocIndexer.processIndexing(IndexWriter,boolean,StringBuffer) 32 6 1
fr.paris.lutece.plugins.htmldocs.web.portlet.HtmldocsPortletJspBean.doCreate(HttpServletRequest) 30 4 1
fr.paris.lutece.plugins.htmldocs.business.portlet.HtmldocsListPortletDAO.selectPortletByType(int,PortletOrder,PortletFilter) 27 10 1
fr.paris.lutece.plugins.htmldocs.business.portlet.HtmldocsPortletDAO.selectPortletByType(int,PortletOrder,PortletFilter) 26 10 1
fr.paris.lutece.plugins.htmldocs.web.HtmlDocJspBean.doUpdatePriorityTag(HttpServletRequest) 26 10 0
fr.paris.lutece.plugins.htmldocs.business.HtmlDocDAO.selectByFilter(HtmlDocFilter) 25 3 1
fr.paris.lutece.plugins.htmldocs.business.IndexerActionDAO.selectList(IndexerActionFilter,Plugin) 25 6 1
fr.paris.lutece.plugins.htmldocs.web.ManageHtmldocsJspBean.getPaginatedListModel(HttpServletRequest,String,List,String) 25 5 1
fr.paris.lutece.plugins.htmldocs.business.portlet.HtmlDocPublicationDAO.getPublishedDocumentsIdsListByPortletIds(Integer[],Date,Date,Plugin) 23 8 1
fr.paris.lutece.plugins.htmldocs.business.portlet.PortletFilter.getSQLFilter() 23 14 1
fr.paris.lutece.plugins.htmldocs.business.HtmlDocDAO.loadVersion(int,int,Plugin) 23 2 1
fr.paris.lutece.plugins.htmldocs.business.HtmlDocDAO.selectHtmlDocsVersionsList(int,Plugin) 23 2 1
fr.paris.lutece.plugins.htmldocs.business.IndexerActionHome.create(IndexerAction) 23 9 1
fr.paris.lutece.plugins.htmldocs.web.portlet.HtmldocsListPortletJspBean.getModify(HttpServletRequest) 23 4 1
fr.paris.lutece.plugins.htmldocs.business.HtmlDocDAO.load(int,Plugin) 22 2 1
fr.paris.lutece.plugins.htmldocs.business.HtmlDocDAO.loadByName(String,Plugin) 22 2 1
fr.paris.lutece.plugins.htmldocs.business.HtmlDocDAO.selectHtmlDocsList(Plugin) 22 2 1
fr.paris.lutece.plugins.htmldocs.business.rss.HtmlDocResourceRss.createHtmlRss() 22 2 1
fr.paris.lutece.plugins.htmldocs.web.HtmlDocFileServlet.processRequest(HttpServletRequest,HttpServletResponse) 22 7 1
fr.paris.lutece.plugins.htmldocs.service.docsearch.DefaultHtmldocIndexer.getDocument(HtmlDoc) 21 5 1
fr.paris.lutece.plugins.htmldocs.web.HtmlDocPublicationJspBean.populateHtmlDocPublication(HtmlDocPublication,HttpServletRequest) 20 6 1
fr.paris.lutece.plugins.htmldocs.business.HtmlDocDAO.insertVersion(HtmlDoc,Plugin) 19 1 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
3,951.00 5.58 1.76 0.92

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