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.tacos.components.tree567344632211437
net.sf.tacos.services.impl34328745215720
net.sf.tacos.components.dojo439212391601610
net.sf.tacos.components54716142133113
net.sf.tacos.resolvers2151425571532
net.sf.tacos.binding71913018121026
net.sf.tacos.components.dojo.old6321213880810
net.sf.tacos.components.scriptaculous31895197205
net.sf.tacos.components.timeline2207542100
net.sf.tacos.components.dojo.form114721442130
net.sf.tacos.util1346214150
net.sf.tacos.model.impl2950215010
net.sf.tacos.services3233226120021
net.sf.tacos.asset152014016
net.sf.tacos.model4619104900
net.sf.tacos.components.ajax206212290
Classes totalMethods totalNCSS totalJavadocsJavadoc linesSingle lines commentMulti lines comment
5139118283291326191190

Objects

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

TOP 30 classes containing the most NCSS.

ObjectNCSSMethodsClassesJavadocs
net.sf.tacos.services.impl.SiteMapImpl18023023
net.sf.tacos.components.tree.Tree14135133
net.sf.tacos.components.dojo.DojoWidget11121022
net.sf.tacos.resolvers.ClasspathComponentSpecResolver911104
net.sf.tacos.components.tree.TreeHelper64601
net.sf.tacos.util.JSONMarkupWriter573401
net.sf.tacos.components.dojo.form.HtmlArea5414014
net.sf.tacos.components.dojo.old.FloatingPane4810011
net.sf.tacos.components.SiteMapComponent4520015
net.sf.tacos.binding.TemplateBinding43506
net.sf.tacos.components.timeline.TimelineEvent431303
net.sf.tacos.components.tree.TreeManager4110011
net.sf.tacos.components.dojo.DropTarget3813013
net.sf.tacos.components.tree.TreeIterator379010
net.sf.tacos.services.impl.CategoryInfoImpl3710011
net.sf.tacos.services.impl.PageInfoImpl3710011
net.sf.tacos.model.impl.BeanWithChildrenTreeContentProvider29701
net.sf.tacos.components.scriptaculous.Droppable289010
net.sf.tacos.resolvers.ClasspathSpecResolverDelegate24401
net.sf.tacos.components.dojo.old.TitlePane22506
net.sf.tacos.components.ClientLink21809
net.sf.tacos.components.EventListener2111010
net.sf.tacos.components.timeline.Timeline20701
net.sf.tacos.components.FieldHint18506
net.sf.tacos.components.scriptaculous.Glider17403
net.sf.tacos.binding.AbsoluteAssetBinding16301
net.sf.tacos.components.dojo.GenericWidget15402
net.sf.tacos.asset.AbsoluteAsset14501
net.sf.tacos.components.scriptaculous.Draggable14506
net.sf.tacos.components.dojo.old.IDojoFloatingPane1110011

TOP 30 classes containing the most methods.

ObjectNCSSMethodsClassesJavadocs
net.sf.tacos.components.tree.Tree14135133
net.sf.tacos.util.JSONMarkupWriter573401
net.sf.tacos.services.impl.SiteMapImpl18023023
net.sf.tacos.components.dojo.DojoWidget11121022
net.sf.tacos.components.SiteMapComponent4520015
net.sf.tacos.components.dojo.form.HtmlArea5414014
net.sf.tacos.components.dojo.DropTarget3813013
net.sf.tacos.components.timeline.TimelineEvent431303
net.sf.tacos.components.EventListener2111010
net.sf.tacos.resolvers.ClasspathComponentSpecResolver911104
net.sf.tacos.components.dojo.old.FloatingPane4810011
net.sf.tacos.components.dojo.old.IDojoFloatingPane1110011
net.sf.tacos.components.tree.TreeManager4110011
net.sf.tacos.services.impl.CategoryInfoImpl3710011
net.sf.tacos.services.impl.PageInfoImpl3710011
net.sf.tacos.services.SiteMap1110011
net.sf.tacos.components.scriptaculous.Droppable289010
net.sf.tacos.components.tree.TreeIterator379010
net.sf.tacos.components.ClientLink21809
net.sf.tacos.services.PageInfo9809
net.sf.tacos.components.timeline.Timeline20701
net.sf.tacos.components.tree.ITreeManager8708
net.sf.tacos.model.impl.BeanWithChildrenTreeContentProvider29701
net.sf.tacos.components.tree.TreeHelper64601
net.sf.tacos.asset.AbsoluteAsset14501
net.sf.tacos.binding.TemplateBinding43506
net.sf.tacos.components.dojo.old.TitlePane22506
net.sf.tacos.components.FieldHint18506
net.sf.tacos.components.scriptaculous.Draggable14506
net.sf.tacos.services.CategoryInfo6506

