corretto / hotpatch-for-apache-log4j2
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 514 units with 8,416 lines of code in units (80.1% of code).
    • 9 very long units (2,582 lines of code)
    • 18 long units (1,246 lines of code)
    • 54 medium size units (1,656 lines of code)
    • 94 small units (1,307 lines of code)
    • 339 very small units (1,625 lines of code)
30% | 14% | 19% | 15% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java30% | 14% | 19% | 15% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
java/com/amazon/corretto/hotpatch/org/objectweb/asm32% | 14% | 19% | 16% | 18%
java/com/amazon/corretto/hotpatch/org/objectweb/asm/signature0% | 28% | 14% | 4% | 53%
java0% | 30% | 45% | 7% | 16%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void readCode()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/ClassReader.java
978 532 3
void execute()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/Frame.java
424 191 4
public void accept()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/ClassReader.java
237 50 3
private int readMethod()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/ClassReader.java
208 38 3
void putMethodInfo()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/MethodWriter.java
194 43 1
private int readElementValue()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/ClassReader.java
167 36 4
private int readField()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/ClassReader.java
133 21 3
private int readRecordComponent()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/ClassReader.java
124 17 3
public void visitFrame()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/MethodWriter.java
117 28 5
private void readModuleAttributes()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/ClassReader.java
91 15 5
private void putFrame()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/MethodWriter.java
88 26 0
int computeMethodInfoSize()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/MethodWriter.java
87 20 0
private int readStackMapFrame()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/ClassReader.java
83 14 4
private static int parseType()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/signature/SignatureReader.java
76 25 3
private void computeMaxStackAndLocal()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/MethodWriter.java
72 18 0
public void visit()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/AnnotationWriter.java
71 26 2
private void computeAllFrames()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/MethodWriter.java
71 15 0
private int readTypeAnnotationTarget()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/ClassReader.java
68 25 2
static void putAbstractType()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/Frame.java
65 15 3
private static int getAbstractTypeFromDescriptor()
in src/main/java/com/amazon/corretto/hotpatch/org/objectweb/asm/Frame.java
64 22 3