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
gboat2.approve.service.impl 2 21 370 4 22 2 8
gboat2.approve.model 6 74 237 4 63 2 38
gboat2.approve.business.impl 2 13 125 2 14 0 8
gboat2.approve.service 5 23 59 18 109 0 29
gboat2.approve.utils 1 2 38 1 6 0 4
gboat2.approve.business 2 13 25 9 52 0 8
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
18 146 854 38 266 4 95

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
gboat2.approve.service.impl.ApproveServiceImpl 309 11 0 2
gboat2.approve.model.ApproveRecordHistory 76 30 0 1
gboat2.approve.business.impl.ApproveRecordBusinessImpl 56 8 0 1
gboat2.approve.model.ApproveRecordItem 56 22 0 1
gboat2.approve.business.impl.ApproveRecordHistoryBusinessImpl 44 5 0 1
gboat2.approve.model.ApproveRecord 36 14 0 1
gboat2.approve.utils.ApproveSealUtil 31 2 0 1
gboat2.approve.service.impl.ApproveRecordServiceImpl 23 10 0 2
gboat2.approve.service.ApproveException 16 7 0 8
gboat2.approve.service.IApproveRecordService 11 10 0 1
gboat2.approve.service.BaseApproveConstant 10 0 0 1
gboat2.approve.business.IApproveRecordBusiness 9 8 0 7
gboat2.approve.model.ApproveStatus 7 3 0 0
gboat2.approve.model.RecordStatus 7 3 0 0
gboat2.approve.business.IApproveRecordHistoryBusiness 6 5 0 2
gboat2.approve.model.ApproveRecordItemVO 6 2 0 1
gboat2.approve.service.IApproveService 6 5 0 6
gboat2.approve.service.ICallbackHandler 2 1 0 2

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
gboat2.approve.model.ApproveRecordHistory 76 30 0 1
gboat2.approve.model.ApproveRecordItem 56 22 0 1
gboat2.approve.model.ApproveRecord 36 14 0 1
gboat2.approve.service.impl.ApproveServiceImpl 309 11 0 2
gboat2.approve.service.IApproveRecordService 11 10 0 1
gboat2.approve.service.impl.ApproveRecordServiceImpl 23 10 0 2
gboat2.approve.business.IApproveRecordBusiness 9 8 0 7
gboat2.approve.business.impl.ApproveRecordBusinessImpl 56 8 0 1
gboat2.approve.service.ApproveException 16 7 0 8
gboat2.approve.business.IApproveRecordHistoryBusiness 6 5 0 2
gboat2.approve.business.impl.ApproveRecordHistoryBusinessImpl 44 5 0 1
gboat2.approve.service.IApproveService 6 5 0 6
gboat2.approve.model.ApproveStatus 7 3 0 0
gboat2.approve.model.RecordStatus 7 3 0 0
gboat2.approve.model.ApproveRecordItemVO 6 2 0 1
gboat2.approve.utils.ApproveSealUtil 31 2 0 1
gboat2.approve.service.ICallbackHandler 2 1 0 2
gboat2.approve.service.BaseApproveConstant 10 0 0 1

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
39.50 854.00 0.00 8.11 2.11

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
gboat2.approve.service.impl.ApproveServiceImpl.startApprove(String,Object,String,Object) 67 19 1
gboat2.approve.service.impl.ApproveServiceImpl.doNext(String,String,Object) 49 13 0
gboat2.approve.service.impl.ApproveServiceImpl.createApproveItemsForAssigners(String[],Object,ApproveRecord) 29 8 0
gboat2.approve.service.impl.ApproveServiceImpl.complete(String,String,Object) 26 7 0
gboat2.approve.service.impl.ApproveServiceImpl.returnback(String,String,Object,UserSession,ICallbackHandler) 24 8 0
gboat2.approve.business.impl.ApproveRecordHistoryBusinessImpl.recordHistory(String,String) 21 3 0
gboat2.approve.service.impl.ApproveServiceImpl.saveSubmitHistory(UserSession,String,Object,Object) 20 5 0
gboat2.approve.service.impl.ApproveServiceImpl.callback(String,String,Object,UserSession,ICallbackHandler) 19 8 0
gboat2.approve.service.impl.ApproveServiceImpl.saveReturnBackHistory(UserSession,ApproveRecordItem,ApproveRecord) 19 3 0
gboat2.approve.service.impl.ApproveServiceImpl.saveApproveHistory(UserSession,ApproveRecordItem,ApproveRecord) 19 3 0
gboat2.approve.service.impl.ApproveServiceImpl.saveCallbackHistory(UserSession,String,Object) 18 4 0
gboat2.approve.utils.ApproveSealUtil.approveSeal2Str(String[]) 17 6 1
gboat2.approve.business.impl.ApproveRecordBusinessImpl.getApproveRecordItem(String,String[]) 15 8 0
gboat2.approve.service.impl.ApproveServiceImpl.getUuid(Object) 14 6 0
gboat2.approve.utils.ApproveSealUtil.clob2String(Clob) 13 5 0
gboat2.approve.business.impl.ApproveRecordBusinessImpl.getApproveRecordItem(String,String) 9 3 0
gboat2.approve.business.impl.ApproveRecordBusinessImpl.getApproveRecordItemListByRecordId(String) 9 3 0
gboat2.approve.business.impl.ApproveRecordHistoryBusinessImpl.isApproveHistoryExist(String) 9 3 0
gboat2.approve.business.impl.ApproveRecordBusinessImpl.getApproveStatusOfRecord(String) 7 3 0
gboat2.approve.business.impl.ApproveRecordBusinessImpl.getApproveRecordByRecordObject(String) 6 4 0
gboat2.approve.business.impl.ApproveRecordHistoryBusinessImpl.getAllApproveRecordHistory(String) 6 1 0
gboat2.approve.business.impl.ApproveRecordBusinessImpl.getApproveRecord(String,String) 3 1 0
gboat2.approve.business.impl.ApproveRecordBusinessImpl.getApproveRecord(String) 3 1 0
gboat2.approve.business.impl.ApproveRecordBusinessImpl.getApproveRecordItem(String) 3 1 0
gboat2.approve.business.impl.ApproveRecordHistoryBusinessImpl.recordHistory(String) 3 1 0
gboat2.approve.business.impl.ApproveRecordHistoryBusinessImpl.getApproveRecordHistory(String) 3 1 0
gboat2.approve.model.ApproveRecord.getRecordId() 2 1 0
gboat2.approve.model.ApproveRecord.setRecordId(String) 2 1 0
gboat2.approve.model.ApproveRecord.getRecordObjectType() 2 1 0
gboat2.approve.model.ApproveRecord.setRecordObjectType(String) 2 1 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
854.00 4.40 1.70 0.16

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