Fork me on GitHub

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
com.eyeq.pivot4j.pentaho.ui 5 43 384 36 147 7 0
com.eyeq.pivot4j.pentaho.servlet 8 75 333 70 295 0 0
com.eyeq.pivot4j.pentaho.repository 2 24 150 23 85 0 0
com.eyeq.pivot4j.pentaho.datasource 3 17 142 17 55 0 0
com.eyeq.pivot4j.pentaho.content 3 5 62 5 19 0 8
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
21 164 1071 151 601 7 8

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
com.eyeq.pivot4j.pentaho.ui.MigrationHandler 228 25 3 27
com.eyeq.pivot4j.pentaho.servlet.PluginServletContext 95 31 0 29
com.eyeq.pivot4j.pentaho.repository.PentahoReportRepository 94 15 0 14
com.eyeq.pivot4j.pentaho.ui.PentahoFileHandler 89 10 0 9
com.eyeq.pivot4j.pentaho.datasource.PentahoDataSourceManager 81 11 0 11
com.eyeq.pivot4j.pentaho.servlet.PluginServletSession 73 19 2 20
com.eyeq.pivot4j.pentaho.servlet.PluginServletRequest 46 10 0 8
com.eyeq.pivot4j.pentaho.servlet.FacesDispatcherServlet 40 7 0 7
com.eyeq.pivot4j.pentaho.repository.PentahoReportFile 25 9 0 9
com.eyeq.pivot4j.pentaho.content.ConverterRegistrationHelper 22 1 0 1
com.eyeq.pivot4j.pentaho.datasource.MdxOlap4JDataSource 17 4 0 4
com.eyeq.pivot4j.pentaho.content.ReportContentGenerator 15 3 0 3
com.eyeq.pivot4j.pentaho.ui.MigrationHandler.Entry 14 4 0 4
com.eyeq.pivot4j.pentaho.servlet.PluginServletConfig 13 5 0 5
com.eyeq.pivot4j.pentaho.servlet.PluginServletSession.InvocationHandlerImpl 12 2 0 1
com.eyeq.pivot4j.pentaho.ui.MigrationHandler.InvalidConnectionInfoException 11 3 0 3
com.eyeq.pivot4j.pentaho.datasource.PentahoDataSourceDefinition 9 2 0 2
com.eyeq.pivot4j.pentaho.ui.MigrationHandler.MigrationTargetFilter 7 1 0 1
com.eyeq.pivot4j.pentaho.servlet.PluginResourceResolver 4 1 0 1
com.eyeq.pivot4j.pentaho.content.ReportContentEditor 4 1 0 1
com.eyeq.pivot4j.pentaho.servlet.PluginServletSession.PentahoSessionProxy 1 0 0 0

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
com.eyeq.pivot4j.pentaho.servlet.PluginServletContext 95 31 0 29
com.eyeq.pivot4j.pentaho.ui.MigrationHandler 228 25 3 27
com.eyeq.pivot4j.pentaho.servlet.PluginServletSession 73 19 2 20
com.eyeq.pivot4j.pentaho.repository.PentahoReportRepository 94 15 0 14
com.eyeq.pivot4j.pentaho.datasource.PentahoDataSourceManager 81 11 0 11
com.eyeq.pivot4j.pentaho.ui.PentahoFileHandler 89 10 0 9
com.eyeq.pivot4j.pentaho.servlet.PluginServletRequest 46 10 0 8
com.eyeq.pivot4j.pentaho.repository.PentahoReportFile 25 9 0 9
com.eyeq.pivot4j.pentaho.servlet.FacesDispatcherServlet 40 7 0 7
com.eyeq.pivot4j.pentaho.servlet.PluginServletConfig 13 5 0 5
com.eyeq.pivot4j.pentaho.ui.MigrationHandler.Entry 14 4 0 4
com.eyeq.pivot4j.pentaho.datasource.MdxOlap4JDataSource 17 4 0 4
com.eyeq.pivot4j.pentaho.ui.MigrationHandler.InvalidConnectionInfoException 11 3 0 3
com.eyeq.pivot4j.pentaho.content.ReportContentGenerator 15 3 0 3
com.eyeq.pivot4j.pentaho.datasource.PentahoDataSourceDefinition 9 2 0 2
com.eyeq.pivot4j.pentaho.servlet.PluginServletSession.InvocationHandlerImpl 12 2 0 1
com.eyeq.pivot4j.pentaho.ui.MigrationHandler.MigrationTargetFilter 7 1 0 1
com.eyeq.pivot4j.pentaho.servlet.PluginResourceResolver 4 1 0 1
com.eyeq.pivot4j.pentaho.content.ReportContentEditor 4 1 0 1
com.eyeq.pivot4j.pentaho.content.ConverterRegistrationHelper 22 1 0 1
com.eyeq.pivot4j.pentaho.servlet.PluginServletSession.PentahoSessionProxy 1 0 0 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
42.86 1,071.00 0.24 7.81 7.62

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
com.eyeq.pivot4j.pentaho.ui.MigrationHandler.convertFile(HierarchicalConfiguration) 41 9 1
com.eyeq.pivot4j.pentaho.datasource.PentahoDataSourceManager.createDataSource(PentahoDataSourceDefinition) 34 8 1
com.eyeq.pivot4j.pentaho.ui.MigrationHandler.proceed() 26 6 0
com.eyeq.pivot4j.pentaho.ui.MigrationHandler.open(ReportFile,boolean) 24 2 1
com.eyeq.pivot4j.pentaho.ui.PentahoFileHandler.save(String,String,String,boolean) 22 3 1
com.eyeq.pivot4j.pentaho.content.ConverterRegistrationHelper.initialize() 21 8 0
com.eyeq.pivot4j.pentaho.ui.MigrationHandler.convertFiles(ReportFile) 20 6 1
com.eyeq.pivot4j.pentaho.ui.PentahoFileHandler.load() 19 4 0
com.eyeq.pivot4j.pentaho.ui.PentahoFileHandler.load(String,RepositoryFile) 17 3 1
com.eyeq.pivot4j.pentaho.repository.PentahoReportRepository.getFile(String) 17 7 1
com.eyeq.pivot4j.pentaho.ui.PentahoFileHandler.save() 15 4 1
com.eyeq.pivot4j.pentaho.ui.MigrationHandler.convertFile(ReportFile) 12 3 1
com.eyeq.pivot4j.pentaho.ui.MigrationHandler.getRootNode() 12 4 1
com.eyeq.pivot4j.pentaho.servlet.FacesDispatcherServlet.init(ServletConfig) 12 2 1
com.eyeq.pivot4j.pentaho.datasource.PentahoDataSourceManager.getCubes(String) 11 6 1
com.eyeq.pivot4j.pentaho.repository.PentahoReportRepository.setReportContent(ReportFile,ReportContent) 11 5 1
com.eyeq.pivot4j.pentaho.servlet.PluginServletContext.getInitParameterNames() 10 5 1
com.eyeq.pivot4j.pentaho.servlet.PluginServletSession.PluginServletSession(PluginServletContext,HttpSession) 10 3 1
com.eyeq.pivot4j.pentaho.servlet.PluginServletSession.setAttribute(String,Object) 10 3 1
com.eyeq.pivot4j.pentaho.repository.PentahoReportRepository.createFile(ReportFile,String,ReportContent,boolean) 10 7 1
com.eyeq.pivot4j.pentaho.ui.MigrationHandler.getSummary() 9 3 0
com.eyeq.pivot4j.pentaho.servlet.PluginServletRequest.setAttribute(String,Object) 9 3 1
com.eyeq.pivot4j.pentaho.servlet.FacesDispatcherServlet.service(ServletRequest,ServletResponse) 9 1 1
com.eyeq.pivot4j.pentaho.repository.PentahoReportRepository.getFiles(ReportFile) 9 5 1
com.eyeq.pivot4j.pentaho.datasource.PentahoDataSourceManager.getDefinition(ConnectionInfo) 8 3 1
com.eyeq.pivot4j.pentaho.servlet.PluginServletContext.getResourceAsStream(String) 8 4 1
com.eyeq.pivot4j.pentaho.servlet.PluginServletContext.setAttribute(String,Object) 8 3 1
com.eyeq.pivot4j.pentaho.servlet.PluginServletSession.InvocationHandlerImpl.invoke(Object,Method,Object[]) 8 3 1
com.eyeq.pivot4j.pentaho.repository.PentahoReportRepository.createDirectory(ReportFile,String) 8 5 1
com.eyeq.pivot4j.pentaho.repository.PentahoReportRepository.renameFile(ReportFile,String) 8 5 1

Averages.

Program NCSS NCSS average CCN average Javadocs average
1,071.00 4.77 1.79 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).