corretto / amazon-corretto-crypto-provider
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 425 units with 5,094 lines of code in units (59.4% of code).
    • 3 very long units (403 lines of code)
    • 12 long units (839 lines of code)
    • 48 medium size units (1,461 lines of code)
    • 64 small units (919 lines of code)
    • 298 very small units (1,472 lines of code)
7% | 16% | 28% | 18% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java8% | 16% | 27% | 15% | 31%
cpp8% | 19% | 36% | 19% | 15%
h0% | 0% | 12% | 30% | 56%
cxx0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/com/amazon/corretto/crypto/provider9% | 18% | 25% | 16% | 30%
csrc7% | 15% | 31% | 22% | 23%
template-src/com/amazon/corretto/crypto/provider0% | 0% | 28% | 7% | 63%
tst/com/amazon/corretto/crypto/provider/coverage0% | 0% | 67% | 32% | 0%
CMake/trycompile0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
protected synchronized int engineDoFinal()
in src/com/amazon/corretto/crypto/provider/AesGcmSpi.java
152 18 5
128 32 20
private static native boolean verify()
in src/com/amazon/corretto/crypto/provider/EvpSignature.java
123 9 13
94 16 11
static
in src/com/amazon/corretto/crypto/provider/Loader.java
88 14 0
public static void testMac()
in src/com/amazon/corretto/crypto/provider/Utils.java
83 20 4
public static void testDigest()
in src/com/amazon/corretto/crypto/provider/Utils.java
82 20 3
protected synchronized void engineInit()
in src/com/amazon/corretto/crypto/provider/AesGcmSpi.java
77 30 4
bool rdseed_fallback()
in csrc/rdrand.cpp
66 13 1
private static native int oneShotEncrypt()
in src/com/amazon/corretto/crypto/provider/AesGcmSpi.java
62 1 10
bool drbg_getentropy()
in csrc/aes_ctr_drbg.cpp
61 17 2
61 11 14
protected int engineDoFinal()
in src/com/amazon/corretto/crypto/provider/RsaCipher.java
56 14 5
protected synchronized boolean engineVerify()
in src/com/amazon/corretto/crypto/provider/EvpSignature.java
56 6 3
private void parseKey()
in src/com/amazon/corretto/crypto/provider/RsaCipher.java
53 10 0
public ECInfo apply()
in src/com/amazon/corretto/crypto/provider/EcUtils.java
50 7 1
private synchronized static Path createTmpFile()
in src/com/amazon/corretto/crypto/provider/Loader.java
48 10 2
47 7 12
47 5 12
native private static void generate()
in src/com/amazon/corretto/crypto/provider/RsaGen.java
44 2 10