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.

Package Classes Methods NCSS Javadocs Javadoc lines Single lines comment Multi lines comment
org.apache.myfaces.tobago.renderkit.html 4 90 470 60 182 2 75
org.apache.myfaces.tobago.component 2 88 374 78 236 26 84
org.apache.myfaces.tobago.internal.lifecycle 10 36 371 14 104 26 186
org.apache.myfaces.tobago.context 5 65 221 24 74 2 93
org.apache.myfaces.tobago 1 1 217 1 10 4 228
org.apache.myfaces.tobago.event 4 25 143 6 18 3 72
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag 71 0 142 71 213 0 1278
org.apache.myfaces.tobago.internal.taglib 1 21 130 21 63 0 18
org.apache.myfaces.tobago.renderkit 2 20 129 2 6 3 36
org.apache.myfaces.tobago.util 4 20 121 8 29 2 73
org.apache.myfaces.tobago.renderkit.html.standard.standard.tag 1 4 116 1 1 9 18
org.apache.myfaces.tobago.renderkit.html.util 1 8 101 1 3 3 18
org.apache.myfaces.tobago.compat 3 26 100 27 85 4 57
org.apache.myfaces.tobago.renderkit.util 1 5 47 5 20 1 18
org.apache.myfaces.tobago.internal.util 1 8 46 0 0 0 18
org.apache.myfaces.tobago.internal.application 1 9 43 1 5 3 24
org.apache.myfaces.tobago.ajax.api 1 15 39 15 45 0 21
org.apache.myfaces.tobago.application 1 6 38 1 3 0 18
org.apache.myfaces.tobago.bean 1 4 38 1 3 2 18
org.apache.myfaces.tobago.config 1 3 13 2 6 0 18
org.apache.myfaces.tobago.model 2 3 11 2 6 0 36
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
118 457 2910 341 1112 90 2407

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.apache.myfaces.tobago.TobagoConstants 216 1 0 1
org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil 214 56 0 54
org.apache.myfaces.tobago.component.ComponentUtil 185 76 0 77
org.apache.myfaces.tobago.renderkit.html.StyleClasses 135 30 1 4
org.apache.myfaces.tobago.component.UIViewRoot 131 12 0 1
org.apache.myfaces.tobago.internal.lifecycle.RestoreViewExecutor 108 7 0 2
org.apache.myfaces.tobago.internal.taglib.TagUtils 105 21 0 21
org.apache.myfaces.tobago.renderkit.html.standard.standard.tag.RichTextEditorRenderer 88 4 0 1
org.apache.myfaces.tobago.renderkit.html.util.CommandRendererHelper 85 8 1 1
org.apache.myfaces.tobago.internal.lifecycle.TobagoLifecycle 81 9 0 1
org.apache.myfaces.tobago.context.TobagoFacesContext 68 20 0 1
org.apache.myfaces.tobago.context.ResourceManagerUtil 55 16 0 16
org.apache.myfaces.tobago.renderkit.TobagoResponseStateManager 55 4 0 1
org.apache.myfaces.tobago.compat.FacesUtils 52 22 0 22
org.apache.myfaces.tobago.renderkit.RenderUtil 52 16 0 1
org.apache.myfaces.tobago.renderkit.util.JQueryUtils 46 5 0 5
org.apache.myfaces.tobago.context.FacesContextWrapper 44 21 0 1
org.apache.myfaces.tobago.event.ValueBindingTabChangeListener 43 9 0 1
org.apache.myfaces.tobago.util.MessageFactory 42 8 0 1
org.apache.myfaces.tobago.renderkit.html.HtmlConstants 41 1 0 1
org.apache.myfaces.tobago.internal.lifecycle.PhaseListenerManager 39 4 0 2
org.apache.myfaces.tobago.internal.util.AccessKeyMap 39 8 0 0
org.apache.myfaces.tobago.bean.ResourceMap 32 4 0 1
org.apache.myfaces.tobago.internal.application.ViewHandlerImpl 32 9 0 1
org.apache.myfaces.tobago.ajax.api.AjaxUtils 31 15 0 15
org.apache.myfaces.tobago.application.LabelValueBindingFacesMessage 31 6 0 1
org.apache.myfaces.tobago.event.ValueBindingResetInputActionListener 31 7 0 2
org.apache.myfaces.tobago.renderkit.html.HtmlStyleMap 31 3 0 1
org.apache.myfaces.tobago.util.StringUtils 28 4 0 2
org.apache.myfaces.tobago.event.ValueBindingPopupActionListener 24 7 0 2

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.apache.myfaces.tobago.component.ComponentUtil 185 76 0 77
org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil 214 56 0 54
org.apache.myfaces.tobago.renderkit.html.StyleClasses 135 30 1 4
org.apache.myfaces.tobago.compat.FacesUtils 52 22 0 22
org.apache.myfaces.tobago.context.FacesContextWrapper 44 21 0 1
org.apache.myfaces.tobago.internal.taglib.TagUtils 105 21 0 21
org.apache.myfaces.tobago.context.TobagoFacesContext 68 20 0 1
org.apache.myfaces.tobago.context.ResourceManagerUtil 55 16 0 16
org.apache.myfaces.tobago.renderkit.RenderUtil 52 16 0 1
org.apache.myfaces.tobago.ajax.api.AjaxUtils 31 15 0 15
org.apache.myfaces.tobago.component.UIViewRoot 131 12 0 1
org.apache.myfaces.tobago.event.ValueBindingTabChangeListener 43 9 0 1
org.apache.myfaces.tobago.internal.application.ViewHandlerImpl 32 9 0 1
org.apache.myfaces.tobago.internal.lifecycle.TobagoLifecycle 81 9 0 1
org.apache.myfaces.tobago.internal.util.AccessKeyMap 39 8 0 0
org.apache.myfaces.tobago.renderkit.html.util.CommandRendererHelper 85 8 1 1
org.apache.myfaces.tobago.util.MessageFactory 42 8 0 1
org.apache.myfaces.tobago.event.ValueBindingPopupActionListener 24 7 0 2
org.apache.myfaces.tobago.event.ValueBindingResetInputActionListener 31 7 0 2
org.apache.myfaces.tobago.internal.lifecycle.RestoreViewExecutor 108 7 0 2
org.apache.myfaces.tobago.application.LabelValueBindingFacesMessage 31 6 0 1
org.apache.myfaces.tobago.context.ResourceManagerFactory 11 5 0 5
org.apache.myfaces.tobago.renderkit.util.JQueryUtils 46 5 0 5
org.apache.myfaces.tobago.bean.ResourceMap 32 4 0 1
org.apache.myfaces.tobago.internal.lifecycle.PhaseListenerManager 39 4 0 2
org.apache.myfaces.tobago.internal.lifecycle.TobagoLifecycleFactory 21 4 0 1
org.apache.myfaces.tobago.renderkit.TobagoResponseStateManager 55 4 0 1
org.apache.myfaces.tobago.renderkit.html.standard.standard.tag.RichTextEditorRenderer 88 4 0 1
org.apache.myfaces.tobago.util.StringUtil 14 4 0 1
org.apache.myfaces.tobago.util.StringUtils 28 4 0 2

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
20.33 2,910.00 0.02 3.87 2.89

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.apache.myfaces.tobago.internal.lifecycle.RestoreViewExecutor.execute(FacesContext) 51 21 0
org.apache.myfaces.tobago.renderkit.html.util.CommandRendererHelper.CommandRendererHelper(FacesContext,AbstractUICommandBase,Tag) 49 19 0
org.apache.myfaces.tobago.renderkit.html.standard.standard.tag.RichTextEditorRenderer.encodeEnd(FacesContext,UIComponent) 42 6 0
org.apache.myfaces.tobago.renderkit.TobagoResponseStateManager.writeState(FacesContext,StateManager.SerializedView) 35 7 0
org.apache.myfaces.tobago.renderkit.util.JQueryUtils.escapeSelector(String) 34 25 1
org.apache.myfaces.tobago.component.UIViewRoot.broadcastForPhase(PhaseId) 31 14 0
org.apache.myfaces.tobago.renderkit.html.standard.standard.tag.RichTextEditorRenderer.createToolbar(FacesContext,UIIn) 27 1 0
org.apache.myfaces.tobago.internal.lifecycle.RestoreViewExecutor.deriveViewId(FacesContext) 22 8 0
org.apache.myfaces.tobago.component.UIViewRoot.processDecodes(FacesContext) 18 7 0
org.apache.myfaces.tobago.component.UIViewRoot.decodeActionComponent(FacesContext,AbstractUIPage,UIComponent) 18 12 0
org.apache.myfaces.tobago.internal.lifecycle.TobagoLifecycle.executePhase(FacesContext,PhaseExecutor,PhaseListenerManager) 18 11 0
org.apache.myfaces.tobago.internal.lifecycle.RestoreViewExecutor.recursivelyHandleComponentReferencesAndSetValid(FacesContext,UIComponent) 16 8 0
org.apache.myfaces.tobago.event.ValueBindingResetInputActionListener.processAction(ActionEvent) 15 6 0
org.apache.myfaces.tobago.internal.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseId) 15 6 0
org.apache.myfaces.tobago.internal.lifecycle.RenderResponseExecutor.execute(FacesContext) 15 5 0
org.apache.myfaces.tobago.internal.lifecycle.TobagoLifecycle.render(FacesContext) 15 7 0
org.apache.myfaces.tobago.renderkit.html.StyleClasses.updateClassAttribute(UIComponent,String) 15 7 0
org.apache.myfaces.tobago.compat.FacesInvokeOnComponent12.invokeOnComponent(FacesContext,UIComponent,String,ContextCallback) 14 10 1
org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil.getRenderedPartiallyJavascriptArray(FacesContext,UICommand) 14 5 1
org.apache.myfaces.tobago.bean.ResourceMap.setFilename(String) 13 6 0
org.apache.myfaces.tobago.component.UIViewRoot.processValidators(FacesContext) 13 7 0
org.apache.myfaces.tobago.internal.taglib.TagUtils.setStringArrayProperty(UIComponent,String,String) 13 6 1
org.apache.myfaces.tobago.renderkit.html.HtmlStyleMap.toString() 13 6 0
org.apache.myfaces.tobago.component.UIViewRoot.processUpdates(FacesContext) 12 7 0
org.apache.myfaces.tobago.renderkit.html.StyleClasses.addMarkupClass(SupportsMarkup,String,String) 12 5 0
org.apache.myfaces.tobago.util.MessageFactory.createFacesMessage(FacesContext,String,String,FacesMessage.Severity,Object[]) 12 6 0
org.apache.myfaces.tobago.util.StringUtils.firstToUpperCase(String) 12 8 1
org.apache.myfaces.tobago.context.TobagoFacesContext.TobagoFacesContext(FacesContext) 11 1 0
org.apache.myfaces.tobago.event.ValueBindingTabChangeListener.getTabChangeListener() 11 8 0
org.apache.myfaces.tobago.internal.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseId) 11 7 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
2,910.00 4.22 1.97 0.49

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