tensorflow / java-ndarray
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 1,408 units with 7,510 lines of code in units (67.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (86 lines of code)
    • 34 medium size units (975 lines of code)
    • 73 small units (1,091 lines of code)
    • 1,300 very small units (5,358 lines of code)
0% | 1% | 12% | 14% | 71%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 1% | 12% | 14% | 71%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ndarray/impl/dimension0% | 36% | 0% | 0% | 63%
ndarray/impl/buffer0% | 0% | 37% | 12% | 50%
ndarray/impl/sparse0% | 0% | 0% | 33% | 66%
ndarray0% | 0% | 0% | 5% | 94%
ndarray/impl/dense0% | 0% | 0% | 11% | 88%
ndarray/impl/sequence0% | 0% | 0% | 18% | 81%
ndarray/impl0% | 0% | 0% | 19% | 80%
ndarray/index0% | 0% | 0% | 3% | 96%
ndarray/buffer0% | 0% | 0% | 0% | 100%
ndarray/buffer/layout0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public RelativeDimensionalSpace mapTo()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java
86 21 1
public boolean equals()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java
44 13 1
public boolean equals()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java
44 14 1
public boolean equals()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBuffer.java
33 10 1
public BooleanDataBuffer copyTo()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java
33 6 2
public FloatDataBuffer copyTo()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java
32 5 2
public IntDataBuffer copyTo()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java
32 5 2
public ByteDataBuffer copyTo()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java
32 5 2
public DoubleDataBuffer copyTo()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java
32 5 2
public LongDataBuffer copyTo()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java
32 5 2
public ShortDataBuffer copyTo()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java
32 5 2
static
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeReference.java
31 3 0
public BooleanDataBuffer copyTo()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java
31 5 2
public boolean equals()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java
30 7 1
public boolean equals()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java
30 7 1
public boolean equals()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java
30 7 1
public boolean equals()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java
30 7 1
public boolean equals()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java
30 7 1
public boolean equals()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java
30 7 1
public boolean equals()
in ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java
27 6 1