apple / ccs-caldavtester
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 202 units with 3,935 lines of code in units (84.7% of code).
    • 3 very complex units (540 lines of code)
    • 10 complex units (773 lines of code)
    • 23 medium complex units (920 lines of code)
    • 31 simple units (663 lines of code)
    • 135 very simple units (1,039 lines of code)
13% | 19% | 23% | 16% | 26%
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
py13% | 19% | 23% | 16% | 26%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
verifiers25% | 36% | 35% | 0% | 1%
src10% | 15% | 23% | 17% | 33%
ROOT0% | 0% | 0% | 61% | 38%
src/observers0% | 0% | 0% | 0% | 100%
generators0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def dorequest()
in src/caldavtest.py
222 95 9
def verify()
in verifiers/multistatusItems.py
163 61 6
def verify()
in verifiers/propfindItems.py
155 60 6
def verify()
in verifiers/calendarDataMatch.py
115 48 7
def readCommandLine()
in src/manager.py
115 45 1
def verify()
in verifiers/propfindValues.py
87 43 6
def readXML()
in src/manager.py
67 35 6
def testNode()
in verifiers/xmlElementMatch.py
57 34 4
def dofindnew()
in src/caldavtest.py
74 32 5
def verify()
in verifiers/postFreeBusy.py
83 32 6
def nodeForPath()
in src/xmlUtils.py
57 31 2
def verify()
in verifiers/addressDataMatch.py
62 26 7
def verify()
in verifiers/header.py
56 26 6
def run_test()
in src/caldavtest.py
53 23 6
def verify()
in verifiers/freeBusy.py
61 23 6
def verify()
in verifiers/jsonPointerMatch.py
66 22 6
def parseXML()
in src/request.py
50 21 2
def matchNode()
in verifiers/xmlElementMatch.py
54 21 5
def parseXML()
in src/serverinfo.py
43 19 2
def verify()
in verifiers/dataMatch.py
48 19 6