Averages.

NCSS averageProgram NCSSClasses averageMethods averageJavadocs average
28.201,828.000.027.676.45

Methods

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

TOP 30 Methods containing the most NCSS.

MethodsNCSSCCNJavadocs
net.sf.tacos.components.dojo.DojoWidget.renderWidget(IMarkupWriter,IRequestCycle)3761
net.sf.tacos.components.tree.TreeHelper.normalRenderComponent(IMarkupWriter,IRequestCycle,int,boolean)3290
net.sf.tacos.components.dojo.form.HtmlArea.renderFormWidget(IMarkupWriter,IRequestCycle)2841
net.sf.tacos.components.dojo.old.FloatingPane.renderComponent(IMarkupWriter,IRequestCycle)2631
net.sf.tacos.services.impl.SiteMapImpl.getCategoryInfo(String)2591
net.sf.tacos.components.tree.Tree.beforeRenderBody(IMarkupWriter,IRequestCycle,Serializable,boolean)24121
net.sf.tacos.resolvers.ClasspathComponentSpecResolver.searchForComponent(IRequestCycle)22120
net.sf.tacos.resolvers.ClasspathComponentSpecResolver.searchForComponentClass(INamespace,String)2050
net.sf.tacos.components.dojo.DropTarget.renderWidget(IMarkupWriter,IRequestCycle)1831
net.sf.tacos.services.impl.SiteMapImpl.getPageInfoImpl(String,String)17111
net.sf.tacos.components.dojo.old.TitlePane.renderComponent(IMarkupWriter,IRequestCycle)1611
net.sf.tacos.components.tree.TreeHelper.renderComponent(IMarkupWriter,IRequestCycle)1680
net.sf.tacos.components.tree.Tree.renderComponent(IMarkupWriter,IRequestCycle)1571
net.sf.tacos.resolvers.ClasspathComponentSpecResolver.resolve(IRequestCycle,INamespace,String,String,Location)1561
net.sf.tacos.components.tree.Tree.renderDynamicLoad(IMarkupWriter,IRequestCycle)1420
net.sf.tacos.components.tree.TreeIterator.next()1441
net.sf.tacos.binding.TemplateBinding.getObject()1331
net.sf.tacos.components.FieldHint.renderComponent(IMarkupWriter,IRequestCycle)1321
net.sf.tacos.components.scriptaculous.Droppable.renderComponent(IMarkupWriter,IRequestCycle)1321
net.sf.tacos.binding.TemplateBinding.buildingVariableBindings()1231
net.sf.tacos.components.dojo.old.FloatingPane.getTaskBarId()1281
net.sf.tacos.components.scriptaculous.Glider.renderComponent(IMarkupWriter,IRequestCycle)1211
net.sf.tacos.components.tree.Tree.getPartWriter(Serializable)1281
net.sf.tacos.resolvers.ClasspathSpecResolverDelegate.findPageSpecification(IRequestCycle,INamespace,String)1260
net.sf.tacos.services.impl.SiteMapImpl.initialize()1271
net.sf.tacos.services.impl.SiteMapImpl.parsePageNode(Element)1261
net.sf.tacos.services.impl.SiteMapImpl.containsImpl(String,PageInfo)1171
net.sf.tacos.services.impl.SiteMapImpl.parsePageNodes(Node,PageInfo)1121
net.sf.tacos.util.JSONMarkupWriter.attribute(String,String)1140
net.sf.tacos.components.dojo.GenericWidget.renderComponent(IMarkupWriter,IRequestCycle)10100

Averages.

Program NCSSNCSS averageCCN averageJavadocs average
1,828.003.381.650.71

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