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
org.apache.commons.imaging.formats.tiff 27 211 1933 12 82 211 202
org.apache.commons.imaging.common 26 279 1624 17 92 55 416
org.apache.commons.imaging.formats.tiff.write 16 125 1206 1 9 93 144
org.apache.commons.imaging.formats.png 16 83 1193 2 13 236 285
org.apache.commons.imaging.formats.tiff.constants 24 5 1114 17 91 37 404
org.apache.commons.imaging 12 202 1021 136 1627 53 298
org.apache.commons.imaging.palette 20 71 900 9 54 23 259
org.apache.commons.imaging.formats.jpeg 14 71 834 4 32 290 108
org.apache.commons.imaging.formats.pnm 16 96 755 1 10 57 208
org.apache.commons.imaging.util 6 90 703 4 24 35 96
org.apache.commons.imaging.formats.gif 7 40 676 1 10 83 112
org.apache.commons.imaging.common.itu_t4 6 23 612 6 58 6 64
org.apache.commons.imaging.formats.pcx 4 30 592 1 10 140 44
org.apache.commons.imaging.formats.jpeg.decoder 4 23 574 2 11 58 110
org.apache.commons.imaging.formats.bmp 5 24 563 1 10 91 48
org.apache.commons.imaging.color 10 58 546 0 0 77 179
org.apache.commons.imaging.formats.xpm 4 30 485 1 10 4 14
org.apache.commons.imaging.formats.jpeg.segments 17 49 480 1 3 58 209
org.apache.commons.imaging.formats.psd 6 36 473 1 10 126 96
org.apache.commons.imaging.formats.ico 8 37 466 1 10 143 16
org.apache.commons.imaging.formats.icns 7 44 447 1 10 33 65
org.apache.commons.imaging.formats.jpeg.iptc 12 41 426 9 98 71 191
org.apache.commons.imaging.formats.tiff.taginfos 26 78 422 4 16 26 402
org.apache.commons.imaging.common.mylzw 8 56 379 0 0 15 80
org.apache.commons.imaging.icc 8 40 377 0 0 202 148
org.apache.commons.imaging.formats.tiff.datareaders 3 15 360 1 10 85 48
org.apache.commons.imaging.formats.tiff.fieldtypes 8 28 308 1 3 7 128
org.apache.commons.imaging.formats.bmp.pixelparsers 5 19 260 0 0 23 80
org.apache.commons.imaging.common.bytesource 6 35 250 0 0 14 68
org.apache.commons.imaging.formats.jpeg.xmp 13 45 248 11 97 21 48
org.apache.commons.imaging.formats.png.chunks 11 27 244 6 18 13 185
org.apache.commons.imaging.formats.xbm 3 21 240 1 10 4 14
org.apache.commons.imaging.formats.tiff.photometricinterpreters 8 22 201 2 23 27 132
org.apache.commons.imaging.formats.jpeg.exif 8 28 190 15 205 21 16
org.apache.commons.imaging.formats.rgbe 4 24 183 1 5 8 64
org.apache.commons.imaging.formats.wbmp 2 21 152 1 10 5 14
org.apache.commons.imaging.formats.dcx 2 18 136 1 10 5 16
org.apache.commons.imaging.formats.psd.dataparsers 8 21 113 0 0 7 128
org.apache.commons.imaging.formats.bmp.writers 3 13 105 0 0 11 48
org.apache.commons.imaging.formats.psd.datareaders 3 7 95 0 0 6 48
org.apache.commons.imaging.formats.png.scanlinefilters 6 11 88 0 0 23 96
org.apache.commons.imaging.formats.png.transparencyfilters 4 8 57 0 0 0 64
org.apache.commons.imaging.formats.tga 1 0 3 0 0 249 16
org.apache.commons.imaging.formats 0 0 1 0 0 0 19
Classes total Methods total NCSS total Javadocs Javadoc lines Single lines comment Multi lines comment
407 2205 22035 272 2681 2752 5430

Objects

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

TOP 30 classes containing the most NCSS.

