[ packages] [ objects] [ functions] [ explanations]
The following document contains the results of a JavaNCSSmetric analysis.
[ packages] [ objects] [ functions] [ explanations]
Package | Classes | Functions | NCSS | Javadocs | Javadoc Lines | Single Comment Lines | Multi Comment Lines |
---|---|---|---|---|---|---|---|
jtge.engine.io | 33 | 103 | 488 | 133 | 642 | 4 | 960 |
jtge.engine.net | 17 | 48 | 295 | 62 | 302 | 4 | 493 |
jtge.engine.security | 16 | 40 | 265 | 54 | 276 | 4 | 464 |
jtge.util.grid.directiongroup | 11 | 54 | 252 | 63 | 264 | 0 | 329 |
jtge.util.grid | 8 | 52 | 200 | 56 | 271 | 4 | 235 |
jtge.util.grid.direction | 10 | 33 | 152 | 43 | 194 | 1 | 314 |
jtge.util.grid.builder | 4 | 25 | 131 | 25 | 116 | 1 | 145 |
jtge.engine.command | 10 | 26 | 108 | 35 | 173 | 1 | 290 |
jtge.engine.data | 6 | 24 | 96 | 26 | 137 | 0 | 174 |
jtge.engine.handler | 8 | 18 | 88 | 25 | 132 | 0 | 232 |
jtge.util.random | 4 | 17 | 82 | 20 | 127 | 6 | 128 |
jtge.util | 2 | 10 | 55 | 10 | 60 | 0 | 58 |
jtge.util.grid.torus | 5 | 8 | 44 | 13 | 64 | 0 | 157 |
jtge.engine.user | 3 | 4 | 20 | 7 | 39 | 0 | 87 |
Classes total | Functions total | NCSS total | Javadocs | Javadoc Lines | Single Comment Lines | Multi Comment Lines |
---|---|---|---|---|---|---|
137 | 462 | 2276 | 572 | 2797 | 25 | 4066 |
[ packages] [ objects] [ functions] [ explanations]
Object | NCSS | Functions | Classes | Javadocs |
---|---|---|---|---|
jtge.util.grid.Grid | 65 | 13 | 0 | 14 |
jtge.util.grid.directiongroup.AbstractFlatHexagonDirectionGroup | 49 | 10 | 0 | 11 |
jtge.util.grid.directiongroup.AbstractPeakHexagonDirectionGroup | 49 | 10 | 0 | 11 |
jtge.engine.io.ChannelManager | 48 | 10 | 0 | 8 |
jtge.engine.command.Flow | 45 | 10 | 0 | 10 |
jtge.util.EasyMockTestCase | 44 | 9 | 0 | 8 |
jtge.util.random.Dice | 43 | 6 | 0 | 6 |
jtge.engine.data.Context | 42 | 8 | 0 | 5 |
jtge.engine.security.UserChannelManager | 40 | 8 | 0 | 7 |
jtge.engine.net.NetworkAcceptor | 38 | 4 | 0 | 4 |
jtge.util.grid.builder.AbstractHexagonBuilder | 38 | 8 | 0 | 7 |
jtge.util.grid.builder.FlatHexagonBuilder | 33 | 6 | 0 | 6 |
jtge.util.grid.builder.PeakHexagonBuilder | 33 | 6 | 0 | 6 |
jtge.util.grid.LinearTileIterator | 33 | 7 | 0 | 6 |
jtge.engine.io.XStreamInput | 32 | 4 | 0 | 5 |
jtge.util.grid.Coordinate | 30 | 10 | 0 | 11 |
jtge.util.grid.direction.Direction | 28 | 6 | 0 | 7 |
jtge.engine.io.Input | 27 | 4 | 0 | 5 |
jtge.engine.io.ObjectInput | 27 | 4 | 0 | 5 |
jtge.engine.io.XStreamOutput | 26 | 4 | 0 | 5 |
jtge.engine.net.Peer | 26 | 7 | 0 | 8 |
jtge.engine.security.LoginHandler | 26 | 4 | 0 | 5 |
jtge.engine.security.LoginObserver | 26 | 4 | 0 | 5 |
jtge.engine.io.ObjectOutput | 25 | 4 | 0 | 5 |
jtge.engine.net.NetworkConnector | 25 | 2 | 0 | 3 |
jtge.util.grid.LinearIterator | 25 | 6 | 0 | 6 |
jtge.engine.io.SessionManager | 23 | 6 | 0 | 7 |
jtge.engine.net.Server | 23 | 6 | 0 | 6 |
jtge.engine.security.UserInputOutputFactory | 23 | 3 | 0 | 4 |
jtge.engine.io.FileInputConnector | 20 | 2 | 0 | 3 |
Object | NCSS | Functions | Classes | Javadocs |
---|---|---|---|---|
jtge.util.grid.Grid | 65 | 13 | 0 | 14 |
jtge.util.grid.directiongroup.IDirectionGroup | 12 | 11 | 0 | 10 |
jtge.util.grid.IGrid | 12 | 11 | 0 | 12 |
jtge.engine.command.Flow | 45 | 10 | 0 | 10 |
jtge.engine.io.ChannelManager | 48 | 10 | 0 | 8 |
jtge.util.grid.Coordinate | 30 | 10 | 0 | 11 |
jtge.util.grid.directiongroup.AbstractFlatHexagonDirectionGroup | 49 | 10 | 0 | 11 |
jtge.util.grid.directiongroup.AbstractPeakHexagonDirectionGroup | 49 | 10 | 0 | 11 |
jtge.util.EasyMockTestCase | 44 | 9 | 0 | 8 |
jtge.engine.data.Context | 42 | 8 | 0 | 5 |
jtge.engine.security.UserChannelManager | 40 | 8 | 0 | 7 |
jtge.util.grid.builder.AbstractHexagonBuilder | 38 | 8 | 0 | 7 |
jtge.engine.net.Peer | 26 | 7 | 0 | 8 |
jtge.util.grid.LinearTileIterator | 33 | 7 | 0 | 6 |
jtge.engine.data.AbstractContext | 14 | 6 | 0 | 7 |
jtge.engine.io.SessionManager | 23 | 6 | 0 | 7 |
jtge.engine.net.Server | 23 | 6 | 0 | 6 |
jtge.util.grid.builder.FlatHexagonBuilder | 33 | 6 | 0 | 6 |
jtge.util.grid.builder.PeakHexagonBuilder | 33 | 6 | 0 | 6 |
jtge.util.grid.direction.Direction | 28 | 6 | 0 | 7 |
jtge.util.grid.LinearIterator | 25 | 6 | 0 | 6 |
jtge.util.random.Dice | 43 | 6 | 0 | 6 |
jtge.engine.io.AsynchronousInput | 16 | 5 | 0 | 6 |
jtge.engine.io.OutputRegistrer | 12 | 5 | 0 | 6 |
jtge.util.grid.builder.IHexagonBuilder | 6 | 5 | 0 | 6 |
jtge.util.grid.directiongroup.AbstractDirectionGroup | 20 | 5 | 0 | 6 |
jtge.util.grid.directiongroup.EightDirectionGroup | 18 | 5 | 0 | 6 |
jtge.util.grid.directiongroup.FourDirectionGroup | 14 | 5 | 0 | 6 |
jtge.util.random.Random | 14 | 5 | 0 | 6 |
jtge.engine.command.ICommand | 5 | 4 | 0 | 5 |
NCSS average | Program NCSS | Classes average | Functions average | Javadocs average |
---|---|---|---|---|
13.28 | 2,276.00 | 0.00 | 3.37 | 4.18 |
[ packages] [ objects] [ functions] [ explanations]
Function | NCSS | CCN | Javadoc |
---|---|---|---|
jtge.util.grid.builder.FlatHexagonBuilder.buildHexagon(Coordinate) | 16 | 1 | 1 |
jtge.util.grid.builder.PeakHexagonBuilder.buildHexagon(Coordinate) | 16 | 1 | 1 |
jtge.engine.io.XStreamInput.read() | 14 | 11 | 1 |
jtge.engine.security.LoginHandler.LoginHandler(IInput,IUserManager,IUserHandlerFactory) | 14 | 7 | 1 |
jtge.util.grid.Grid.Grid(int,int,IDirectionGroup,ITorus) | 14 | 9 | 1 |
jtge.engine.net.NetworkConnector.NetworkConnector(IInputOutputFactory,IConnectionObserver,String,int) | 13 | 9 | 1 |
jtge.engine.net.NetworkAcceptor.open() | 12 | 6 | 1 |
jtge.util.EasyMockTestCase.runBare() | 12 | 2 | 1 |
jtge.util.random.Dice.Dice(String) | 12 | 4 | 1 |
jtge.engine.net.NetworkAcceptor.NetworkAcceptor(IInputOutputFactory,IConnectionObserver,int) | 11 | 7 | 1 |
jtge.engine.security.UserInputOutputFactory.UserInputOutputFactory(IConsumer,IDisconnectionObserver,IUserManager,IInputOutputImpFactory) | 11 | 7 | 1 |
jtge.engine.io.FileInputConnector.FileInputConnector(IInputOutputFactory,IConnectionObserver,String) | 10 | 7 | 1 |
jtge.engine.io.FileOutputConnector.FileOutputConnector(IInputOutputFactory,IConnectionObserver,String) | 10 | 7 | 1 |
jtge.engine.io.Input.read() | 10 | 5 | 1 |
jtge.engine.io.InputOutputFactory.InputOutputFactory(IConsumer,IDisconnectionObserver,IInputOutputImpFactory) | 10 | 7 | 1 |
jtge.engine.net.UserInputOutputFactoryFactory.UserInputOutputFactoryFactory(IConsumer,IInputOutputImpFactory,IUserManager) | 10 | 7 | 1 |
jtge.util.random.Dice.toString() | 10 | 3 | 1 |
jtge.engine.data.Context.invokeOnCallback(Object,Class,Object) | 9 | 7 | 0 |
jtge.engine.io.ObjectInput.read() | 9 | 7 | 1 |
jtge.util.grid.directiongroup.EightDirectionGroup.EightDirectionGroup() | 9 | 1 | 1 |
jtge.engine.command.Flow.filter(IFilter) | 8 | 4 | 1 |
jtge.engine.data.Context.put(Object,Object) | 8 | 4 | 1 |
jtge.engine.io.ChannelManager.opened(IInput,IOutput) | 8 | 5 | 1 |
jtge.engine.io.Input.Input(IConsumer,IDisconnectionObserver,IInputImp) | 8 | 5 | 1 |
jtge.engine.io.XStreamOutput.write(ICommand) | 8 | 5 | 1 |
jtge.engine.net.Peer.Peer(IPeerFactory) | 8 | 1 | 1 |
jtge.engine.security.UserChannelManager.disconnected(IInput,IOutput) | 8 | 3 | 1 |
jtge.util.grid.directiongroup.AbstractFlatHexagonDirectionGroup.transform(Coordinate,NorthEast) | 8 | 5 | 1 |
jtge.util.grid.directiongroup.AbstractFlatHexagonDirectionGroup.transform(Coordinate,NorthWest) | 8 | 5 | 1 |
jtge.util.grid.directiongroup.AbstractFlatHexagonDirectionGroup.transform(Coordinate,SouthEast) | 8 | 5 | 1 |
Program NCSS: | NCSS average | CCN average | Javadocs average |
---|---|---|---|
2,276.00 | 3.31 | 1.80 | 0.94 |
[ packages] [ objects] [ functions] [ explanations]
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.
Actually, the NCSS counter gets incremented by one for each:
Examples | Comment | |
---|---|---|
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; | No matter how many fields get actually declared through a comma separated list, and no matter if these fields get actually initialized, only one statement is counted. So "int a, b, c = 5, d = 6;" gets only +1 count, not four or even six (let me know if there is good reason to count it differently). |
Method declaration | - public void cry();
- public void gib() throws DeadException { | |
Constructor declaration | public Foo() { | |
Constructor invocation | - this();
- super(); | |
Statement | - i = 0;
- if (ok) - if (exit) { - if (3 == 4); - if (4 == 4) { ; } - } else { | expression, if, else, while, do, for, switch, break, continue, return, throw, synchronized, catch, finally |
Label | fine : | normal, case, default |
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.
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.
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:
An ordinary return at the end of method (no matter if it's a function or a procedure) will not be counted.
Note that else, default, and finallydon't increment the CCN value any further. On the other hand, a simple method with a switchstatement and a huge block of casestatements can have a surprisingly high CCN value (still it has the same value when converting a switchblock to an equivalent sequence of ifstatements).
The first article about this trivial software metric is one of the most cited papers in computer science. Sometimes you just must be the first to point out some basic shit and you are history. It seems just like a wonder that nobody was able to package Lines of Code in a more scientific manner. Now it's too late to label someone's name on it :).