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.shoppingcart.business 6 61 334 67 274 7 207
fr.paris.lutece.plugins.shoppingcart.web 2 16 298 18 114 16 79
fr.paris.lutece.plugins.shoppingcart.service.persistence 4 34 193 38 153 1 139
fr.paris.lutece.plugins.shoppingcart.service.validator 4 24 185 31 142 40 68
fr.paris.lutece.plugins.shoppingcart.service 5 28 142 33 151 8 10
fr.paris.lutece.plugins.shoppingcart.business.portlet 4 14 76 18 66 6 133
fr.paris.lutece.plugins.shoppingcart.business.lot 3 10 62 13 60 3 99
fr.paris.lutece.plugins.shoppingcart.service.daemon 1 1 40 2 6 0 37
fr.paris.lutece.plugins.shoppingcart.web.portlet 1 4 39 5 28 8 33
fr.paris.lutece.plugins.shoppingcart.service.provider 2 10 37 12 63 1 66
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
32 202 1406 237 1057 90 871

Objects

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.shoppingcart.web.ShoppingCartApp 193 12 0 13
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItemDAO 159 7 0 8
fr.paris.lutece.plugins.shoppingcart.service.validator.ShoppingCartValidatorService 118 8 1 12
fr.paris.lutece.plugins.shoppingcart.service.persistence.SessionPersistenceService 104 14 0 15
fr.paris.lutece.plugins.shoppingcart.service.ShoppingCartService 64 14 0 15
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItem 59 18 0 19
fr.paris.lutece.plugins.shoppingcart.web.ManageShoppingCartJspBean 57 4 0 5
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItemFilter 41 16 0 17
fr.paris.lutece.plugins.shoppingcart.business.lot.ShoppingCartLotDAO 38 3 0 4
fr.paris.lutece.plugins.shoppingcart.business.portlet.ShoppingCartPortletDAO 34 4 0 5
fr.paris.lutece.plugins.shoppingcart.web.portlet.ShoppingCartPortletJspBean 32 4 0 5
fr.paris.lutece.plugins.shoppingcart.service.persistence.DatabasePersistenceService 30 8 0 9
fr.paris.lutece.plugins.shoppingcart.service.daemon.ShoppingCartCleanerDaemon 29 1 0 2
fr.paris.lutece.plugins.shoppingcart.service.provider.ShoppingCartItemProviderManagementService 24 5 0 6
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItemDTO 23 7 0 8
fr.paris.lutece.plugins.shoppingcart.service.ShoppingCartLotService 19 7 0 8
fr.paris.lutece.plugins.shoppingcart.service.persistence.SessionedShoppingCartItem 19 4 0 5
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItemHome 18 7 0 8
fr.paris.lutece.plugins.shoppingcart.service.validator.LoggedInUserValidator 16 5 0 6
fr.paris.lutece.plugins.shoppingcart.service.AnonymousShoppingCartFilter 15 3 0 4
fr.paris.lutece.plugins.shoppingcart.business.portlet.ShoppingCartPortletHome 14 4 0 5
fr.paris.lutece.plugins.shoppingcart.business.portlet.ShoppingCartPortlet 13 6 0 7
fr.paris.lutece.plugins.shoppingcart.business.lot.ShoppingCartLotHome 10 4 0 5
fr.paris.lutece.plugins.shoppingcart.service.ShoppingCartCacheService 9 3 0 4
fr.paris.lutece.plugins.shoppingcart.service.persistence.IShoppingCartPersistenceService 9 8 0 9
fr.paris.lutece.plugins.shoppingcart.service.validator.AbstractShoppingCartValidator 9 3 0 4
fr.paris.lutece.plugins.shoppingcart.service.validator.IShoppingCartValidator 9 8 0 9
fr.paris.lutece.plugins.shoppingcart.business.IShoppingCartItemDAO 7 6 0 7
fr.paris.lutece.plugins.shoppingcart.service.provider.IShoppingCartItemProviderService 6 5 0 6
fr.paris.lutece.plugins.shoppingcart.business.lot.IShoppingCartLotDAO 4 3 0 4

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItem 59 18 0 19
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItemFilter 41 16 0 17
fr.paris.lutece.plugins.shoppingcart.service.ShoppingCartService 64 14 0 15
fr.paris.lutece.plugins.shoppingcart.service.persistence.SessionPersistenceService 104 14 0 15
fr.paris.lutece.plugins.shoppingcart.web.ShoppingCartApp 193 12 0 13
fr.paris.lutece.plugins.shoppingcart.service.persistence.IShoppingCartPersistenceService 9 8 0 9
fr.paris.lutece.plugins.shoppingcart.service.persistence.DatabasePersistenceService 30 8 0 9
fr.paris.lutece.plugins.shoppingcart.service.validator.ShoppingCartValidatorService 118 8 1 12
fr.paris.lutece.plugins.shoppingcart.service.validator.IShoppingCartValidator 9 8 0 9
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItemDTO 23 7 0 8
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItemHome 18 7 0 8
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItemDAO 159 7 0 8
fr.paris.lutece.plugins.shoppingcart.service.ShoppingCartLotService 19 7 0 8
fr.paris.lutece.plugins.shoppingcart.business.IShoppingCartItemDAO 7 6 0 7
fr.paris.lutece.plugins.shoppingcart.business.portlet.ShoppingCartPortlet 13 6 0 7
fr.paris.lutece.plugins.shoppingcart.service.provider.ShoppingCartItemProviderManagementService 24 5 0 6
fr.paris.lutece.plugins.shoppingcart.service.provider.IShoppingCartItemProviderService 6 5 0 6
fr.paris.lutece.plugins.shoppingcart.service.validator.LoggedInUserValidator 16 5 0 6
fr.paris.lutece.plugins.shoppingcart.web.ManageShoppingCartJspBean 57 4 0 5
fr.paris.lutece.plugins.shoppingcart.web.portlet.ShoppingCartPortletJspBean 32 4 0 5
fr.paris.lutece.plugins.shoppingcart.business.lot.ShoppingCartLotHome 10 4 0 5
fr.paris.lutece.plugins.shoppingcart.business.portlet.ShoppingCartPortletHome 14 4 0 5
fr.paris.lutece.plugins.shoppingcart.business.portlet.ShoppingCartPortletDAO 34 4 0 5
fr.paris.lutece.plugins.shoppingcart.service.persistence.SessionedShoppingCartItem 19 4 0 5
fr.paris.lutece.plugins.shoppingcart.business.lot.IShoppingCartLotDAO 4 3 0 4
fr.paris.lutece.plugins.shoppingcart.business.lot.ShoppingCartLotDAO 38 3 0 4
fr.paris.lutece.plugins.shoppingcart.service.AnonymousShoppingCartFilter 15 3 0 4
fr.paris.lutece.plugins.shoppingcart.service.ShoppingCartCacheService 9 3 0 4
fr.paris.lutece.plugins.shoppingcart.service.validator.AbstractShoppingCartValidator 9 3 0 4
fr.paris.lutece.plugins.shoppingcart.service.ShoppingCartPlugin 3 1 0 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
37.06 1,406.00 0.03 6.31 7.41