Object NCSS Methods Classes Javadocs
org.apache.commons.imaging.formats.gif.GifImageParser 538 32 0 1
org.apache.commons.imaging.util.Debug 531 69 0 0
org.apache.commons.imaging.common.itu_t4.T4AndT6Compression 510 16 0 5
org.apache.commons.imaging.formats.jpeg.JpegImageParser 486 28 5 1
org.apache.commons.imaging.color.ColorConversions 462 40 0 0
org.apache.commons.imaging.formats.xpm.XpmImageParser 450 27 3 1
org.apache.commons.imaging.formats.bmp.BmpImageParser 448 22 0 1
org.apache.commons.imaging.formats.ico.IcoImageParser 437 20 7 1
org.apache.commons.imaging.formats.png.PngImageParser 426 28 0 2
org.apache.commons.imaging.formats.tiff.TiffDirectory 394 47 1 0
org.apache.commons.imaging.formats.tiff.TiffField 352 32 1 9
org.apache.commons.imaging.formats.png.PngWriter 340 17 2 0
org.apache.commons.imaging.formats.psd.PsdImageParser 337 25 0 1
org.apache.commons.imaging.formats.tiff.TiffImageParser 334 22 0 1
org.apache.commons.imaging.formats.tiff.write.TiffImageWriterBase 314 10 0 0
org.apache.commons.imaging.Imaging 305 69 0 59
org.apache.commons.imaging.formats.tiff.TiffImageMetadata 301 24 3 0
org.apache.commons.imaging.common.ByteConversions 298 70 0 1
org.apache.commons.imaging.common.BasicCParser 284 5 0 1
org.apache.commons.imaging.formats.tiff.write.TiffOutputDirectory 283 44 2 0
org.apache.commons.imaging.formats.pcx.PcxImageParser 280 20 1 1
org.apache.commons.imaging.palette.PaletteFactory 275 15 1 5
org.apache.commons.imaging.formats.pcx.PcxWriter 263 8 0 0
org.apache.commons.imaging.formats.jpeg.decoder.JpegDecoder 246 11 0 0
org.apache.commons.imaging.formats.tiff.TiffReader 242 13 4 0
org.apache.commons.imaging.formats.tiff.constants.ExifTagConstants 236 0 0 1
org.apache.commons.imaging.formats.jpeg.decoder.Dct 232 8 0 2
org.apache.commons.imaging.formats.pnm.PnmImageParser 215 17 0 1
org.apache.commons.imaging.formats.xbm.XbmImageParser 211 19 2 1
org.apache.commons.imaging.formats.icns.IcnsImageParser 171 18 3 1

TOP 30 classes containing the most methods.

Object NCSS Methods Classes Javadocs
org.apache.commons.imaging.common.ByteConversions 298 70 0 1
org.apache.commons.imaging.Imaging 305 69 0 59
org.apache.commons.imaging.util.Debug 531 69 0 0
org.apache.commons.imaging.formats.tiff.TiffDirectory 394 47 1 0
org.apache.commons.imaging.ImageParser 136 46 0 47
org.apache.commons.imaging.formats.tiff.write.TiffOutputDirectory 283 44 2 0
org.apache.commons.imaging.common.BinaryFileParser 102 40 0 0
org.apache.commons.imaging.color.ColorConversions 462 40 0 0
org.apache.commons.imaging.common.BinaryInputStream 88 35 0 0
org.apache.commons.imaging.formats.gif.GifImageParser 538 32 0 1
org.apache.commons.imaging.formats.tiff.TiffField 352 32 1 9
org.apache.commons.imaging.formats.jpeg.JpegImageParser 486 28 5 1
org.apache.commons.imaging.formats.png.PngImageParser 426 28 0 2
org.apache.commons.imaging.common.BinaryFunctions 163 28 0 1
org.apache.commons.imaging.formats.xpm.XpmImageParser 450 27 3 1
org.apache.commons.imaging.formats.psd.PsdImageParser 337 25 0 1
org.apache.commons.imaging.formats.tiff.write.TiffOutputSet 143 25 0 1
org.apache.commons.imaging.formats.tiff.TiffImageMetadata 301 24 3 0
org.apache.commons.imaging.ImageInfo 149 23 0 20
org.apache.commons.imaging.formats.tiff.TiffImageParser 334 22 0 1
org.apache.commons.imaging.formats.bmp.BmpImageParser 448 22 0 1
org.apache.commons.imaging.formats.ico.IcoImageParser 437 20 7 1
org.apache.commons.imaging.formats.pcx.PcxImageParser 280 20 1 1
org.apache.commons.imaging.formats.xbm.XbmImageParser 211 19 2 1
org.apache.commons.imaging.formats.wbmp.WbmpImageParser 129 19 1 1
org.apache.commons.imaging.formats.icns.IcnsImageParser 171 18 3 1
org.apache.commons.imaging.PixelDensity 58 17 0 1
org.apache.commons.imaging.formats.pnm.PnmImageParser 215 17 0 1
org.apache.commons.imaging.formats.jpeg.exif.ExifRewriter 167 17 7 15
org.apache.commons.imaging.formats.png.PngWriter 340 17 2 0

