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
pl.edu.agh.cast.data.model.property 17 116 641 124 885 50 360
pl.edu.agh.cast.data.model 16 153 577 162 1247 56 261
pl.edu.agh.cast.data.model.general 16 138 565 150 1362 70 277
pl.edu.agh.cast.data.model.presentation 8 71 306 74 540 23 155
pl.edu.agh.cast.data.model.visual 7 61 267 64 505 28 114
pl.edu.agh.cast.data.model.property.validator 11 41 188 49 306 18 180
pl.edu.agh.cast.data.model.util 7 46 164 47 300 6 86
pl.edu.agh.cast.data.converter 7 32 161 30 216 2 112
pl.edu.agh.cast.data.model.domain 4 32 100 30 233 12 79
pl.edu.agh.cast.data.model.copier 5 16 68 21 147 1 80
pl.edu.agh.cast.data.model.common 2 12 54 0 0 9 166
pl.edu.agh.cast.data.model.general.sample 1 3 50 3 14 0 19
pl.edu.agh.cast.data.model.property.annotation 1 4 45 5 28 0 93
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
102 725 3186 759 5783 275 1982

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
pl.edu.agh.cast.data.model.AbstractDataSet 201 51 0 52
pl.edu.agh.cast.data.model.general.ManyToManyRelation 133 32 0 31
pl.edu.agh.cast.data.model.property.PropertyContainer 112 19 0 18
pl.edu.agh.cast.data.model.general.Entity 100 25 0 24
pl.edu.agh.cast.data.model.property.PropertyHelper 91 6 1 8
pl.edu.agh.cast.data.model.AbstractElement 88 23 0 23
pl.edu.agh.cast.data.model.presentation.PresentationElement 87 22 0 22
pl.edu.agh.cast.data.model.property.MetaPropertyManager 86 14 0 15
pl.edu.agh.cast.data.model.presentation.PresentationDataSet 83 23 0 22
pl.edu.agh.cast.data.model.general.GeneralDataSet 82 11 0 12
pl.edu.agh.cast.data.model.visual.VisualDataSet 80 24 0 22
pl.edu.agh.cast.data.model.visual.VisualElement 76 14 0 14
pl.edu.agh.cast.data.model.Type 60 11 1 11
pl.edu.agh.cast.data.model.DataSetDescriptor 58 16 0 13
pl.edu.agh.cast.data.model.util.ReferenceList 52 15 0 16
pl.edu.agh.cast.data.model.property.Property 47 8 0 9
pl.edu.agh.cast.data.model.property.MetaProperty 45 12 0 13
pl.edu.agh.cast.data.converter.ConverterSpecification 45 9 0 8
pl.edu.agh.cast.data.model.general.TimedManyToManyRelation 44 12 0 13
pl.edu.agh.cast.data.model.property.MetaPermanentProperty 37 9 0 10
pl.edu.agh.cast.data.model.general.OneToOneRelation 35 13 0 14
pl.edu.agh.cast.data.model.general.sample.SampleGeneralDataSet 34 3 0 3
pl.edu.agh.cast.data.model.IDataSet 32 25 1 27
pl.edu.agh.cast.data.model.domain.DomainDataSetDescriptor 32 11 0 6
pl.edu.agh.cast.data.model.util.Reference 32 9 0 10
pl.edu.agh.cast.data.model.util.ReferenceUtil 31 7 2 14
pl.edu.agh.cast.data.model.presentation.PresentationPropertyDescriptor 30 5 0 4
pl.edu.agh.cast.data.model.general.TimedOneToOneRelation 30 12 0 13
pl.edu.agh.cast.data.model.domain.DomainDataSet 30 14 0 15
pl.edu.agh.cast.data.model.property.validator.TextArrayPropertyValidator 28 4 0 5

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
pl.edu.agh.cast.data.model.AbstractDataSet 201 51 0 52
pl.edu.agh.cast.data.model.general.ManyToManyRelation 133 32 0 31
pl.edu.agh.cast.data.model.IDataSet 32 25 1 27
pl.edu.agh.cast.data.model.general.Entity 100 25 0 24
pl.edu.agh.cast.data.model.visual.VisualDataSet 80 24 0 22
pl.edu.agh.cast.data.model.presentation.PresentationDataSet 83 23 0 22
pl.edu.agh.cast.data.model.AbstractElement 88 23 0 23
pl.edu.agh.cast.data.model.presentation.PresentationElement 87 22 0 22
pl.edu.agh.cast.data.model.property.PropertyContainer 112 19 0 18
pl.edu.agh.cast.data.model.DataSetDescriptor 58 16 0 13
pl.edu.agh.cast.data.model.util.ReferenceList 52 15 0 16
pl.edu.agh.cast.data.model.property.MetaPropertyManager 86 14 0 15
pl.edu.agh.cast.data.model.visual.VisualElement 76 14 0 14
pl.edu.agh.cast.data.model.domain.DomainDataSet 30 14 0 15
pl.edu.agh.cast.data.model.general.OneToOneRelation 35 13 0 14
pl.edu.agh.cast.data.model.property.MetaProperty 45 12 0 13
pl.edu.agh.cast.data.model.general.TimedManyToManyRelation 44 12 0 13
pl.edu.agh.cast.data.model.general.IManyToManyRelation 18 12 1 14
pl.edu.agh.cast.data.model.general.TimedOneToOneRelation 30 12 0 13
pl.edu.agh.cast.data.model.general.GeneralDataSet 82 11 0 12
pl.edu.agh.cast.data.model.visual.IVisualDataSet 16 11 1 13
pl.edu.agh.cast.data.model.domain.DomainDataSetDescriptor 32 11 0 6
pl.edu.agh.cast.data.model.Type 60 11 1 11
pl.edu.agh.cast.data.model.property.IPropertyContainer 11 10 0 11
pl.edu.agh.cast.data.model.presentation.IPresentationElement 23 10 2 12
pl.edu.agh.cast.data.model.general.IEntity 16 10 1 12
pl.edu.agh.cast.data.model.property.MetaPermanentProperty 37 9 0 10
pl.edu.agh.cast.data.model.util.Reference 32 9 0 10
pl.edu.agh.cast.data.converter.ConverterSpecification 45 9 0 8
pl.edu.agh.cast.data.model.property.Property 47 8 0 9

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
26.40 3,186.00 0.15 7.11 7.49

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
pl.edu.agh.cast.data.model.property.PropertyHelper.extractMetaPermanentProperties(Identifiable) 45 23 1
pl.edu.agh.cast.data.model.AbstractDataSet.addElement(T) 31 21 1
pl.edu.agh.cast.data.model.general.GeneralDataSet.isElementValid(T) 29 16 1
pl.edu.agh.cast.data.model.general.sample.SampleGeneralDataSet.initializeElements() 27 1 0
pl.edu.agh.cast.data.model.visual.VisualElement.getPropertiesMarkedAsLabel() 27 10 1
pl.edu.agh.cast.data.model.general.GeneralDataSet.beforeRemoveElement(T) 23 13 1
pl.edu.agh.cast.data.model.property.Property.equals(Object) 19 13 1
pl.edu.agh.cast.data.model.property.PropertyHelper.extractMetaTransientProperties(Identifiable) 19 9 1
pl.edu.agh.cast.data.model.property.MetaPropertyManager.removeMetaProperty(String) 17 8 1
pl.edu.agh.cast.data.model.property.MetaPropertyManager.getCommonProperties(MetaPropertyManager) 15 5 1
pl.edu.agh.cast.data.model.property.PropertyContainer.update(Observable,Object) 15 10 1
pl.edu.agh.cast.data.model.AbstractElement.setDataSet(IElement) 15 10 1
pl.edu.agh.cast.data.model.property.validator.TextArrayPropertyValidator.convertToStringFormat(Object) 14 7 1
pl.edu.agh.cast.data.model.property.MetaPropertyManager.registerMetaProperty(MetaProperty) 14 6 1
pl.edu.agh.cast.data.model.property.Property.hashCode() 13 4 1
pl.edu.agh.cast.data.model.property.PropertyContainer.createProperty(MetaProperty) 13 6 0
pl.edu.agh.cast.data.model.property.MetaPermanentProperty.MetaPermanentProperty(String,String,PropertyType,boolean,Method,Method,boolean) 12 9 1
pl.edu.agh.cast.data.model.property.validator.ReferenceListPropertyValidator.convertToStringFormat(Object) 12 7 1
pl.edu.agh.cast.data.model.general.GeneralDataSet.afterAddElement(T) 12 6 1
pl.edu.agh.cast.data.model.Type.parseTypeName(String,Identifiable) 12 9 1
pl.edu.agh.cast.data.model.property.MetaProperty.MetaProperty(String,String,PropertyType,boolean,boolean) 11 5 1
pl.edu.agh.cast.data.model.presentation.PresentationElement.setOriginalElements(T) 11 4 1
pl.edu.agh.cast.data.model.presentation.PresentationPropertyDescriptor.equals(Object) 11 9 1
pl.edu.agh.cast.data.model.AbstractDataSet.removeElement(E) 11 5 1
pl.edu.agh.cast.data.model.general.TimedManyToManyRelation.TimedManyToManyRelation(Type,UUID,IEntity,IEntity,boolean,Date,Date) 11 6 1
pl.edu.agh.cast.data.model.property.PropertyContainer.addProperty(MetaProperty) 10 7 1
pl.edu.agh.cast.data.model.property.PropertyContainer.getProperty(String) 10 5 1
pl.edu.agh.cast.data.model.presentation.PresentationDataSet.setOriginalDataSets(IElement) 10 5 1
pl.edu.agh.cast.data.model.general.ManyToManyRelation.getDescString() 10 4 1
pl.edu.agh.cast.data.model.visual.VisualElement.getVisualLabel() 10 3 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
3,186.00 3.25 1.94 0.91

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