dart-lang / convert
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 45 units with 473 lines of code in units (50.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (31 lines of code)
    • 6 simple units (144 lines of code)
    • 38 very simple units (298 lines of code)
0% | 0% | 6% | 30% | 63%
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% | 6% | 30% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src/percent0% | 0% | 19% | 58% | 21%
lib/src0% | 0% | 0% | 15% | 84%
lib/src/hex0% | 0% | 0% | 18% | 81%
example0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
String _convert()
in lib/src/percent/encoder.dart
31 15 3
Uint8List convert()
in lib/src/codepage.dart
31 8 2
void addSlice()
in lib/src/percent/decoder.dart
24 8 4
void addSlice()
in lib/src/percent/decoder.dart
23 8 4
int? _decode()
in lib/src/percent/decoder.dart
32 8 4
String _convert()
in lib/src/hex/encoder.dart
21 7 3
void _checkForInvalidCodeUnit()
in lib/src/percent/decoder.dart
13 6 4
CodePageDecoder _createDecoder()
in lib/src/codepage.dart
22 5 1
String convert()
in lib/src/codepage.dart
17 5 2
void addSlice()
in lib/src/hex/decoder.dart
23 5 4
void addSlice()
in lib/src/hex/decoder.dart
22 5 4
int digitForCodeUnit()
in lib/src/utils.dart
15 5 2
static Uint32List _buildMapping()
in lib/src/codepage.dart
16 4 1
CodePageEncoder _createEncoder()
in lib/src/codepage.dart
10 3 0
String convert()
in lib/src/codepage.dart
9 3 2
String _convertAllowInvalid()
in lib/src/codepage.dart
15 3 1
static Map _createBmpEncoding()
in lib/src/codepage.dart
8 3 1
int? _decode()
in lib/src/hex/decoder.dart
11 3 5
void addSlice()
in lib/src/byte_accumulator_sink.dart
7 3 4
void addSlice()
in lib/src/string_accumulator_sink.dart
7 3 4