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 15 54 340 0 0 17 306
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag 7 10 190 0 0 20 136
org.apache.myfaces.tobago.renderkit.html.sandbox.standard.tag 1 8 151 0 0 9 16
org.apache.myfaces.tobago.application 2 3 80 0 0 14 36
org.apache.myfaces.tobago.model 2 24 53 23 123 9 32
org.apache.myfaces.tobago.taglib.sandbox 3 7 41 2 6 3 93
org.apache.myfaces.tobago.util 1 17 39 0 0 0 16
org.apache.myfaces.tobago.component 1 5 15 0 0 0 16
org.apache.myfaces.tobago.facelets 1 2 10 1 3 2 16
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
33 130 919 26 132 74 667

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.NumberSliderRenderer 129 8 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.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.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.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.component.AbstractUINumberSlider 10 5 0 0
org.apache.myfaces.tobago.model.Crud 9 8 0 8
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.PanelRenderer 9 3 0 0
org.apache.myfaces.tobago.facelets.TobagoSandboxTagLibrary 8 2 0 1
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.OutRenderer 8 1 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.PanelRenderer 7 3 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.LabelRenderer 6 1 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.GridLayoutRenderer 4 1 0 0
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.BoxRenderer 3 2 0 0
org.apache.myfaces.tobago.taglib.sandbox.NumberSliderTagDeclaration 3 2 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.FoRendererBase 2 0 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.MessagesRenderer 2 0 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.ButtonRenderer 1 0 0 0

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.util.CommonsLoggingLogger 36 17 0 0
org.apache.myfaces.tobago.model.AbstractCrud 42 16 0 15
org.apache.myfaces.tobago.model.Crud 9 8 0 8
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.FoUtils 32 8 0 0
org.apache.myfaces.tobago.renderkit.html.sandbox.standard.tag.NumberSliderRenderer 129 8 0 0
org.apache.myfaces.tobago.component.AbstractUINumberSlider 10 5 0 0
org.apache.myfaces.tobago.taglib.sandbox.RichTextEditorTag 16 5 0 1
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.PageRenderer 49 4 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.TobagoSandboxTagLibrary 8 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
org.apache.myfaces.tobago.taglib.sandbox.NumberSliderTagDeclaration 3 2 0 0
org.apache.myfaces.tobago.application.FopConverter 22 1 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.GridLayoutRenderer 4 1 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.LabelRenderer 6 1 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.OutRenderer 8 1 0 0
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.ButtonRenderer 22 1 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.renderkit.wml.standard.standard.tag.SelectBooleanCheckboxRenderer 15 1 0 0
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.SelectOneChoiceRenderer 25 1 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.ButtonRenderer 1 0 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.FoRendererBase 2 0 0 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.ImageRenderer 1 0 0 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
20.70 919.00 0.00 3.94 0.79

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.NumberSliderRenderer.encodeEnd(FacesContext,UIComponent) 88 6 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.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.renderkit.html.sandbox.standard.tag.NumberSliderRenderer.decode(FacesContext,UIComponent) 11 5 0
org.apache.myfaces.tobago.renderkit.html.sandbox.standard.tag.NumberSliderRenderer.writeSliderJavaScript(FacesContext,UIComponent,TobagoResponseWriter) 9 1 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.Layout.addMargin(int,int,int,int) 7 3 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.OutRenderer.encodeEnd(FacesContext,UIComponent) 7 2 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.FoUtils.layoutBlockContainer(ResponseWriter,int,int,int,int) 6 1 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.PageRenderer.encodeEnd(FacesContext,UIComponent) 6 1 0
org.apache.myfaces.tobago.component.AbstractUINumberSlider.validate(FacesContext) 5 2 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.FoUtils.writeStartTextBlock(ResponseWriter,UIComponent) 5 1 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.LabelRenderer.encodeEnd(FacesContext,UIComponent) 5 2 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.Layout.Layout(int,int,int,int) 5 1 0
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.Layout.append(StringBuilder) 5 2 0
org.apache.myfaces.tobago.renderkit.html.sandbox.standard.tag.NumberSliderRenderer.prepareRender(FacesContext,UIComponent) 5 2 0
org.apache.myfaces.tobago.renderkit.html.sandbox.standard.tag.NumberSliderRenderer.getAbsoluteImagePath(FacesContext,String) 5 1 0
org.apache.myfaces.tobago.renderkit.wml.standard.standard.tag.PanelRenderer.encodeChildren(FacesContext,UIComponent) 5 2 0
org.apache.myfaces.tobago.model.AbstractCrud.showItem() 4 1 1
org.apache.myfaces.tobago.model.AbstractCrud.editItem() 4 1 1
org.apache.myfaces.tobago.model.AbstractCrud.createItem() 4 1 1
org.apache.myfaces.tobago.renderkit.fo.standard.standard.tag.FoUtils.writeBorder(ResponseWriter,int) 4 1 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
919.00 4.73 1.39 0.18

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