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.files2docs.web 2 34 1092 36 251 222 87
fr.paris.lutece.plugins.files2docs.business 8 60 277 68 454 6 264
fr.paris.lutece.plugins.files2docs.service 3 21 161 24 153 10 113
fr.paris.lutece.plugins.files2docs.util 1 4 37 5 29 4 33
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
14 119 1567 133 887 242 497

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.files2docs.web.Files2DocsJspBean 745 23 0 24
fr.paris.lutece.plugins.files2docs.web.MappingJspBean 245 11 0 12
fr.paris.lutece.plugins.files2docs.service.Files2DocsLinkDocument 91 17 0 18
fr.paris.lutece.plugins.files2docs.business.MappingDAO 80 7 0 8
fr.paris.lutece.plugins.files2docs.business.AttributeDAO 75 7 0 8
fr.paris.lutece.plugins.files2docs.business.Mapping 31 12 0 13
fr.paris.lutece.plugins.files2docs.service.AutoCleaningService 31 3 0 4
fr.paris.lutece.plugins.files2docs.util.Files2DocsUtil 31 4 0 5
fr.paris.lutece.plugins.files2docs.business.Attribute 21 8 0 9
fr.paris.lutece.plugins.files2docs.business.MappingHome 15 7 0 8
fr.paris.lutece.plugins.files2docs.business.AttributeHome 15 7 0 8
fr.paris.lutece.plugins.files2docs.business.IMappingDAO 7 6 0 7
fr.paris.lutece.plugins.files2docs.business.IAttributeDAO 7 6 0 7
fr.paris.lutece.plugins.files2docs.service.AutoCleaningDaemon 3 1 0 2

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.files2docs.web.Files2DocsJspBean 745 23 0 24
fr.paris.lutece.plugins.files2docs.service.Files2DocsLinkDocument 91 17 0 18
fr.paris.lutece.plugins.files2docs.business.Mapping 31 12 0 13
fr.paris.lutece.plugins.files2docs.web.MappingJspBean 245 11 0 12
fr.paris.lutece.plugins.files2docs.business.Attribute 21 8 0 9
fr.paris.lutece.plugins.files2docs.business.MappingHome 15 7 0 8
fr.paris.lutece.plugins.files2docs.business.MappingDAO 80 7 0 8
fr.paris.lutece.plugins.files2docs.business.AttributeDAO 75 7 0 8
fr.paris.lutece.plugins.files2docs.business.AttributeHome 15 7 0 8
fr.paris.lutece.plugins.files2docs.business.IMappingDAO 7 6 0 7
fr.paris.lutece.plugins.files2docs.business.IAttributeDAO 7 6 0 7
fr.paris.lutece.plugins.files2docs.util.Files2DocsUtil 31 4 0 5
fr.paris.lutece.plugins.files2docs.service.AutoCleaningService 31 3 0 4
fr.paris.lutece.plugins.files2docs.service.AutoCleaningDaemon 3 1 0 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
99.79 1,567.00 0.00 8.50 9.50

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.paris.lutece.plugins.files2docs.web.Files2DocsJspBean.doCreateDocuments(HttpServletRequest) 115 40 1
fr.paris.lutece.plugins.files2docs.web.Files2DocsJspBean.getSelectFiles(HttpServletRequest) 104 34 1
fr.paris.lutece.plugins.files2docs.web.Files2DocsJspBean.doSelectFiles(HttpServletRequest) 71 35 1
fr.paris.lutece.plugins.files2docs.web.Files2DocsJspBean.getImportResult(HttpServletRequest) 52 12 1
fr.paris.lutece.plugins.files2docs.web.Files2DocsJspBean.getAttributesForms(HttpServletRequest,String,String) 44 10 1
fr.paris.lutece.plugins.files2docs.web.Files2DocsJspBean.getCreateDocuments(HttpServletRequest) 41 7 1
fr.paris.lutece.plugins.files2docs.web.Files2DocsJspBean.upload(HttpServletRequest) 40 19 1
fr.paris.lutece.plugins.files2docs.web.MappingJspBean.getModifyMapping(HttpServletRequest) 36 9 1
fr.paris.lutece.plugins.files2docs.web.MappingJspBean.doCreateMapping(HttpServletRequest) 34 17 1
fr.paris.lutece.plugins.files2docs.web.MappingJspBean.getModifyAttribute(HttpServletRequest) 34 8 1
fr.paris.lutece.plugins.files2docs.web.MappingJspBean.doModifyAttribute(HttpServletRequest) 26 10 1
fr.paris.lutece.plugins.files2docs.web.MappingJspBean.doChangeAttributeFileImage(HttpServletRequest) 26 12 1
fr.paris.lutece.plugins.files2docs.service.AutoCleaningService.processAutoCleaning() 23 7 1
fr.paris.lutece.plugins.files2docs.web.Files2DocsJspBean.getRequestData(HttpServletRequest,DocumentSpace) 23 6 1
fr.paris.lutece.plugins.files2docs.service.Files2DocsLinkDocument.getListDocumentTypeFile(String,boolean) 22 11 1
fr.paris.lutece.plugins.files2docs.web.Files2DocsJspBean.doCreateSpace(HttpServletRequest) 21 9 1
fr.paris.lutece.plugins.files2docs.web.Files2DocsJspBean.validateDateValue(String,Locale) 19 13 1
fr.paris.lutece.plugins.files2docs.service.Files2DocsLinkDocument.getAllAttributes(String,int,Plugin) 15 4 1
fr.paris.lutece.plugins.files2docs.web.Files2DocsJspBean.getReplacedTags(HttpServletRequest,String,String) 15 11 1
fr.paris.lutece.plugins.files2docs.business.MappingDAO.selectAll(Plugin) 14 2 1
fr.paris.lutece.plugins.files2docs.business.MappingDAO.load(int,Plugin) 14 2 1
fr.paris.lutece.plugins.files2docs.business.MappingDAO.selectByDocumentTypeCode(String,Plugin) 14 2 1
fr.paris.lutece.plugins.files2docs.business.AttributeDAO.selectByMapping(int,Plugin) 14 2 1
fr.paris.lutece.plugins.files2docs.business.AttributeDAO.load(int,Plugin) 13 2 1
fr.paris.lutece.plugins.files2docs.business.AttributeDAO.selectByDocumentAttribute(int,Plugin) 13 2 1
fr.paris.lutece.plugins.files2docs.web.MappingJspBean.getManageMapping(HttpServletRequest) 13 3 1
fr.paris.lutece.plugins.files2docs.web.MappingJspBean.doModifyMapping(HttpServletRequest) 13 7 1
fr.paris.lutece.plugins.files2docs.web.Files2DocsJspBean.getJsonResponse(HttpServletRequest,String,long) 13 1 1
fr.paris.lutece.plugins.files2docs.web.MappingJspBean.getCreateMapping(HttpServletRequest) 11 3 1
fr.paris.lutece.plugins.files2docs.web.Files2DocsJspBean.changeQueryParameter(String,String,String) 11 5 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,567.00 9.94 3.68 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).