microsoft / regexp-i18n
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 46 units with 306 lines of code in units (60.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (42 lines of code)
    • 3 simple units (56 lines of code)
    • 42 very simple units (208 lines of code)
0% | 0% | 13% | 18% | 67%
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
java0% | 0% | 18% | 0% | 81%
ts0% | 0% | 0% | 67% | 32%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tools0% | 0% | 18% | 0% | 81%
src0% | 0% | 0% | 67% | 32%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public static void printRange()
in tools/SymbolsRange.java
42 11 4
export function trim()
in src/RegExpI18n.ts
21 8 2
matchRegexp: createRegExp()
in src/RegExpI18n.ts
18 6 2
validator: createRegExp()
in src/RegExpI18n.ts
17 6 1
protected static String code()
in tools/SymbolsRange.java
16 5 1
export function createRegExp()
in src/RegExpI18n.ts
9 4 2
13 3 3
public boolean test()
in tools/CompositePredicate.java
11 3 1
private static void print()
in tools/SymbolsRange.java
12 3 1
public static void printMatch()
in tools/SymbolsRange.java
10 3 2
public static void printAll()
in tools/SymbolsRange.java
7 3 1
boolean perform()
in tools/CompositePredicate.java
3 2 2
boolean perform()
in tools/CompositePredicate.java
3 2 2
public boolean test()
in tools/Predicate.java
4 2 1
constructor()
in src/Range.ts
2 1 4
private _checkLimits()
in src/Range.ts
3 1 1
boolean test()
in tools/CompositePredicate.java
3 1 1
boolean test()
in tools/CompositePredicate.java
3 1 1
public static Predicate or()
in tools/CompositePredicate.java
3 1 1
public static Predicate and()
in tools/CompositePredicate.java
3 1 1