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.parisconnect.service 14 101 886 93 431 13 440
fr.paris.lutece.plugins.parisconnect.business 15 156 774 126 510 21 396
fr.paris.lutece.plugins.parisconnect.web 14 47 696 53 256 71 432
fr.paris.lutece.plugins.parisconnect.rs 4 12 237 16 66 0 132
fr.paris.lutece.plugins.parisconnect.web.mydashboard 3 9 143 0 0 0 0
fr.paris.lutece.plugins.parisconnect.business.portlet 4 16 76 20 90 7 133
fr.paris.lutece.plugins.parisconnect.web.portlet 1 4 38 5 26 8 33
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
55 345 2850 313 1379 120 1566

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.parisconnect.service.ParisConnectAPIService 282 24 0 25
fr.paris.lutece.plugins.parisconnect.service.ParisConnectService 249 35 0 15
fr.paris.lutece.plugins.parisconnect.business.NewsletterDAO 161 10 0 11
fr.paris.lutece.plugins.parisconnect.business.AlertDAO 105 9 0 10
fr.paris.lutece.plugins.parisconnect.service.ParisConnectAPI 104 15 0 16
fr.paris.lutece.plugins.parisconnect.web.NewsletterJspBean 102 7 0 8
fr.paris.lutece.plugins.parisconnect.business.CategoryDAO 89 8 0 9
fr.paris.lutece.plugins.parisconnect.web.AlertJspBean 70 7 0 8
fr.paris.lutece.plugins.parisconnect.web.ParisConnectXPage 69 3 0 4
fr.paris.lutece.plugins.parisconnect.web.CategoryJspBean 66 7 0 8
fr.paris.lutece.plugins.parisconnect.business.Message 61 24 0 0
fr.paris.lutece.plugins.parisconnect.web.MessageXPage 61 3 0 1
fr.paris.lutece.plugins.parisconnect.web.AlertXPage 58 3 0 3
fr.paris.lutece.plugins.parisconnect.business.NewsletterHome 52 10 0 11
fr.paris.lutece.plugins.parisconnect.business.Newsletter 52 20 0 19
fr.paris.lutece.plugins.parisconnect.rs.MessageRest 52 4 2 5
fr.paris.lutece.plugins.parisconnect.service.ParisConnectIncludeService 52 4 0 5
fr.paris.lutece.plugins.parisconnect.rs.NewsletterRest 48 4 2 5
fr.paris.lutece.plugins.parisconnect.rs.AlertRest 48 4 2 5
fr.paris.lutece.plugins.parisconnect.web.mydashboard.MyDashboardAlerts 45 3 0 0
fr.paris.lutece.plugins.parisconnect.web.NewsletterXPage 41 3 0 3
fr.paris.lutece.plugins.parisconnect.business.AlertHome 33 9 0 10
fr.paris.lutece.plugins.parisconnect.business.portlet.ParisconnectPortletDAO 32 4 0 5
fr.paris.lutece.plugins.parisconnect.web.portlet.ParisconnectPortletJspBean 31 4 0 5
fr.paris.lutece.plugins.parisconnect.rs.Constants 29 0 0 1
fr.paris.lutece.plugins.parisconnect.service.JsonUtil 29 3 0 3
fr.paris.lutece.plugins.parisconnect.business.Category 27 10 0 11
fr.paris.lutece.plugins.parisconnect.business.Alert 27 10 0 9
fr.paris.lutece.plugins.parisconnect.service.ParisConnectIconService 26 6 0 7
fr.paris.lutece.plugins.parisconnect.business.CategoryHome 25 8 0 9

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.parisconnect.service.ParisConnectService 249 35 0 15
fr.paris.lutece.plugins.parisconnect.business.Message 61 24 0 0
fr.paris.lutece.plugins.parisconnect.service.ParisConnectAPIService 282 24 0 25
fr.paris.lutece.plugins.parisconnect.business.Newsletter 52 20 0 19
fr.paris.lutece.plugins.parisconnect.service.ParisConnectAPI 104 15 0 16
fr.paris.lutece.plugins.parisconnect.business.Category 27 10 0 11
fr.paris.lutece.plugins.parisconnect.business.NewsletterHome 52 10 0 11
fr.paris.lutece.plugins.parisconnect.business.NewsletterDAO 161 10 0 11
fr.paris.lutece.plugins.parisconnect.business.Alert 27 10 0 9
fr.paris.lutece.plugins.parisconnect.business.AlertDAO 105 9 0 10
fr.paris.lutece.plugins.parisconnect.business.INewsletterDAO 10 9 0 10
fr.paris.lutece.plugins.parisconnect.business.AlertHome 33 9 0 10
fr.paris.lutece.plugins.parisconnect.business.IAlertDAO 9 8 0 9
fr.paris.lutece.plugins.parisconnect.business.CategoryHome 25 8 0 9
fr.paris.lutece.plugins.parisconnect.business.UserInformations 21 8 0 0
fr.paris.lutece.plugins.parisconnect.business.CategoryDAO 89 8 0 9
fr.paris.lutece.plugins.parisconnect.business.ICategoryDAO 8 7 0 8
fr.paris.lutece.plugins.parisconnect.web.AlertJspBean 70 7 0 8
fr.paris.lutece.plugins.parisconnect.web.CategoryJspBean 66 7 0 8
fr.paris.lutece.plugins.parisconnect.web.NewsletterJspBean 102 7 0 8
fr.paris.lutece.plugins.parisconnect.business.DoListResponse 16 6 0 0
fr.paris.lutece.plugins.parisconnect.service.ParisConnectIconService 26 6 0 7
fr.paris.lutece.plugins.parisconnect.web.ParisConnectResponse 15 5 0 5
fr.paris.lutece.plugins.parisconnect.business.portlet.ParisconnectPortlet 9 4 0 5
fr.paris.lutece.plugins.parisconnect.business.portlet.ParisconnectPortletDAO 32 4 0 5
fr.paris.lutece.plugins.parisconnect.business.portlet.IParisconnectPortletDAO 5 4 0 5
fr.paris.lutece.plugins.parisconnect.business.portlet.ParisconnectPortletHome 16 4 0 5
fr.paris.lutece.plugins.parisconnect.rs.NewsletterRest 48 4 2 5
fr.paris.lutece.plugins.parisconnect.rs.AlertRest 48 4 2 5
fr.paris.lutece.plugins.parisconnect.rs.MessageRest 52 4 2 5

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
43.24 2,850.00 0.11 6.27 5.69

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.paris.lutece.plugins.parisconnect.web.mydashboard.MyDashboardAlerts.getDashboardData(HttpServletRequest) 31 10 0
fr.paris.lutece.plugins.parisconnect.web.AlertXPage.getManageAlerts(HttpServletRequest) 30 10 0
fr.paris.lutece.plugins.parisconnect.business.NewsletterDAO.load(int,Plugin) 25 3 1
fr.paris.lutece.plugins.parisconnect.business.NewsletterDAO.loadByCode(String,Plugin) 25 3 1
fr.paris.lutece.plugins.parisconnect.business.NewsletterDAO.selectNewslettersList(Plugin) 25 3 1
fr.paris.lutece.plugins.parisconnect.web.NewsletterJspBean.doModifyNewsletter(HttpServletRequest) 24 8 1
fr.paris.lutece.plugins.parisconnect.service.ParisConnectAPIService.sendMessage(Message) 23 10 1
fr.paris.lutece.plugins.parisconnect.service.ParisConnectAPI.callMethodGet(String,String,boolean) 23 9 1
fr.paris.lutece.plugins.parisconnect.web.MessageXPage.getUserMessagesHistory(HttpServletRequest) 23 9 0
fr.paris.lutece.plugins.parisconnect.web.ParisConnectXPage.doSubscribeNewsletter(HttpServletRequest) 23 8 1
fr.paris.lutece.plugins.parisconnect.web.ParisConnectXPage.doSubscribeAlert(HttpServletRequest) 23 8 1
fr.paris.lutece.plugins.parisconnect.web.NewsletterJspBean.doCreateNewsletter(HttpServletRequest) 20 6 1
fr.paris.lutece.plugins.parisconnect.business.NewsletterDAO.insert(Newsletter,Plugin) 19 2 1
fr.paris.lutece.plugins.parisconnect.business.NewsletterDAO.store(Newsletter,Plugin) 19 2 1
fr.paris.lutece.plugins.parisconnect.service.ParisConnectService.getUserNewsletters(String,String) 18 7 0
fr.paris.lutece.plugins.parisconnect.service.ParisConnectAPI.callMethod(String,String,boolean) 18 7 1
fr.paris.lutece.plugins.parisconnect.rs.MessageRest.sendMessageV1(String,HttpServletRequest) 17 8 1
fr.paris.lutece.plugins.parisconnect.service.ParisConnectAPI.checkJSONforErrors(String) 16 8 1
fr.paris.lutece.plugins.parisconnect.business.AlertDAO.load(int,Plugin) 15 2 1
fr.paris.lutece.plugins.parisconnect.business.AlertDAO.loadByIdPc(String,Plugin) 15 2 1
fr.paris.lutece.plugins.parisconnect.business.AlertDAO.selectAlertsList(Plugin) 15 2 1
fr.paris.lutece.plugins.parisconnect.business.CategoryDAO.load(int,Plugin) 15 2 1
fr.paris.lutece.plugins.parisconnect.business.CategoryDAO.selectCategorysList(Plugin) 15 2 1
fr.paris.lutece.plugins.parisconnect.rs.NewsletterRest.subscribeNewsletterV1(String,HttpServletRequest) 15 8 1
fr.paris.lutece.plugins.parisconnect.rs.AlertRest.subscribeAlertV1(String,HttpServletRequest) 15 8 1
fr.paris.lutece.plugins.parisconnect.rs.MessageRest.sendReponseMessageV1(String,String,HttpServletRequest) 15 9 1
fr.paris.lutece.plugins.parisconnect.service.ParisConnectService.subscribeNewsletter(String,String,String) 15 7 1
fr.paris.lutece.plugins.parisconnect.service.ParisConnectAPIService.setAccountShadow(String,String) 15 3 1
fr.paris.lutece.plugins.parisconnect.service.ParisConnectAPIService.sendUserResponseEmp(String,String,String) 15 4 1
fr.paris.lutece.plugins.parisconnect.web.MessageXPage.getUserMessages(HttpServletRequest) 15 5 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
2,850.00 5.63 2.04 0.77

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