Methods

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItemDAO.findByFilter(ShoppingCartItemFilter,Plugin) 68 25 1
fr.paris.lutece.plugins.shoppingcart.web.ShoppingCartApp.getValidateShoppingCart(HttpServletRequest) 54 19 1
fr.paris.lutece.plugins.shoppingcart.service.validator.ShoppingCartValidatorService.generateValidatorList() 47 13 1
fr.paris.lutece.plugins.shoppingcart.web.ShoppingCartApp.getHtmlViewMyShoppingCart(HttpServletRequest,boolean,Object) 25 8 1
fr.paris.lutece.plugins.shoppingcart.service.daemon.ShoppingCartCleanerDaemon.run() 23 7 1
fr.paris.lutece.plugins.shoppingcart.service.validator.ShoppingCartValidatorService.modifyValidatorOrder(String,int) 23 11 1
fr.paris.lutece.plugins.shoppingcart.web.ShoppingCartApp.doValidateShoppingCart(HttpServletRequest) 22 9 1
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItemDAO.load(int,Plugin) 17 2 1
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItemDAO.selectShoppingItemsList(Plugin) 17 2 1
fr.paris.lutece.plugins.shoppingcart.service.validator.ShoppingCartValidatorService.getNextValidator(String) 17 14 1
fr.paris.lutece.plugins.shoppingcart.service.ShoppingCartService.checkAnonymousShoppingCart(String) 16 8 1
fr.paris.lutece.plugins.shoppingcart.service.persistence.SessionPersistenceService.saveItem(ShoppingCartItem) 16 4 1
fr.paris.lutece.plugins.shoppingcart.business.lot.ShoppingCartLotDAO.getNewIdLotForUser(String,Plugin) 15 2 1
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItemDAO.insert(ShoppingCartItem,Plugin) 13 1 1
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItemDAO.store(ShoppingCartItem,Plugin) 13 1 1
fr.paris.lutece.plugins.shoppingcart.service.persistence.SessionPersistenceService.removeItemFromUserShoppingCart(String,int,boolean) 13 7 1
fr.paris.lutece.plugins.shoppingcart.web.ManageShoppingCartJspBean.getManageShoppingCart(HttpServletRequest) 12 1 1
fr.paris.lutece.plugins.shoppingcart.web.ManageShoppingCartJspBean.doModifyShoppingCartParameters(HttpServletRequest) 12 4 1
fr.paris.lutece.plugins.shoppingcart.service.AnonymousShoppingCartFilter.doFilter(ServletRequest,ServletResponse,FilterChain) 12 6 1
fr.paris.lutece.plugins.shoppingcart.web.ShoppingCartApp.doRemoveItem(HttpServletRequest) 11 6 1
fr.paris.lutece.plugins.shoppingcart.service.persistence.SessionPersistenceService.findItemsByFilter(ShoppingCartItemFilter) 11 4 1
fr.paris.lutece.plugins.shoppingcart.service.persistence.SessionPersistenceService.getNewShoppingCartItemId() 11 4 1
fr.paris.lutece.plugins.shoppingcart.web.ShoppingCartApp.getConfirmRemoveItem(HttpServletRequest) 10 5 1
fr.paris.lutece.plugins.shoppingcart.web.portlet.ShoppingCartPortletJspBean.doCreate(HttpServletRequest) 10 3 1
fr.paris.lutece.plugins.shoppingcart.business.ShoppingCartItem.hashCode() 10 7 1
fr.paris.lutece.plugins.shoppingcart.web.ShoppingCartApp.validateItemList(LuteceUser,IShoppingCartValidator,ShoppingCartItem,HttpServletRequest) 9 3 1
fr.paris.lutece.plugins.shoppingcart.web.portlet.ShoppingCartPortletJspBean.doModify(HttpServletRequest) 9 3 1
fr.paris.lutece.plugins.shoppingcart.business.lot.ShoppingCartLotDAO.getLastIdlotOfUser(String,Plugin) 9 2 1
fr.paris.lutece.plugins.shoppingcart.business.lot.ShoppingCartLotDAO.getUserNameFromIdLot(int,Plugin) 9 2 1
fr.paris.lutece.plugins.shoppingcart.business.portlet.ShoppingCartPortletDAO.load(int) 9 2 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,406.00 4.97 2.26 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).