dart-lang / oauth2
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 24 units with 426 lines of code in units (64.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (142 lines of code)
    • 4 simple units (129 lines of code)
    • 17 very simple units (155 lines of code)
0% | 0% | 33% | 30% | 36%
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
dart0% | 0% | 33% | 30% | 36%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src0% | 0% | 35% | 32% | 32%
example0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
Credentials handleAccessTokenResponse()
in lib/src/handle_access_token_response.dart
66 16 7
void _handleErrorResponse()
in lib/src/handle_access_token_response.dart
32 12 3
Future refresh()
in lib/src/credentials.dart
44 12 5
Future handleAuthorizationResponse()
in lib/src/authorization_code_grant.dart
31 9 1
Future send()
in lib/src/client.dart
24 8 1
Future resourceOwnerPasswordGrant()
in lib/src/resource_owner_password_grant.dart
42 6 12
Future clientCredentialsGrant()
in lib/src/client_credentials_grant.dart
32 6 9
Map parseJsonParameters()
in lib/src/parameters.dart
13 5 2
Future _handleAuthorizationCode()
in lib/src/authorization_code_grant.dart
28 4 1
Future refreshCredentials()
in lib/src/client.dart
25 4 1
String toString()
in lib/src/authorization_exception.dart
9 3 0
Future handleAuthorizationCode()
in lib/src/authorization_code_grant.dart
9 3 1
Map Function()
in lib/src/credentials.dart
7 2 2
void validate()
in lib/src/credentials.dart
4 2 2
Future createClient()
in example/main.dart
15 2 0
Map Function()
in lib/src/authorization_code_grant.dart
11 1 2
static String _createCodeVerifier()
in lib/src/authorization_code_grant.dart
4 1 0
void close()
in lib/src/authorization_code_grant.dart
4 1 0
void close()
in lib/src/client.dart
4 1 0
String basicAuthHeader()
in lib/src/utils.dart
4 1 2