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.model.sweden.impl1724491723612372220
com.hack23.cia.service.impl.admin151128306934937411
com.hack23.cia.service.impl.common13123722774665394
com.hack23.cia.web.views.user15566806535724162
com.hack23.cia.model.application.impl.common161566311487670369
com.hack23.cia.service.impl.agent.sweden11364583516943160
com.hack23.cia.web.views.components.gridboxes1647457492423155
com.hack23.cia.service.impl.user1452406291361299
com.hack23.cia.web.views.admin182536317886151
com.hack23.cia.service.dao201003557736966341
com.hack23.cia.service.api.user2856293833920172
com.hack23.cia.web.controller.user1242285241160228
com.hack23.cia.model.application.impl.user1652260683130116
com.hack23.cia.web.viewfactory.impl.user122325920815149
com.hack23.cia.service.api.admin1740207562760107
com.hack23.cia.web.controller.admin82919416760158
com.hack23.cia.web.viewfactory.api.user1038191412170157
com.hack23.cia.model.application.impl.admin93616745219073
com.hack23.cia.web.controller.application5161541365775
com.hack23.cia.web.views.components.panels51313918976623
com.hack23.cia.web.viewfactory.api.admin926134291500117
com.hack23.cia.web.action.user132512238161077
com.hack23.cia.web.controller.common62711521109079
com.hack23.cia.web.action.admin92211031137058
com.hack23.cia.web.viewfactory.impl.application2698526940
com.hack23.cia.service.api.common11219428122085
com.hack23.cia.web.service2588523016
com.hack23.cia.web.common6148018862366
com.hack23.cia.web.viewfactory.impl.admin8187714460111
com.hack23.cia.service.impl.application2760418044
com.hack23.cia.model.core.impl311571047035
com.hack23.cia.service.api.application310491259033
com.hack23.cia.model.application.dto.common29471152012
com.hack23.cia.web.viewfactory.api.common412451256051
com.hack23.cia.web.viewfactory.api.application1631633019
com.hack23.cia.web.action.common4730835137
com.hack23.cia.web.viewfactory.impl.common3723729032
com.hack23.cia.web.views.common152162606
com.hack23.cia.web.action.application131641907
com.hack23.cia.web.views.components.comparators221426020
com.hack23.cia.web.main1172804
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
37015409286145972805704669

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
com.hack23.cia.service.impl.common.ChartServiceImpl303903
com.hack23.cia.service.impl.admin.LoaderServiceImpl2302304
com.hack23.cia.web.views.user.ParliamentMemberSummaryPanel14513014
com.hack23.cia.service.impl.admin.AdminServiceImpl1411702
com.hack23.cia.service.dao.ParliamentMemberDAOImpl1073006
com.hack23.cia.service.impl.admin.LoaderTask91505
com.hack23.cia.model.application.impl.common.Agency8820119
com.hack23.cia.service.impl.agent.sweden.BallotAgentImpl87504
com.hack23.cia.web.views.admin.ConfigurePortalPanel87233
com.hack23.cia.service.impl.common.ParliamentServiceImpl863502
com.hack23.cia.service.impl.agent.sweden.CommitteeReportAgentImpl83417
com.hack23.cia.web.views.user.BallotPanel829010
com.hack23.cia.model.application.impl.common.UserSession7928028
com.hack23.cia.service.impl.agent.sweden.ParliamentMemberAgentImpl79603
com.hack23.cia.web.views.admin.ConfigureLanguagePanel79233
com.hack23.cia.service.impl.agent.sweden.ParliamentMemberRegisterAgentImpl77503
com.hack23.cia.model.sweden.impl.Ballot7426125
com.hack23.cia.web.views.admin.AbstractAdminPanel72546
com.hack23.cia.web.views.user.CommitteeReportSummaryPanel72809
com.hack23.cia.web.views.components.panels.SimpleComponentPanel689010
com.hack23.cia.model.sweden.impl.ParliamentMemberBallotRecord6625025
com.hack23.cia.model.sweden.impl.ParliamentMember6424023
com.hack23.cia.web.viewfactory.impl.user.MenuFactoryImpl63202
com.hack23.cia.web.views.components.gridboxes.GridBoxColumnFactory5915016
com.hack23.cia.model.sweden.impl.RegisterInformation5722023
com.hack23.cia.web.views.admin.ConfigureLanguageContentPanel57233
com.hack23.cia.model.sweden.impl.AbstractBallotMetaData5316015
com.hack23.cia.web.controller.application.ApplicationActionListener52402
com.hack23.cia.service.impl.common.UserSessionServiceImpl51703
com.hack23.cia.web.views.user.PositionBarPanel51708

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
com.hack23.cia.service.impl.common.ParliamentServiceImpl863502
com.hack23.cia.service.impl.common.ParliamentService3534035
com.hack23.cia.service.dao.ParliamentMemberDAOImpl1073006
com.hack23.cia.model.application.impl.common.UserSession7928028
com.hack23.cia.model.sweden.impl.Ballot7426125
com.hack23.cia.model.sweden.impl.ParliamentMemberBallotRecord6625025
com.hack23.cia.service.dao.ParliamentMemberDAO2625026
com.hack23.cia.model.sweden.impl.ParliamentMember6424023
com.hack23.cia.service.impl.admin.LoaderServiceImpl2302304
com.hack23.cia.model.sweden.impl.RegisterInformation5722023
com.hack23.cia.model.application.impl.common.Agency8820119
com.hack23.cia.service.impl.admin.LoaderService2120021
com.hack23.cia.model.sweden.impl.Parliament4819018
com.hack23.cia.service.impl.admin.AdminServiceImpl1411702
com.hack23.cia.model.sweden.impl.Vote4216115
com.hack23.cia.model.sweden.impl.ParliamentMemberVoteCompareResult4716015
com.hack23.cia.model.sweden.impl.AbstractBallotMetaData5316015
com.hack23.cia.service.impl.admin.AdminService1716017
com.hack23.cia.web.views.components.gridboxes.GridBoxColumnFactory5915016
com.hack23.cia.model.sweden.impl.CommitteeReport3814113
com.hack23.cia.model.application.impl.common.AbstractActionEvent331308
com.hack23.cia.web.views.user.ParliamentMemberSummaryPanel14513014
com.hack23.cia.model.application.impl.common.User2911110
com.hack23.cia.model.application.impl.common.LanguageContent3111112
com.hack23.cia.model.sweden.impl.VoteMetaData3211310
com.hack23.cia.model.sweden.impl.ParliamentYear2911010
com.hack23.cia.model.sweden.impl.PoliticalParty2911010
com.hack23.cia.web.controller.common.AbstractGenericHandler451119
com.hack23.cia.model.application.impl.common.Portal3210111
com.hack23.cia.model.sweden.impl.Committee271009

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
18.819,286.000.154.163.95

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
com.hack23.cia.service.impl.common.ChartServiceImpl.generateParliamentCharts(Agency,Ballot,PoliticalParty,Language)73100
com.hack23.cia.service.impl.common.ChartServiceImpl.generateParliamentMemberCharts(Agency,Ballot,ParliamentMember,PoliticalParty,Language)6890
com.hack23.cia.service.impl.common.ChartServiceImpl.generatePoliticalPartyCharts(Agency,Ballot,PoliticalParty,Language)6460
com.hack23.cia.service.impl.admin.LoaderServiceImpl.addBallotInformation(Long,Vote)58100
com.hack23.cia.service.impl.agent.sweden.ParliamentMemberRegisterAgentImpl.init()54170
com.hack23.cia.service.impl.agent.sweden.ParliamentMemberAgentImpl.initData()52160
com.hack23.cia.service.impl.admin.LoaderTask.run()50210
com.hack23.cia.web.viewfactory.impl.user.MenuFactoryImpl.createApplicationMenu(UserSessionDTO,PoliticalParty,int)5070
com.hack23.cia.web.views.admin.ConfigurePortalPanel.createPortalTabSheet(Portal)4711
com.hack23.cia.web.viewfactory.impl.user.ParliamentMemberListViewFactoryImpl.processSpecificView(ParliamentMemberListModelAndView)44270
com.hack23.cia.web.views.admin.ConfigureLanguagePanel.createLanguageTabSheet(Agency,Language)4411
com.hack23.cia.web.views.components.gridboxes.BallotGridBox.BallotGridBox(UserSessionDTO,Ballot,Vote)4361
com.hack23.cia.web.views.components.gridboxes.RegisterInformationGridbox.RegisterInformationGridbox(UserSessionDTO,RegisterInformation)40101
com.hack23.cia.service.impl.agent.sweden.BallotAgentImpl.getVoteResult(Ballot)3890
com.hack23.cia.web.views.admin.AbstractAdminPanel.createAgencyTabSheet(Agency)3611
com.hack23.cia.web.views.user.PositionBarPanel.PositionBarPanel(UserSessionDTO)3411
com.hack23.cia.service.impl.common.ChartServiceImpl.generateBallotCharts(Agency,Ballot,PoliticalParty,Language)3330
com.hack23.cia.web.viewfactory.impl.application.ApplicationViewFactoryImpl.createFrame(Frame,UserSessionDTO,Agency,CommitteeReport,PoliticalParty)3121
com.hack23.cia.web.controller.application.ApplicationActionListener.actionPerformed(ActionEvent)29110
com.hack23.cia.web.views.admin.ConfigureLanguageContentPanel.createLanguageContentTabSheet(LanguageContent)2911
com.hack23.cia.service.impl.user.ParliamentMemberRequestService.handleServiceRequest(ParliamentMemberRequest,UserSessionDTO)2840
com.hack23.cia.web.views.user.SearchPanel.SearchPanel(UserSessionDTO)2711
com.hack23.cia.service.impl.user.PartyRequestService.handleServiceRequest(PartyRequest,UserSessionDTO)2670
com.hack23.cia.web.views.components.gridboxes.VoteGridBox.VoteGridBox(UserSessionDTO,Vote)2621
com.hack23.cia.web.views.user.WelcomePanel.WelcomePanel(UserSessionDTO)2611
com.hack23.cia.service.impl.user.TopListRequestService.handleServiceRequest(TopListRequest,UserSessionDTO)2570
com.hack23.cia.web.service.RssFeedService.handleRequestInternal(HttpServletRequest,HttpServletResponse)2510
com.hack23.cia.web.controller.user.PartyActionHandler.handleSuccessResponse(PartyAction,TopListResponse)2470
com.hack23.cia.web.controller.user.TopListActionHandler.handleSuccessResponse(TopListAction,TopListResponse)2470
com.hack23.cia.service.impl.admin.AgencyRequestService.handleServiceRequest(AgencyRequest,UserSessionDTO)2360

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
9,286.003.751.350.72

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