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
com.hack23.cia.web.impl.ui.page.user1744604411669411
com.hack23.cia.web.impl.ui.application53627519927211
com.hack23.cia.web.impl.ui.common736200351770148
com.hack23.cia.web.impl.ui.page.admin510130824194
com.hack23.cia.web.impl.ui.page.common418701887094
com.hack23.cia.web.impl.ui.page.dev125226022
com.hack23.cia.web.impl.ui.page.common.panel1628737027
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
401521359130589171007

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
com.hack23.cia.web.impl.ui.application.TopLevelWindowTemplate1201419
com.hack23.cia.web.impl.ui.page.user.SwedishBudgetResultPanel61404
com.hack23.cia.web.impl.ui.page.user.PoliticianPage57402
com.hack23.cia.web.impl.ui.page.user.GlobalSiteViewPanel52403
com.hack23.cia.web.impl.ui.common.CustomUserDetailsService50302
com.hack23.cia.web.impl.ui.page.admin.AdminPage49302
com.hack23.cia.web.impl.ui.application.CitizenIntelligenceAgency491301
com.hack23.cia.web.impl.ui.common.CustomUserDetails49908
com.hack23.cia.web.impl.ui.page.user.CountryPage41302
com.hack23.cia.web.impl.ui.page.dev.TestPage39202
com.hack23.cia.web.impl.ui.page.user.VisitorPanel38102
com.hack23.cia.web.impl.ui.page.admin.ConsolePage36212
com.hack23.cia.web.impl.ui.page.user.LoginPage34302
com.hack23.cia.web.impl.ui.page.common.AbstractPage341209
com.hack23.cia.web.impl.ui.page.user.AggregatedBugsDataPanel33203
com.hack23.cia.web.impl.ui.page.user.WorldBankIndicatorCountryPanel28303
com.hack23.cia.web.impl.ui.page.user.AggregatedCountryDataPanel21203
com.hack23.cia.web.impl.ui.page.user.WelcomePage20202
com.hack23.cia.web.impl.ui.page.common.panel.AbstractPanel19607
com.hack23.cia.web.impl.ui.page.user.LogoutPage17202
com.hack23.cia.web.impl.ui.page.user.AggregatedBugDataPanel17203
com.hack23.cia.web.impl.ui.application.Pages15506
com.hack23.cia.web.impl.ui.common.ApplicationProperties15404
com.hack23.cia.web.impl.ui.common.SecurityControllerImpl15604
com.hack23.cia.web.impl.ui.page.admin.ConsolePage.Command14200
com.hack23.cia.web.impl.ui.application.CIAWebApplication14303
com.hack23.cia.web.impl.ui.common.ApplicationUserStateHolder13506
com.hack23.cia.web.impl.ui.page.user.ProjectInfoPage11202
com.hack23.cia.web.impl.ui.page.admin.DashBoardPage11202
com.hack23.cia.web.impl.ui.common.ApplicationUserState9809

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
com.hack23.cia.web.impl.ui.application.TopLevelWindowTemplate1201419
com.hack23.cia.web.impl.ui.application.CitizenIntelligenceAgency491301
com.hack23.cia.web.impl.ui.page.common.AbstractPage341209
com.hack23.cia.web.impl.ui.common.CustomUserDetails49908
com.hack23.cia.web.impl.ui.common.ApplicationUserState9809
com.hack23.cia.web.impl.ui.page.common.panel.AbstractPanel19607
com.hack23.cia.web.impl.ui.common.SecurityControllerImpl15604
com.hack23.cia.web.impl.ui.application.Pages15506
com.hack23.cia.web.impl.ui.common.ApplicationUserStateHolder13506
com.hack23.cia.web.impl.ui.page.user.GlobalSiteViewPanel52403
com.hack23.cia.web.impl.ui.page.user.SwedishBudgetResultPanel61404
com.hack23.cia.web.impl.ui.page.user.PoliticianPage57402
com.hack23.cia.web.impl.ui.page.common.Page5405
com.hack23.cia.web.impl.ui.common.ApplicationProperties15404
com.hack23.cia.web.impl.ui.page.user.WorldBankIndicatorCountryPanel28303
com.hack23.cia.web.impl.ui.page.user.PoliticalPartyPage8302
com.hack23.cia.web.impl.ui.page.user.LoginPage34302
com.hack23.cia.web.impl.ui.page.user.CountryPage41302
com.hack23.cia.web.impl.ui.page.user.BallotPage6302
com.hack23.cia.web.impl.ui.page.user.DocumentPage6302
com.hack23.cia.web.impl.ui.page.admin.AdminPage49302
com.hack23.cia.web.impl.ui.application.CIAWebApplication14303
com.hack23.cia.web.impl.ui.common.CustomUserDetailsService50302
com.hack23.cia.web.impl.ui.page.user.LogoutPage17202
com.hack23.cia.web.impl.ui.page.user.AggregatedBugDataPanel17203
com.hack23.cia.web.impl.ui.page.user.AggregatedBugsDataPanel33203
com.hack23.cia.web.impl.ui.page.user.AggregatedCountryDataPanel21203
com.hack23.cia.web.impl.ui.page.user.WelcomePage20202
com.hack23.cia.web.impl.ui.page.user.ProjectInfoPage11202
com.hack23.cia.web.impl.ui.page.dev.TestPage39202

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
25.701,359.000.053.803.25

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
com.hack23.cia.web.impl.ui.page.user.PoliticianPage.PoliticianPage()3811
com.hack23.cia.web.impl.ui.page.user.VisitorPanel.VisitorPanel()3521
com.hack23.cia.web.impl.ui.page.dev.TestPage.TestPage()3531
com.hack23.cia.web.impl.ui.common.CustomUserDetailsService.loadUserDetails(OpenIDAuthenticationToken)35110
com.hack23.cia.web.impl.ui.page.admin.AdminPage.AdminPage()3411
com.hack23.cia.web.impl.ui.page.user.GlobalSiteViewPanel.update()3241
com.hack23.cia.web.impl.ui.page.admin.ConsolePage.ConsolePage()3211
com.hack23.cia.web.impl.ui.page.user.CountryPage.paramChanged(NavigationEvent)3120
com.hack23.cia.web.impl.ui.page.user.SwedishBudgetResultPanel.SwedishBudgetResultPanel()2831
com.hack23.cia.web.impl.ui.page.user.AggregatedBugsDataPanel.update(AggregatedCountryData)2551
com.hack23.cia.web.impl.ui.application.TopLevelWindowTemplate.createHeader()2310
com.hack23.cia.web.impl.ui.common.CustomUserDetails.equals(Object)23190
com.hack23.cia.web.impl.ui.page.user.WorldBankIndicatorCountryPanel.update(AggregatedCountryData)2121
com.hack23.cia.web.impl.ui.page.user.LoginPage.LoginPage()2011
com.hack23.cia.web.impl.ui.page.user.AggregatedCountryDataPanel.update(AggregatedCountryData)1611
com.hack23.cia.web.impl.ui.page.user.WelcomePage.WelcomePage()1611
com.hack23.cia.web.impl.ui.page.user.SwedishBudgetResultPanel.createAnnotatedTimeLine(OperationalStatementData)1431
com.hack23.cia.web.impl.ui.page.user.LogoutPage.LogoutPage()1211
com.hack23.cia.web.impl.ui.application.TopLevelWindowTemplate.setupAddThis()1211
com.hack23.cia.web.impl.ui.page.user.AggregatedBugDataPanel.update(AggregatedBugData)1121
com.hack23.cia.web.impl.ui.page.admin.ConsolePage.Command.execute(Console,String[])1130
com.hack23.cia.web.impl.ui.application.TopLevelWindowTemplate.initAdminMenu()1021
com.hack23.cia.web.impl.ui.application.TopLevelWindowTemplate.TopLevelWindowTemplate(Object,ApplicationUserState)911
com.hack23.cia.web.impl.ui.application.TopLevelWindowTemplate.createFooter()910
com.hack23.cia.web.impl.ui.page.admin.AdminPage.buttonClick(ClickEvent)820
com.hack23.cia.web.impl.ui.page.user.PoliticianPage.paramChanged(NavigationEvent)720
com.hack23.cia.web.impl.ui.page.user.LoginPage.buttonClick(ClickEvent)720
com.hack23.cia.web.impl.ui.page.user.ProjectInfoPage.ProjectInfoPage()711
com.hack23.cia.web.impl.ui.page.admin.DashBoardPage.DashBoardPage()711
com.hack23.cia.web.impl.ui.application.TopLevelWindowTemplate.initUserMenu()721

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
1,359.005.861.530.61

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