Averages.

NCSS average Program NCSS Classes average Methods average Javadocs average
51.80 22,035.00 0.24 5.42 0.67

Methods

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

TOP 30 Methods containing the most NCSS.

Methods NCSS CCN Javadocs
org.apache.commons.imaging.formats.jpeg.JpegImageParser.getImageInfo(ByteSource,Object) 217 100 0
org.apache.commons.imaging.formats.png.PngWriter.writeImage(BufferedImage,OutputStream,Object) 147 45 0
org.apache.commons.imaging.common.BasicCParser.preprocess(InputStream,StringBuilder,String) 142 61 0
org.apache.commons.imaging.formats.tiff.write.TiffImageWriterBase.writeImage(BufferedImage,OutputStream,Object) 133 42 0
org.apache.commons.imaging.formats.ico.IcoImageParser.writeImage(BufferedImage,OutputStream,Object) 132 35 0
org.apache.commons.imaging.formats.gif.GifImageParser.writeImage(BufferedImage,OutputStream,Object) 121 36 0
org.apache.commons.imaging.formats.tiff.TiffField.getValueDescription(Object) 117 49 0
org.apache.commons.imaging.formats.bmp.BmpImageParser.readBmpHeaderInfo(InputStream,FormatCompliance,boolean) 117 15 0
org.apache.commons.imaging.formats.tiff.write.TiffImageWriterBase.validateDirectories(TiffOutputSet) 101 51 0
org.apache.commons.imaging.formats.png.PngImageParser.getBufferedImage(ByteSource,Object) 99 39 0
org.apache.commons.imaging.formats.bmp.BmpImageParser.readImageContents(InputStream,FormatCompliance,boolean) 98 33 0
org.apache.commons.imaging.formats.tiff.TiffImageParser.getImageInfo(ByteSource,Object) 96 26 0
org.apache.commons.imaging.formats.ico.IcoImageParser.readBitmapIconData(IconData[],IconInfo) 95 25 0
org.apache.commons.imaging.formats.pnm.PnmImageParser.readHeader(InputStream) 93 44 0
org.apache.commons.imaging.common.itu_t4.T4AndT6Compression.compressT4_2D(outputStream.toByteArray[][],int,int,boolean,int) 87 22 0
org.apache.commons.imaging.common.itu_t4.T4AndT6Compression.decompressT4_2D(outputStream.toByteArray[][],int,int,boolean) 86 26 1
org.apache.commons.imaging.formats.pcx.PcxImageParser.readImage(PcxHeader,InputStream,ByteSource) 85 40 0
org.apache.commons.imaging.formats.tiff.TiffReader.readDirectory(ByteSource,long,int,FormatCompliance,Listener,boolean,Number) 81 36 0
org.apache.commons.imaging.Imaging.guessFormat(ByteSource) 79 49 1
org.apache.commons.imaging.formats.jpeg.segments.Segment.getSegmentType() 78 78 0
org.apache.commons.imaging.palette.MedianCutMostPopulatedBoxesImplementation.performNextMedianCut(ColorGroup,boolean) 77 24 0
org.apache.commons.imaging.formats.png.PngImageParser.getImageInfo(ByteSource,Object) 76 22 0
org.apache.commons.imaging.common.BasicCParser.unescapeString(StringBuilder,String) 76 44 0
org.apache.commons.imaging.common.itu_t4.T4AndT6Compression.compressT6(outputStream.toByteArray[][],int,int) 73 19 0
org.apache.commons.imaging.formats.jpeg.decoder.Dct.inverseDCT8x8(a7[]) 71 3 0
org.apache.commons.imaging.common.itu_t4.T4AndT6Compression.decompressT6(IOException[][],int,int) 70 19 1
org.apache.commons.imaging.formats.jpeg.decoder.Dct.forwardDCT8x8(a43[]) 69 3 0
org.apache.commons.imaging.icc.IccProfileParser.readICCProfileInfo(InputStream) 66 20 0
org.apache.commons.imaging.formats.tiff.datareaders.DataReaderStrips.interpretStrip(ImageBuilder,byte[],int,int) 64 26 0
org.apache.commons.imaging.util.Debug.dump(String,Object) 64 21 0

Averages.

Program NCSS NCSS average CCN average Javadocs average
22,035.00 7.94 3.21 0.10

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