aws / aws-encryption-sdk-c
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 588 units with 9,811 lines of code in units (59.0% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (412 lines of code)
    • 36 medium complex units (1,888 lines of code)
    • 77 simple units (1,943 lines of code)
    • 471 very simple units (5,568 lines of code)
0% | 4% | 19% | 19% | 56%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
c0% | 3% | 17% | 20% | 58%
cpp0% | 16% | 42% | 10% | 31%
h0% | 0% | 4% | 8% | 87%
py0% | 0% | 0% | 100% | 0%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source0% | 5% | 32% | 27% | 34%
aws-encryption-sdk-cpp/source0% | 16% | 42% | 10% | 30%
verification/cbmc0% | 0% | <1% | 13% | 85%
include/aws0% | 0% | 4% | 8% | 86%
cmake/header-tester0% | 0% | 0% | 0% | 100%
codebuild/test-install-project0% | 0% | 0% | 0% | 100%
codebuild/test-install-project-cpp0% | 0% | 0% | 0% | 100%
aws-encryption-sdk-cpp/include0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
99 39 2
int aws_cryptosdk_sig_sign_start()
in source/cipher_openssl.c
112 33 5
static int OnDecrypt()
in aws-encryption-sdk-cpp/source/kms_mrk_keyring.cpp
127 30 7
74 29 4
static int OnEncrypt()
in aws-encryption-sdk-cpp/source/kms_mrk_keyring.cpp
127 24 7
static int OnEncrypt()
in aws-encryption-sdk-cpp/source/kms_keyring.cpp
117 23 7
int aws_cryptosdk_sig_sign_finish()
in source/cipher_openssl.c
103 22 3
67 22 7
int hash_dec_request()
in source/caching_cmm.c
74 21 3
static int OnDecrypt()
in aws-encryption-sdk-cpp/source/kms_keyring.cpp
80 19 7
int aws_cryptosdk_priv_try_gen_key()
in source/session_encrypt.c
77 18 1
62 18 9
60 18 3
34 18 3
static int sign_header()
in source/session_encrypt.c
65 16 1
49 16 5
51 16 5
60 15 4
46 14 6
int hash_enc_request()
in source/caching_cmm.c
51 14 3