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.document.modules.ckan.business 10 128 348 137 415 0 330
fr.paris.lutece.plugins.document.modules.ckan.service 4 21 262 25 114 4 132
fr.paris.lutece.plugins.document.modules.ckan.rs 2 5 52 7 29 0 66
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
16 154 662 169 558 4 528

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.document.modules.ckan.business.PackageShowResult 151 60 0 61
fr.paris.lutece.plugins.document.modules.ckan.service.DocumentParser 135 8 0 9
fr.paris.lutece.plugins.document.modules.ckan.business.PackageOrganization 56 22 0 23
fr.paris.lutece.plugins.document.modules.ckan.business.PackageResource 51 20 0 21
fr.paris.lutece.plugins.document.modules.ckan.service.PackageServiceV3 33 3 0 4
fr.paris.lutece.plugins.document.modules.ckan.business.PackageTag 31 12 0 13
fr.paris.lutece.plugins.document.modules.ckan.rs.CkanRest 30 4 0 5
fr.paris.lutece.plugins.document.modules.ckan.service.CkanService 30 7 0 8
fr.paris.lutece.plugins.document.modules.ckan.service.MapperService 15 3 0 4
fr.paris.lutece.plugins.document.modules.ckan.business.WSError 14 3 0 4
fr.paris.lutece.plugins.document.modules.ckan.business.Error 14 5 0 5
fr.paris.lutece.plugins.document.modules.ckan.business.WSBase 11 4 0 5
fr.paris.lutece.plugins.document.modules.ckan.rs.Constants 6 1 0 2
fr.paris.lutece.plugins.document.modules.ckan.business.WSResult 6 2 0 3
fr.paris.lutece.plugins.document.modules.ckan.business.WSPackageShow 1 0 0 1
fr.paris.lutece.plugins.document.modules.ckan.business.WSPackageList 1 0 0 1

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.document.modules.ckan.business.PackageShowResult 151 60 0 61
fr.paris.lutece.plugins.document.modules.ckan.business.PackageOrganization 56 22 0 23
fr.paris.lutece.plugins.document.modules.ckan.business.PackageResource 51 20 0 21
fr.paris.lutece.plugins.document.modules.ckan.business.PackageTag 31 12 0 13
fr.paris.lutece.plugins.document.modules.ckan.service.DocumentParser 135 8 0 9
fr.paris.lutece.plugins.document.modules.ckan.service.CkanService 30 7 0 8
fr.paris.lutece.plugins.document.modules.ckan.business.Error 14 5 0 5
fr.paris.lutece.plugins.document.modules.ckan.rs.CkanRest 30 4 0 5
fr.paris.lutece.plugins.document.modules.ckan.business.WSBase 11 4 0 5
fr.paris.lutece.plugins.document.modules.ckan.business.WSError 14 3 0 4
fr.paris.lutece.plugins.document.modules.ckan.service.PackageServiceV3 33 3 0 4
fr.paris.lutece.plugins.document.modules.ckan.service.MapperService 15 3 0 4
fr.paris.lutece.plugins.document.modules.ckan.business.WSResult 6 2 0 3
fr.paris.lutece.plugins.document.modules.ckan.rs.Constants 6 1 0 2
fr.paris.lutece.plugins.document.modules.ckan.business.WSPackageShow 1 0 0 1
fr.paris.lutece.plugins.document.modules.ckan.business.WSPackageList 1 0 0 1

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
36.56 662.00 0.00 9.63 10.56

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.paris.lutece.plugins.document.modules.ckan.service.DocumentParser.parse(PackageShowResult,String,int) 81 7 1
fr.paris.lutece.plugins.document.modules.ckan.service.DocumentParser.fillResource(PackageResource,NodeList,String) 24 9 1
fr.paris.lutece.plugins.document.modules.ckan.service.PackageServiceV3.getPackageShow(String) 18 7 1
fr.paris.lutece.plugins.document.modules.ckan.service.PackageServiceV3.getPackageList() 10 2 1
fr.paris.lutece.plugins.document.modules.ckan.rs.CkanRest.getPackageList(int) 8 4 1
fr.paris.lutece.plugins.document.modules.ckan.rs.CkanRest.getPackageShow(int,String) 8 4 1
fr.paris.lutece.plugins.document.modules.ckan.rs.CkanRest.getPackageShowV3(String) 8 2 1
fr.paris.lutece.plugins.document.modules.ckan.service.DocumentParser.getValue(Document,String) 8 4 1
fr.paris.lutece.plugins.document.modules.ckan.service.DocumentParser.convertDateToTimestamp(String,String) 7 2 1
fr.paris.lutece.plugins.document.modules.ckan.service.CkanService.getMapping(String) 6 3 1
fr.paris.lutece.plugins.document.modules.ckan.service.CkanService.getDefault(String) 6 3 1
fr.paris.lutece.plugins.document.modules.ckan.service.MapperService.getJson(T) 6 2 1
fr.paris.lutece.plugins.document.modules.ckan.service.MapperService.readJson(String,T) 6 3 1
fr.paris.lutece.plugins.document.modules.ckan.service.DocumentParser.fillResourceInfos(PackageResource,Document,String,String) 5 2 1
fr.paris.lutece.plugins.document.modules.ckan.business.WSError.WSError(String,String,String) 4 1 1
fr.paris.lutece.plugins.document.modules.ckan.service.CkanService.getNameId(Document) 4 1 1
fr.paris.lutece.plugins.document.modules.ckan.rs.CkanRest.getPackageListV3() 3 1 1
fr.paris.lutece.plugins.document.modules.ckan.business.Error.Error(String,String) 3 1 0
fr.paris.lutece.plugins.document.modules.ckan.business.PackageOrganization.getId() 2 1 1
fr.paris.lutece.plugins.document.modules.ckan.business.PackageOrganization.setId(String) 2 1 1
fr.paris.lutece.plugins.document.modules.ckan.business.PackageOrganization.getName() 2 1 1
fr.paris.lutece.plugins.document.modules.ckan.business.PackageOrganization.setName(String) 2 1 1
fr.paris.lutece.plugins.document.modules.ckan.business.PackageOrganization.getTitle() 2 1 1
fr.paris.lutece.plugins.document.modules.ckan.business.PackageOrganization.setTitle(String) 2 1 1
fr.paris.lutece.plugins.document.modules.ckan.business.PackageOrganization.getType() 2 1 1
fr.paris.lutece.plugins.document.modules.ckan.business.PackageOrganization.setType(String) 2 1 1
fr.paris.lutece.plugins.document.modules.ckan.business.PackageOrganization.getDescription() 2 1 1
fr.paris.lutece.plugins.document.modules.ckan.business.PackageOrganization.setDescription(String) 2 1 1
fr.paris.lutece.plugins.document.modules.ckan.business.PackageOrganization.getApproval_status() 2 1 1
fr.paris.lutece.plugins.document.modules.ckan.business.PackageOrganization.setApproval_status(String) 2 1 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
662.00 3.14 1.26 0.99

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