Fractal | Fractal ADL | Cecilia Examples | Minus
 

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.objectweb.fractal.task.core.composition 14 74 755 30 187 136 344
org.objectweb.fractal.task.core.control 11 44 395 14 109 80 258
org.objectweb.fractal.task.core.primitive 2 5 278 1 8 19 25
org.objectweb.fractal.task.core 8 35 261 25 164 15 191
org.objectweb.fractal.task.core.internal 5 28 215 12 52 23 209
org.objectweb.fractal.task.core.composition.ast 15 59 116 14 43 0 335
org.objectweb.fractal.task.core.composition.function 5 6 108 6 45 6 110
org.objectweb.fractal.task.core.primitive.annotations 1 1 59 1 4 0 229
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
61 252 2187 103 612 279 1701

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.objectweb.fractal.task.core.composition.Interpreter 356 17 2 0
org.objectweb.fractal.task.core.primitive.BasicPrimitiveTaskFactory 242 4 3 0
org.objectweb.fractal.task.core.control.TaskContainerBindingControllerMixin 188 12 0 5
org.objectweb.fractal.task.core.Record 164 13 6 5
org.objectweb.fractal.task.core.composition.FunctionLoader 64 9 0 0
org.objectweb.fractal.task.core.internal.TaskBootstrapFactory 58 6 1 4
org.objectweb.fractal.task.core.composition.VariableLoader 54 9 0 1
org.objectweb.fractal.task.core.internal.TaskUtil 53 8 1 1
org.objectweb.fractal.task.core.composition.TaskCompositionFileLoader 51 7 0 1
org.objectweb.fractal.task.core.control.BasicExportedInterfaceMixin 42 9 0 2
org.objectweb.fractal.task.core.internal.BasicTaskFactory 33 7 0 1
org.objectweb.fractal.task.core.composition.function.Same 31 2 0 2
org.objectweb.fractal.task.core.AbstractTaskFactoryUser 31 6 0 3
org.objectweb.fractal.task.core.composition.AbstractTaskCompositionLoader 26 4 0 1
org.objectweb.fractal.task.core.composition.FunctionExecutionException 24 7 0 5
org.objectweb.fractal.task.core.control.ContainerExecutionControllerMixin 22 5 0 0
org.objectweb.fractal.task.core.composition.InvalidParameterTypeException 22 6 0 3
org.objectweb.fractal.task.core.control.DebugBindingControllerMixin 19 3 0 0
org.objectweb.fractal.task.core.control.ExportedInterfaceBindingMixin 19 3 0 1
org.objectweb.fractal.task.core.TaskException 18 6 0 5
org.objectweb.fractal.task.core.composition.ast.DecorationHelper 17 4 0 1
org.objectweb.fractal.task.core.composition.function.Or 14 1 0 1
org.objectweb.fractal.task.core.composition.function.And 14 1 0 1
org.objectweb.fractal.task.core.composition.InvalidNumberOfParameterException 14 3 0 3
org.objectweb.fractal.task.core.composition.NullParameterException 14 4 0 3
org.objectweb.fractal.task.core.InvalidRecordDescriptorException 14 5 0 5
org.objectweb.fractal.task.core.composition.ast.Pattern 12 7 0 1
org.objectweb.fractal.task.core.control.ExecutionInterceptorCodeGenerator 11 5 0 0
org.objectweb.fractal.task.core.composition.function.Not 11 1 0 1
org.objectweb.fractal.task.core.composition.function.Equals 11 1 0 1

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.objectweb.fractal.task.core.composition.Interpreter 356 17 2 0
org.objectweb.fractal.task.core.Record 164 13 6 5
org.objectweb.fractal.task.core.control.TaskContainerBindingControllerMixin 188 12 0 5
org.objectweb.fractal.task.core.control.BasicExportedInterfaceMixin 42 9 0 2
org.objectweb.fractal.task.core.composition.VariableLoader 54 9 0 1
org.objectweb.fractal.task.core.composition.FunctionLoader 64 9 0 0
org.objectweb.fractal.task.core.composition.ast.Task 9 8 0 1
org.objectweb.fractal.task.core.internal.TaskUtil 53 8 1 1
org.objectweb.fractal.task.core.composition.ast.Pattern 12 7 0 1
org.objectweb.fractal.task.core.composition.TaskCompositionFileLoader 51 7 0 1
org.objectweb.fractal.task.core.composition.FunctionExecutionException 24 7 0 5
org.objectweb.fractal.task.core.internal.BasicTaskFactory 33 7 0 1
org.objectweb.fractal.task.core.composition.ast.ValueContainer 7 6 0 1
org.objectweb.fractal.task.core.composition.InvalidParameterTypeException 22 6 0 3
org.objectweb.fractal.task.core.internal.TaskBootstrapFactory 58 6 1 4
org.objectweb.fractal.task.core.TaskException 18 6 0 5
org.objectweb.fractal.task.core.AbstractTaskFactoryUser 31 6 0 3
org.objectweb.fractal.task.core.control.ContainerExecutionControllerMixin 22 5 0 0
org.objectweb.fractal.task.core.control.ExecutionInterceptorCodeGenerator 11 5 0 0
org.objectweb.fractal.task.core.composition.ast.FunctionCall 6 5 0 1
org.objectweb.fractal.task.core.InvalidRecordDescriptorException 14 5 0 5
org.objectweb.fractal.task.core.composition.ast.Export 5 4 0 1
org.objectweb.fractal.task.core.composition.ast.Instruction 5 4 0 1
org.objectweb.fractal.task.core.composition.ast.DecorationHelper 17 4 0 1
org.objectweb.fractal.task.core.composition.ast.Constant 6 4 1 1
org.objectweb.fractal.task.core.composition.ast.Binding 5 4 0 1
org.objectweb.fractal.task.core.composition.ast.Import 5 4 0 1
org.objectweb.fractal.task.core.composition.AbstractTaskCompositionLoader 26 4 0 1
org.objectweb.fractal.task.core.composition.NullParameterException 14 4 0 3
org.objectweb.fractal.task.core.primitive.BasicPrimitiveTaskFactory 242 4 3 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
29.13 2,187.00 0.23 4.13 1.69

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.objectweb.fractal.task.core.control.TaskContainerBindingControllerMixin.initFcController(InitializationContext) 76 49 1
org.objectweb.fractal.task.core.Record.parseRecordDesc(Record,String,boolean,ArgumentList) 59 22 0
org.objectweb.fractal.task.core.composition.Interpreter.CompositeTask.createComponent(String,boolean) 55 23 0
org.objectweb.fractal.task.core.composition.Interpreter.evaluateExport(CompositeTask,Map,Export,Collection,Collection,boolean) 49 18 0
org.objectweb.fractal.task.core.primitive.BasicPrimitiveTaskFactory.TaskTemplate.instantiate(Object,Object) 41 18 0
org.objectweb.fractal.task.core.internal.TaskBootstrapFactory.newFcInstance(Map) 40 8 0
org.objectweb.fractal.task.core.composition.Interpreter.createCompositeComponent(TaskDefinition,String,Collection,Object) 39 13 0
org.objectweb.fractal.task.core.primitive.BasicPrimitiveTaskFactory.TaskTemplate.processClientInterfaceAnnotation(Class,String[]) 39 24 0
org.objectweb.fractal.task.core.composition.Interpreter.evaluateBinding(CompositeTask,Map,Binding,Collection,Collection,boolean) 35 11 0
org.objectweb.fractal.task.core.control.TaskContainerBindingControllerMixin.bindFc(InterfaceType,String,Object) 28 18 0
org.objectweb.fractal.task.core.control.TaskContainerBindingControllerMixin.unbindFc(InterfaceType,String) 27 18 0
org.objectweb.fractal.task.core.control.TaskContainerBindingControllerMixin.lookupFc(InterfaceType,String) 25 18 0
org.objectweb.fractal.task.core.composition.function.Same.same(Object,Object) 24 20 1
org.objectweb.fractal.task.core.internal.TaskBootstrapFactory.Julia$1.createBootstrap(Map) 22 9 0
org.objectweb.fractal.task.core.composition.Interpreter.patternMatcher(TaskInterface,Pattern,Map[],Map) 21 14 0
org.objectweb.fractal.task.core.primitive.BasicPrimitiveTaskFactory.ItfForEachTemplate.instantiate(List,Map,Object[]) 21 8 0
org.objectweb.fractal.task.core.composition.Interpreter.evaluateValue(ValueContainer,Map[]) 20 12 0
org.objectweb.fractal.task.core.primitive.BasicPrimitiveTaskFactory.TaskTemplate.TaskTemplate(Class) 19 4 0
org.objectweb.fractal.task.core.primitive.BasicPrimitiveTaskFactory.TaskTemplate.checkClassHierarchy(Class) 19 13 0
org.objectweb.fractal.task.core.primitive.BasicPrimitiveTaskFactory.ItfForEachTemplate.ItfForEachTemplate(ClientInterfaceForEach,String[],boolean,boolean) 18 3 0
org.objectweb.fractal.task.core.internal.TaskUtil.newTask(Object,boolean,TaskInterfaceDesc) 17 7 0
org.objectweb.fractal.task.core.control.TaskContainerBindingControllerMixin.listFc() 16 13 0
org.objectweb.fractal.task.core.control.ExportedInterfaceBindingMixin.bindFc(InterfaceType,String,Object) 15 9 0
org.objectweb.fractal.task.core.Record.instantiateTemplate(Object) 14 6 0
org.objectweb.fractal.task.core.composition.function.Or.invoke(Object) 13 10 0
org.objectweb.fractal.task.core.composition.function.And.invoke(Object) 13 10 0
org.objectweb.fractal.task.core.composition.Interpreter.prepare(Collection,Collection,Collection) 13 6 0
org.objectweb.fractal.task.core.composition.Interpreter.CompositeTask.addExportedInterface(Node,Record,TaskInterface) 13 5 0
org.objectweb.fractal.task.core.composition.FunctionLoader.loadFunctions(TaskDefinition,Map) 13 5 0
org.objectweb.fractal.task.core.Record.toString() 12 3 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
2,187.00 5.65 3.07 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).

 
2007-2009 © ObjectWeb Consortium  | Last Published: 2009-04-21 13:39  | Version: 2.1.0