tensorflow / java-models
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 13 units with 252 lines of code in units (29.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (145 lines of code)
    • 4 small units (67 lines of code)
    • 5 very small units (40 lines of code)
0% | 0% | 57% | 26% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 0% | 67% | 22% | 10%
py0% | 0% | 0% | 52% | 47%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
object_detection/src/main/java0% | 0% | 61% | 32% | 6%
training/src/main/java0% | 0% | 86% | 0% | 14%
label_image/src/main/java0% | 0% | 62% | 20% | 16%
label_image0% | 0% | 0% | 52% | 47%
Alternative Visuals
Longest Units
Top 13 longest units
Unit# linesMcCabe index# params
public static void main()
in tensorflow-examples-legacy/object_detection/src/main/java/DetectObjects.java
45 6 1
public static void main()
in tensorflow-examples-legacy/training/src/main/java/Train.java
43 5 1
public static void main()
in tensorflow-examples-legacy/label_image/src/main/java/LabelImage.java
33 4 1
private static void printSignature()
in tensorflow-examples-legacy/object_detection/src/main/java/DetectObjects.java
24 3 1
private static void printUsage()
in tensorflow-examples-legacy/object_detection/src/main/java/DetectObjects.java
20 1 1
def patch_graph()
in tensorflow-examples-legacy/label_image/download.py
19 1 0
private static Tensor makeImageTensor()
in tensorflow-examples-legacy/object_detection/src/main/java/DetectObjects.java
17 2 1
private static ArrayList loadLabels()
in tensorflow-examples-legacy/label_image/src/main/java/LabelImage.java
11 2 0
def create_graph_to_decode_and_normalize_image()
in tensorflow-examples-legacy/label_image/download.py
9 1 0
private static int argmax()
in tensorflow-examples-legacy/label_image/src/main/java/LabelImage.java
9 3 1
def download()
in tensorflow-examples-legacy/label_image/download.py
8 1 0
private static void bgr2rgb()
in tensorflow-examples-legacy/object_detection/src/main/java/DetectObjects.java
7 2 1
private static void printVariables()
in tensorflow-examples-legacy/training/src/main/java/Train.java
7 2 1