JavaNCSS Metric Results

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

The following document contains the results of a JavaNCSS metric analysis.
JavaNCSS web site.

Packages

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

Packages sorted by NCSS.

PackageClassesMethodsNCSSJavadocsJavadoc linesSingle lines commentMulti lines comment
net.sf.firemox.action73470376320822781921955
net.sf.firemox.clickable.target.card1932923311881592190557
net.sf.firemox.xml.magic32520552212711486
net.sf.firemox.stack1218118471741383168697
net.sf.firemox.tools2824817572121613120735
net.sf.firemox.ui.wizard2310016957675585582
net.sf.firemox.test6323316271701649171708
net.sf.firemox.xml.action616314281211179901186
net.sf.firemox.xml141141327137111560390
net.sf.firemox.event3423212191812199151032
net.sf.firemox352118431182135159
net.sf.firemox.ui157810977756593478
net.sf.firemox.zone13154107711084849416
net.sf.firemox.ui.component188710066645373443
net.sf.firemox.clickable.ability181558698974845530
net.sf.firemox.deckbuilder11718557043759371
net.sf.firemox.modifier.model201237938576222473
net.sf.firemox.xml.tbs7147912020798200
net.sf.firemox.modifier20896945955630431
net.sf.firemox.expression27896697275212567
net.sf.firemox.network12496685432591344
net.sf.firemox.database7666666654157208
net.sf.firemox.ui.layout10776474848627265
net.sf.firemox.clickable.target.player5676373829450142
net.sf.firemox.action.targetlist2582629565134491
net.sf.firemox.xml.test36385737171611708
net.sf.firemox.operation281205468642521037
net.sf.firemox.action.intlist1963540424834398
net.sf.firemox.token2160524664686998
net.sf.firemox.xml.expression29294395858814575
net.sf.firemox.xml.event28284185657062556
net.sf.firemox.action.target7514042429924146
net.sf.firemox.clickable.action327289231731697
net.sf.firemox.action.context1033229392988229
net.sf.firemox.clickable.mana227225252112357
net.sf.firemox.xml.modifier11112212221916214
net.sf.firemox.chart739209231231165
net.sf.firemox.chart.datasets525189191225113
net.sf.firemox.event.phase533186232540157
net.sf.firemox.database.propertyconfig724164211453129
net.sf.firemox.expression.targetlist918163191650195
net.sf.firemox.expression.intlist1019151191630218
net.sf.firemox.clickable.target23214133221762
net.sf.firemox.ui.i18n321135231514108
net.sf.firemox.action.objectmap5221321198094
net.sf.firemox.event.context43613028231178
net.sf.firemox.mail391189531374
net.sf.firemox.management2121001398442
net.sf.firemox.ui.component.task415891291579
net.sf.firemox.database.data5168514117094
net.sf.firemox.network.message51879171180172
fabdouglas1376421718
net.sf.firemox.stack.phasetype4859101031103
net.sf.firemox.action.listener72850232100126
org.mortbay.util1343447116
net.sf.firemox.action.handler61140171910108
net.sf.firemox.clickable11135741518
net.sf.firemox.annotation00700027
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
831413838120329128772213921657

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
net.sf.firemox.xml.magic.Oracle2Xml188716012
net.sf.firemox.clickable.target.card.MCard63691066
net.sf.firemox.DeckBuilder57527118
net.sf.firemox.stack.StackManager49351150
net.sf.firemox.stack.ActionManager45639036
net.sf.firemox.xml.tbs.Tbs410707
net.sf.firemox.tools.MToolKit39356057
net.sf.firemox.ui.MagicUIComponents364628
net.sf.firemox.clickable.target.card.VirtualCard3461809
net.sf.firemox.Magic3451018
net.sf.firemox.clickable.target.player.Player33544026
net.sf.firemox.xml.XmlTools30529028
net.sf.firemox.xml.XmlParser3026327
net.sf.firemox.zone.MZone26054040
net.sf.firemox.test.TestOn25618017
net.sf.firemox.action.target.ChosenTarget2472208
net.sf.firemox.action.MoveCard2391405
net.sf.firemox.clickable.target.card.CardFactory23314015
net.sf.firemox.action.PayMana2232308
net.sf.firemox.stack.EventManager21511712
net.sf.firemox.xml.XmlConfiguration21218019
net.sf.firemox.stack.MPhase17627017
net.sf.firemox.action.ActionFactory171506
net.sf.firemox.ui.layout.SectorLayout17118014
net.sf.firemox.deckbuilder.MdbLoader17019020
net.sf.firemox.database.DatabaseCard16930029
net.sf.firemox.database.DatabaseFactory168909
net.sf.firemox.tools.RevertedArrayList1652604
net.sf.firemox.clickable.target.card.TriggeredCard16434011
net.sf.firemox.xml.tbs.Card164102

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
net.sf.firemox.clickable.target.card.MCard63691066
net.sf.firemox.tools.MToolKit39356057
net.sf.firemox.zone.MZone26054040
net.sf.firemox.stack.StackManager49351150
net.sf.firemox.clickable.target.player.Player33544026
net.sf.firemox.stack.ActionManager45639036
net.sf.firemox.clickable.ability.Ability12236030
net.sf.firemox.clickable.target.card.TriggeredCard16434011
net.sf.firemox.clickable.target.card.AbstractCard8832019
net.sf.firemox.clickable.target.Target9830030
net.sf.firemox.database.DatabaseCard16930029
net.sf.firemox.clickable.target.card.LastKnownCard792903
net.sf.firemox.xml.XmlTools30529028
net.sf.firemox.DeckBuilder57527118
net.sf.firemox.stack.MPhase17627017
net.sf.firemox.tools.RevertedArrayList1652604
net.sf.firemox.clickable.target.card.AbstractCardModel882505
net.sf.firemox.action.PayMana2232308
net.sf.firemox.tools.Log11623023
net.sf.firemox.action.target.ChosenTarget2472208
net.sf.firemox.tools.MCardCompare7120015
net.sf.firemox.ui.MListModel8920019
net.sf.firemox.deckbuilder.MdbLoader17019020
net.sf.firemox.event.MEventListener5719018
net.sf.firemox.clickable.ability.UserAbility1121806
net.sf.firemox.clickable.target.card.VirtualCard3461809
net.sf.firemox.stack.TargetedList9018018
net.sf.firemox.test.TestOn25618017
net.sf.firemox.ui.layout.SectorLayout17118014
net.sf.firemox.xml.XmlConfiguration21218019

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
36.3038,120.000.044.983.96

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
net.sf.firemox.xml.magic.Oracle2Xml.serialize(File,File,File)9222190
net.sf.firemox.xml.magic.Oracle2Xml.writeActions(PrintWriter,String,boolean,boolean)5801780
net.sf.firemox.xml.tbs.Tbs.buildMdb(Node,OutputStream)361901
net.sf.firemox.ui.MagicUIComponents.initComponents()280141
net.sf.firemox.DeckBuilder.DeckBuilder()19941
net.sf.firemox.stack.ActionManager.playNextAction()187980
net.sf.firemox.xml.tbs.Card.buildMdb(Node,OutputStream)163641
net.sf.firemox.test.TestOn.getTargetable(Ability,MCard,ContextEventListener,Target)1461451
net.sf.firemox.clickable.target.card.VirtualCard.getTooltipString()145551
net.sf.firemox.ui.layout.SectorLayout.layoutContainer(Container)128341
net.sf.firemox.action.ActionFactory.readAction(InputStream,Modifier)1251221
net.sf.firemox.Magic.actionPerformed(ActionEvent)123430
net.sf.firemox.network.Client.run()116280
net.sf.firemox.ui.wizard.About.About(JFrame)11621
net.sf.firemox.test.TestFactory.readNextTest(InputStream)1131081
net.sf.firemox.network.Server.run()105290
net.sf.firemox.action.target.ChosenTarget.init(ActionContextWrapper,ContextEventListener,Ability)102321
net.sf.firemox.clickable.target.card.VirtualCard.paintComponent(Graphics)94380
net.sf.firemox.xml.action.Intlist.buildMdb(XmlParser.Node,OutputStream)94331
net.sf.firemox.xml.action.Targetlist.buildMdb(XmlParser.Node,OutputStream)94241
net.sf.firemox.DeckBuilder.actionPerformed(ActionEvent)93360
net.sf.firemox.Magic.Magic()85191
net.sf.firemox.xml.magic.Oracle2Xml.writeTarget(PrintWriter,String,boolean)78240
net.sf.firemox.xml.XmlConfiguration.main(String)76281
net.sf.firemox.action.PayMana.choose(ActionContextWrapper,ContextEventListener,Ability)74340
net.sf.firemox.xml.magic.Oracle2XmlNoRules.serialize(File,File,File)73210
net.sf.firemox.network.MSocketListener.run()72230
net.sf.firemox.Magic.main(String[])69211
net.sf.firemox.stack.EventManager.gotoNextPhase()69251
net.sf.firemox.clickable.target.player.Player.initUI()6511

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
38,120.006.562.750.59

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