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.googleapi.web 2 4 155 6 30 9 66
fr.paris.lutece.plugins.googleapi.service 2 11 105 13 70 5 80
fr.paris.lutece.plugins.googleapi.business 3 22 60 25 118 0 99
fr.paris.lutece.plugins.googleapi.modules.youtube.business 1 2 25 3 16 0 33
fr.paris.lutece.plugins.googleapi.modules.youtube.service 1 1 21 1 3 0 33
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
9 40 366 48 237 14 311

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.googleapi.web.GoogleApiLinkServiceJspBean 76 3 0 4
fr.paris.lutece.plugins.googleapi.service.FeedsService 41 7 0 8
fr.paris.lutece.plugins.googleapi.web.GoogleApiApp 38 1 0 2
fr.paris.lutece.plugins.googleapi.service.FeedHandler 37 4 0 5
fr.paris.lutece.plugins.googleapi.business.FeedProvider 27 11 0 12
fr.paris.lutece.plugins.googleapi.business.Item 26 10 0 11
fr.paris.lutece.plugins.googleapi.modules.youtube.business.YouTubeProvider 18 2 0 3
fr.paris.lutece.plugins.googleapi.modules.youtube.service.YouTubeHandler 16 1 0 1
fr.paris.lutece.plugins.googleapi.business.VideoProvider 2 1 0 2

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.googleapi.business.FeedProvider 27 11 0 12
fr.paris.lutece.plugins.googleapi.business.Item 26 10 0 11
fr.paris.lutece.plugins.googleapi.service.FeedsService 41 7 0 8
fr.paris.lutece.plugins.googleapi.service.FeedHandler 37 4 0 5
fr.paris.lutece.plugins.googleapi.web.GoogleApiLinkServiceJspBean 76 3 0 4
fr.paris.lutece.plugins.googleapi.modules.youtube.business.YouTubeProvider 18 2 0 3
fr.paris.lutece.plugins.googleapi.business.VideoProvider 2 1 0 2
fr.paris.lutece.plugins.googleapi.modules.youtube.service.YouTubeHandler 16 1 0 1
fr.paris.lutece.plugins.googleapi.web.GoogleApiApp 38 1 0 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
31.22 366.00 0.00 4.44 5.33

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.paris.lutece.plugins.googleapi.web.GoogleApiLinkServiceJspBean.getSearch(HttpServletRequest) 29 7 1
fr.paris.lutece.plugins.googleapi.web.GoogleApiApp.getPage(HttpServletRequest,int,Plugin) 28 7 1
fr.paris.lutece.plugins.googleapi.service.FeedHandler.startElement(String,String,String,Attributes) 16 9 1
fr.paris.lutece.plugins.googleapi.modules.youtube.service.YouTubeHandler.startElement(String,String,String,Attributes) 15 10 0
fr.paris.lutece.plugins.googleapi.service.FeedsService.getItems(String,Item,FeedProvider) 15 3 1
fr.paris.lutece.plugins.googleapi.web.GoogleApiLinkServiceJspBean.getInsertServiceSelectorUI(HttpServletRequest) 14 1 1
fr.paris.lutece.plugins.googleapi.web.GoogleApiLinkServiceJspBean.doInsertLink(HttpServletRequest) 12 2 1
fr.paris.lutece.plugins.googleapi.modules.youtube.business.YouTubeProvider.getPlayerHtml(String,String,String,Locale) 9 1 1
fr.paris.lutece.plugins.googleapi.service.FeedHandler.endElement(String,String,String) 7 3 1
fr.paris.lutece.plugins.googleapi.service.FeedHandler.characters(_bInsideEntryContent[],int,int) 6 3 1
fr.paris.lutece.plugins.googleapi.service.FeedsService.getProviders(Class) 6 3 1
fr.paris.lutece.plugins.googleapi.service.FeedsService.getProviders() 5 2 1
fr.paris.lutece.plugins.googleapi.service.FeedsService.getInstance() 4 2 1
fr.paris.lutece.plugins.googleapi.modules.youtube.business.YouTubeProvider.getIdFromUrl(String) 3 1 1
fr.paris.lutece.plugins.googleapi.business.Item.getId() 2 1 1
fr.paris.lutece.plugins.googleapi.business.Item.setId(String) 2 1 1
fr.paris.lutece.plugins.googleapi.business.Item.getTitle() 2 1 1
fr.paris.lutece.plugins.googleapi.business.Item.setTitle(String) 2 1 1
fr.paris.lutece.plugins.googleapi.business.Item.getContent() 2 1 1
fr.paris.lutece.plugins.googleapi.business.Item.setContent(String) 2 1 1
fr.paris.lutece.plugins.googleapi.business.Item.getLink() 2 2 1
fr.paris.lutece.plugins.googleapi.business.Item.setLink(String) 2 1 1
fr.paris.lutece.plugins.googleapi.business.Item.getThumbnailUrl() 2 2 1
fr.paris.lutece.plugins.googleapi.business.Item.setThumbnailUrl(String) 2 1 1
fr.paris.lutece.plugins.googleapi.business.FeedProvider.getKey() 2 1 1
fr.paris.lutece.plugins.googleapi.business.FeedProvider.setKey(String) 2 1 1
fr.paris.lutece.plugins.googleapi.business.FeedProvider.getName() 2 1 1
fr.paris.lutece.plugins.googleapi.business.FeedProvider.setName(String) 2 1 1
fr.paris.lutece.plugins.googleapi.business.FeedProvider.getFeedsUrl() 2 1 1
fr.paris.lutece.plugins.googleapi.business.FeedProvider.setFeedsUrl(String) 2 1 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
366.00 5.45 2.05 0.98

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