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.webappcontainer.util 5 25 462 36 198 36 241
fr.paris.lutece.plugins.webappcontainer.web 3 26 436 29 197 36 99
fr.paris.lutece.plugins.webappcontainer.business 5 44 191 49 209 10 165
fr.paris.lutece.plugins.webappcontainer.service 1 1 5 2 6 0 33
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
14 96 1094 116 610 82 538

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.webappcontainer.util.HtmlDocumentWebappcontainer 183 9 1 16
fr.paris.lutece.plugins.webappcontainer.util.HttpAccess 175 9 0 10
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerJspBean 170 7 0 8
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerApp 128 13 0 14
fr.paris.lutece.plugins.webappcontainer.business.SiteDAO 73 5 0 6
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerResourceServlet 64 6 0 7
fr.paris.lutece.plugins.webappcontainer.business.Site 46 18 0 19
fr.paris.lutece.plugins.webappcontainer.util.UrlUtils 33 5 0 6
fr.paris.lutece.plugins.webappcontainer.business.WebappResponse 32 10 0 11
fr.paris.lutece.plugins.webappcontainer.business.SiteHome 17 6 0 7
fr.paris.lutece.plugins.webappcontainer.business.ISiteDAO 6 5 0 6
fr.paris.lutece.plugins.webappcontainer.service.WebappcontainerPlugin 3 1 0 2
fr.paris.lutece.plugins.webappcontainer.util.HttpAccessException 3 1 0 2
fr.paris.lutece.plugins.webappcontainer.util.HtmlDocumentWebappcontainerException 3 1 0 2

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.webappcontainer.business.Site 46 18 0 19
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerApp 128 13 0 14
fr.paris.lutece.plugins.webappcontainer.business.WebappResponse 32 10 0 11
fr.paris.lutece.plugins.webappcontainer.util.HtmlDocumentWebappcontainer 183 9 1 16
fr.paris.lutece.plugins.webappcontainer.util.HttpAccess 175 9 0 10
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerJspBean 170 7 0 8
fr.paris.lutece.plugins.webappcontainer.business.SiteHome 17 6 0 7
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerResourceServlet 64 6 0 7
fr.paris.lutece.plugins.webappcontainer.business.ISiteDAO 6 5 0 6
fr.paris.lutece.plugins.webappcontainer.business.SiteDAO 73 5 0 6
fr.paris.lutece.plugins.webappcontainer.util.UrlUtils 33 5 0 6
fr.paris.lutece.plugins.webappcontainer.service.WebappcontainerPlugin 3 1 0 2
fr.paris.lutece.plugins.webappcontainer.util.HttpAccessException 3 1 0 2
fr.paris.lutece.plugins.webappcontainer.util.HtmlDocumentWebappcontainerException 3 1 0 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
66.86 1,094.00 0.07 6.86 8.29

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerJspBean.doModifySite(HttpServletRequest) 50 29 1
fr.paris.lutece.plugins.webappcontainer.util.HttpAccess.doRequest(HttpMethodBase) 46 16 1
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerJspBean.doCreateSite(HttpServletRequest) 40 21 1
fr.paris.lutece.plugins.webappcontainer.util.HtmlDocumentWebappcontainer.convertUrls(ElementUrl,String,Site,String,boolean) 38 11 1
fr.paris.lutece.plugins.webappcontainer.util.HttpAccess.getHttpClient(HttpMethodBase) 35 14 1
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerResourceServlet.getWebappResponse(HttpServletRequest,String,Site) 30 8 1
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerApp.getWebappContainerFromSiteCode(String,HttpServletRequest,int,Plugin) 24 5 1
fr.paris.lutece.plugins.webappcontainer.util.HttpAccess.doPost(String,String[],FileItem) 20 6 1
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerApp.getWebappBody(HttpServletRequest,HttpServletRequest[],String,String,Site) 19 5 1
fr.paris.lutece.plugins.webappcontainer.business.SiteDAO.load(String,Plugin) 18 2 1
fr.paris.lutece.plugins.webappcontainer.business.SiteDAO.selectAll(Plugin) 18 2 1
fr.paris.lutece.plugins.webappcontainer.util.HtmlDocumentWebappcontainer.getNodeContent(Node) 18 5 1
fr.paris.lutece.plugins.webappcontainer.util.HtmlDocumentWebappcontainer.getContent() 17 5 1
fr.paris.lutece.plugins.webappcontainer.util.HttpAccess.setMultipartRequest(PostMethod,String[],FileItem) 17 3 1
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerResourceServlet.processRequest(HttpServletRequest,HttpServletResponse) 15 5 1
fr.paris.lutece.plugins.webappcontainer.util.HtmlDocumentWebappcontainer.getFirstElementAttribute(ElementUrl) 14 8 1
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerJspBean.getModifySite(HttpServletRequest) 14 1 1
fr.paris.lutece.plugins.webappcontainer.business.SiteDAO.insert(Site,Plugin) 13 1 1
fr.paris.lutece.plugins.webappcontainer.business.SiteDAO.store(Site,Plugin) 13 1 1
fr.paris.lutece.plugins.webappcontainer.util.HtmlDocumentWebappcontainer.HtmlDocumentWebappcontainer(Document[],String) 13 4 1
fr.paris.lutece.plugins.webappcontainer.util.UrlUtils.convertRelativeToAbsoluteUrl(String,String) 12 3 1
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerJspBean.getCreateSite(HttpServletRequest) 12 1 1
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerApp.rewriteUrls(HtmlDocumentWebappcontainer,String,String,String,Site) 12 2 1
fr.paris.lutece.plugins.webappcontainer.util.HtmlDocumentWebappcontainer.getFirstElement(ElementUrl) 10 4 1
fr.paris.lutece.plugins.webappcontainer.util.HttpAccess.doGet(String) 10 3 1
fr.paris.lutece.plugins.webappcontainer.util.HttpAccess.getPropertyInt(String,int) 10 5 1
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerResourceServlet.getParameterMap(HttpServletRequest) 10 6 1
fr.paris.lutece.plugins.webappcontainer.web.WebappcontainerApp.getListSites(HttpServletRequest,int,Plugin) 10 1 1
fr.paris.lutece.plugins.webappcontainer.util.HtmlDocumentWebappcontainer.getElements(ElementUrl) 8 4 1
fr.paris.lutece.plugins.webappcontainer.util.UrlUtils.hostsEquals(String,String) 8 3 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,094.00 7.75 2.75 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).