JavaNCSS Metric Results

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

The following document contains the results of a JavaNCSS metric analysis, using JavaNCSS version 32.53.
JavaNCSS web site.

Packages

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

Packages sorted by NCSS.

PackageClassesMethodsNCSSJavadocsJavadoc linesSingle lines commentMulti lines comment
fr.paris.lutece.plugins.updater.service11885649944626363
fr.paris.lutece.plugins.updater.web2181912094866
fr.paris.lutece.plugins.updater.service.catalog537154421678165
fr.paris.lutece.plugins.updater.util.sql1331419033
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
1914694016572642627

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
fr.paris.lutece.plugins.updater.service.UpdateService17816017
fr.paris.lutece.plugins.updater.service.PluginManagerService17420021
fr.paris.lutece.plugins.updater.web.UpdaterJspBean13317018
fr.paris.lutece.plugins.updater.service.catalog.CatalogService49506
fr.paris.lutece.plugins.updater.service.catalog.CatalogInfos4719020
fr.paris.lutece.plugins.updater.service.UpdateInfos3614015
fr.paris.lutece.plugins.updater.service.NewInfos3614015
fr.paris.lutece.plugins.updater.util.sql.SqlUtils22304
fr.paris.lutece.plugins.updater.web.UpdaterDashboardComponent21102
fr.paris.lutece.plugins.updater.service.InstalledInfos21809
fr.paris.lutece.plugins.updater.service.catalog.UpgradeInfos21809
fr.paris.lutece.plugins.updater.service.UpdaterStatusDaemon18102
fr.paris.lutece.plugins.updater.service.IUpdateService139010
fr.paris.lutece.plugins.updater.service.catalog.Catalog11405
fr.paris.lutece.plugins.updater.service.UpdaterStartUpService8203
fr.paris.lutece.plugins.updater.service.UpdaterShutdownService8203
fr.paris.lutece.plugins.updater.service.UpdaterDownloadException3102
fr.paris.lutece.plugins.updater.service.UpdaterScriptException3102
fr.paris.lutece.plugins.updater.service.catalog.ICatalogService2102

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
fr.paris.lutece.plugins.updater.service.PluginManagerService17420021
fr.paris.lutece.plugins.updater.service.catalog.CatalogInfos4719020
fr.paris.lutece.plugins.updater.web.UpdaterJspBean13317018
fr.paris.lutece.plugins.updater.service.UpdateService17816017
fr.paris.lutece.plugins.updater.service.UpdateInfos3614015
fr.paris.lutece.plugins.updater.service.NewInfos3614015
fr.paris.lutece.plugins.updater.service.IUpdateService139010
fr.paris.lutece.plugins.updater.service.InstalledInfos21809
fr.paris.lutece.plugins.updater.service.catalog.UpgradeInfos21809
fr.paris.lutece.plugins.updater.service.catalog.CatalogService49506
fr.paris.lutece.plugins.updater.service.catalog.Catalog11405
fr.paris.lutece.plugins.updater.util.sql.SqlUtils22304
fr.paris.lutece.plugins.updater.service.UpdaterStartUpService8203
fr.paris.lutece.plugins.updater.service.UpdaterShutdownService8203
fr.paris.lutece.plugins.updater.web.UpdaterDashboardComponent21102
fr.paris.lutece.plugins.updater.service.UpdaterDownloadException3102
fr.paris.lutece.plugins.updater.service.catalog.ICatalogService2102
fr.paris.lutece.plugins.updater.service.UpdaterScriptException3102
fr.paris.lutece.plugins.updater.service.UpdaterStatusDaemon18102

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
42.32940.000.007.688.68

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
fr.paris.lutece.plugins.updater.service.UpdateService.extractPackage(String,String)3081
fr.paris.lutece.plugins.updater.service.PluginManagerService.addResource(String,String,int,FileSystemResource)2461
fr.paris.lutece.plugins.updater.service.UpdateService.getUpdateInfos(Plugin)23101
fr.paris.lutece.plugins.updater.service.PluginManagerService.installPlugins()2161
fr.paris.lutece.plugins.updater.service.PluginManagerService.getPluginResources(String)1811
fr.paris.lutece.plugins.updater.service.UpdateService.isCompliantWithCurrentCore(CatalogInfos)17111
fr.paris.lutece.plugins.updater.service.UpdateService.downloadPackage(String,String,String)1661
fr.paris.lutece.plugins.updater.service.PluginManagerService.cleanPluginsMarkedForUpdate(int)1651
fr.paris.lutece.plugins.updater.service.catalog.CatalogService.getCatalogInfos()1641
fr.paris.lutece.plugins.updater.service.UpdateService.getNewPluginsInfos(Plugin)1541
fr.paris.lutece.plugins.updater.service.UpdateService.deployPlugin(String,String)1441
fr.paris.lutece.plugins.updater.service.UpdaterStatusDaemon.run()1431
fr.paris.lutece.plugins.updater.util.sql.SqlUtils.executeSqlScript(String,Plugin)1341
fr.paris.lutece.plugins.updater.service.UpdateService.checkUpdate(Plugin)1341
fr.paris.lutece.plugins.updater.service.PluginManagerService.executeScripts(String)1381
fr.paris.lutece.plugins.updater.service.PluginManagerService.installPlugin(String)1351
fr.paris.lutece.plugins.updater.web.UpdaterDashboardComponent.getDashboardData(AdminUser,HttpServletRequest)1211
fr.paris.lutece.plugins.updater.service.catalog.CatalogService.loadCatalogsList(Reader)1141
fr.paris.lutece.plugins.updater.service.catalog.CatalogService.load(Reader)1141
fr.paris.lutece.plugins.updater.web.UpdaterJspBean.getManageUpdates(HttpServletRequest)1011
fr.paris.lutece.plugins.updater.web.UpdaterJspBean.getManageNew(HttpServletRequest)1011
fr.paris.lutece.plugins.updater.web.UpdaterJspBean.doDownload(HttpServletRequest)1041
fr.paris.lutece.plugins.updater.web.UpdaterJspBean.doDownloadUpgrade(HttpServletRequest)1031
fr.paris.lutece.plugins.updater.web.UpdaterJspBean.getManageInstalled(HttpServletRequest)911
fr.paris.lutece.plugins.updater.service.PluginManagerService.backupPlugin(String)931
fr.paris.lutece.plugins.updater.service.UpdateService.copyStream(InputStream,OutputStream)821
fr.paris.lutece.plugins.updater.service.PluginManagerService.removePlugin(String,int)831
fr.paris.lutece.plugins.updater.util.sql.SqlUtils.executeSqlFileScript(String,Plugin)731
fr.paris.lutece.plugins.updater.web.UpdaterJspBean.deployPlugin(HttpServletRequest)711
fr.paris.lutece.plugins.updater.service.UpdateService.getCatalogInfos(String)741

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
940.004.661.731.00

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 declarationpackage java.lang;
Import declarationimport java.awt.*;
Class declaration
  • public class Foo {
  • public class Foo extends Bla {
Interface declarationpublic interface Able ; {
Field declaration
  • int a;
  • int a, b, c = 5, d = 6;
Method declaration
  • public void cry();
  • public void gib() throws DeadException {
Constructor declarationpublic Foo() {
Constructor invocation
  • this();
  • super();
Statement declaration
  • i = 0;
  • if (ok)
  • if (exit) {
  • if (3 == 4);
  • if (4 == 4) { ;
  • } else {
Label declarationfine :

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