Parent Project
Foundation

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.

Package Classes Methods NCSS Javadocs Javadoc lines Single lines comment Multi lines comment
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag 16 59 423 0 0 22 335
org.apache.myfaces.tobago.taglib.sandbox 10 42 343 2 6 12 226
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag 7 10 189 0 0 20 140
org.apache.myfaces.tobago.model 4 47 150 25 130 12 64
org.apache.myfaces.tobago.renderkit.html.sandbox.standard.tag 1 8 148 0 0 8 16
org.apache.myfaces.tobago.component 2 22 119 0 0 3 32
org.apache.myfaces.tobago.application 2 3 80 0 0 14 36
org.apache.myfaces.tobago.util 1 17 39 0 0 0 16
org.apache.myfaces.tobago.event 1 8 25 0 0 0 16
org.apache.myfaces.tobago.facelets.sandbox 1 2 21 0 0 0 16
org.apache.myfaces.tobago.facelets 1 2 11 1 4 1 16
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag 1 0 3 0 0 0 16
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
47 220 1551 28 140 92 929

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.apache.myfaces.tobago.renderkit.html.sandbox.standard.tag.InputNumberSliderRenderer 127 8 0 0
org.apache.myfaces.tobago.component.UIWizard 97 19 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.Layout 79 29 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.GridLayoutRenderer 72 6 0 0
org.apache.myfaces.tobago.model.Wizard 62 15 0 1
org.apache.myfaces.tobago.taglib.sandbox.WizardTrainTag 61 4 0 0
org.apache.myfaces.tobago.taglib.sandbox.WizardExtensionTag 53 7 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.PageRenderer 49 4 0 0
org.apache.myfaces.tobago.model.AbstractCrud 42 16 0 15
org.apache.myfaces.tobago.util.CommonsLoggingLogger 36 17 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.FoUtils 32 8 0 0
org.apache.myfaces.tobago.application.FoViewHandlerImpl 31 2 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.BoxRenderer 31 3 0 0
org.apache.myfaces.tobago.model.WizardStep 28 8 0 1
org.apache.myfaces.tobago.taglib.sandbox.WizardCancelTag 28 5 0 0
org.apache.myfaces.tobago.taglib.sandbox.WizardNextTag 27 5 0 0
org.apache.myfaces.tobago.taglib.sandbox.WizardFinishTag 27 5 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.InRenderer 26 2 0 0
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.SelectOneChoiceRenderer 25 1 0 0
org.apache.myfaces.tobago.application.FopConverter 22 1 0 0
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.ButtonRenderer 22 1 0 0
org.apache.myfaces.tobago.taglib.sandbox.WizardPreviousTag 22 4 0 0
org.apache.myfaces.tobago.event.FacesEventWrapper 20 8 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.TextAreaRenderer 18 2 0 0
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.InRenderer 18 1 0 0
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.PageRenderer 17 1 0 0
org.apache.myfaces.tobago.taglib.sandbox.RichTextEditorTag 16 5 0 1
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.SelectBooleanCheckboxRenderer 15 1 0 0
org.apache.myfaces.tobago.facelets.sandbox.WizardComponentHandler 13 2 0 0
org.apache.myfaces.tobago.facelets.TobagoSandboxTagLibrary 9 2 0 1

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.Layout 79 29 0 0
org.apache.myfaces.tobago.component.UIWizard 97 19 0 0
org.apache.myfaces.tobago.util.CommonsLoggingLogger 36 17 0 0
org.apache.myfaces.tobago.model.AbstractCrud 42 16 0 15
org.apache.myfaces.tobago.model.Wizard 62 15 0 1
org.apache.myfaces.tobago.model.Crud 9 8 0 8
org.apache.myfaces.tobago.model.WizardStep 28 8 0 1
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.FoUtils 32 8 0 0
org.apache.myfaces.tobago.renderkit.html.sandbox.standard.tag.InputNumberSliderRenderer 127 8 0 0
org.apache.myfaces.tobago.event.FacesEventWrapper 20 8 0 0
org.apache.myfaces.tobago.taglib.sandbox.WizardExtensionTag 53 7 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.GridLayoutRenderer 72 6 0 0
org.apache.myfaces.tobago.taglib.sandbox.RichTextEditorTag 16 5 0 1
org.apache.myfaces.tobago.taglib.sandbox.WizardTagDeclaration 6 5 0 0
org.apache.myfaces.tobago.taglib.sandbox.WizardNextTag 27 5 0 0
org.apache.myfaces.tobago.taglib.sandbox.WizardCancelTag 28 5 0 0
org.apache.myfaces.tobago.taglib.sandbox.WizardFinishTag 27 5 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.PageRenderer 49 4 0 0
org.apache.myfaces.tobago.taglib.sandbox.WizardPreviousTag 22 4 0 0
org.apache.myfaces.tobago.taglib.sandbox.WizardTrainTag 61 4 0 0
org.apache.myfaces.tobago.component.AbstractUIInputNumberSlider 8 3 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.BoxRenderer 31 3 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.PanelRenderer 7 3 0 0
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.PanelRenderer 9 3 0 0
org.apache.myfaces.tobago.application.FoViewHandlerImpl 31 2 0 0
org.apache.myfaces.tobago.facelets.sandbox.WizardComponentHandler 13 2 0 0
org.apache.myfaces.tobago.facelets.TobagoSandboxTagLibrary 9 2 0 1
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.InRenderer 26 2 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.TextAreaRenderer 18 2 0 0
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.BoxRenderer 3 2 0 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
25.43 1,551.00 0.00 4.68 0.60

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.apache.myfaces.tobago.renderkit.html.sandbox.standard.tag.InputNumberSliderRenderer.encodeEnd(FacesContext,UIComponent) 86 8 0
org.apache.myfaces.tobago.taglib.sandbox.WizardTrainTag.doStartTag() 49 3 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.GridLayoutRenderer.layoutEnd(FacesContext,UIComponent) 33 10 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.PageRenderer.encodeBegin(FacesContext,UIComponent) 29 1 0
org.apache.myfaces.tobago.application.FoViewHandlerImpl.renderView(FacesContext,UIViewRoot) 27 8 0
org.apache.myfaces.tobago.taglib.sandbox.WizardExtensionTag.doStartTag() 27 1 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.BoxRenderer.encodeBegin(FacesContext,UIComponent) 25 1 0
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.SelectOneChoiceRenderer.encodeEnd(FacesContext,UIComponent) 24 4 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.InRenderer.encodeEnd(FacesContext,UIComponent) 22 8 0
org.apache.myfaces.tobago.application.FopConverter.fo2Pdf(ServletResponse,String) 20 5 0
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.ButtonRenderer.encodeEnd(FacesContext,UIComponent) 20 4 0
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.InRenderer.encodeEnd(FacesContext,UIComponent) 17 4 0
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.PageRenderer.encodeEnd(FacesContext,UIComponent) 15 1 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.TextAreaRenderer.encodeEnd(FacesContext,UIComponent) 14 5 0
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.SelectBooleanCheckboxRenderer.encodeEnd(FacesContext,UIComponent) 14 3 0
org.apache.myfaces.tobago.taglib.sandbox.WizardCancelTag.doStartTag() 13 2 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.GridLayoutRenderer.encodeBegin(FacesContext,UIComponent) 12 7 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.GridLayoutRenderer.encodeEnd(FacesContext,UIComponent) 12 7 0
org.apache.myfaces.tobago.taglib.sandbox.WizardNextTag.doStartTag() 12 2 0
org.apache.myfaces.tobago.taglib.sandbox.WizardFinishTag.doStartTag() 12 2 0
org.apache.myfaces.tobago.component.UIWizard.broadcast(FacesEvent) 11 4 0
org.apache.myfaces.tobago.renderkit.html.sandbox.standard.tag.InputNumberSliderRenderer.decode(FacesContext,UIComponent) 11 5 0
org.apache.myfaces.tobago.taglib.sandbox.WizardPreviousTag.doStartTag() 11 2 0
org.apache.myfaces.tobago.model.Wizard.register() 10 5 0
org.apache.myfaces.tobago.model.WizardStep.toString() 10 1 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.GridLayoutRenderer.encodeSuppe(FacesContext,UIComponent) 10 3 0
org.apache.myfaces.tobago.component.UIWizard.isAllowJumpForward() 9 6 0
org.apache.myfaces.tobago.renderkit.html.sandbox.standard.tag.InputNumberSliderRenderer.writeSliderJavaScript(FacesContext,UIComponent,TobagoResponseWriter) 9 1 0
org.apache.myfaces.tobago.component.UIWizard.getController() 8 5 0
org.apache.myfaces.tobago.facelets.sandbox.WizardComponentHandler.onComponentCreated(FaceletContext,UIComponent,UIComponent) 8 3 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,551.00 4.89 1.55 0.11

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

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