facebookresearch / Clinical-Trial-Parser
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 428 units with 4,643 lines of code in units (80.9% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (116 lines of code)
    • 12 medium complex units (614 lines of code)
    • 38 simple units (1,031 lines of code)
    • 377 very simple units (2,882 lines of code)
0% | 2% | 13% | 22% | 62%
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
go0% | 2% | 13% | 22% | 61%
py0% | 0% | 12% | 20% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ct/parser0% | 9% | 29% | 15% | 46%
cmd/nel0% | 0% | 54% | 12% | 33%
ct/studies0% | 0% | 28% | 23% | 48%
ie0% | 0% | 18% | 28% | 52%
ct/relation0% | 0% | 7% | 51% | 41%
vocabularies/taxonomy0% | 0% | 0% | 18% | 81%
ct/variables0% | 0% | 0% | 31% | 68%
common/trie0% | 0% | 0% | 51% | 48%
cmd/extract0% | 0% | 0% | 62% | 37%
common/util0% | 0% | 0% | 15% | 84%
vocabularies/umls0% | 0% | 0% | 100% | 0%
common/conf0% | 0% | 0% | 36% | 63%
vocabularies/mesh0% | 0% | 0% | 32% | 67%
ct/units0% | 0% | 0% | 21% | 78%
cmd/cfg0% | 0% | 0% | 29% | 70%
text0% | 0% | 0% | 16% | 83%
common/col0% | 0% | 0% | 0% | 100%
ct/criteria0% | 0% | 0% | 0% | 100%
cmd/search0% | 0% | 0% | 0% | 100%
common/lsh0% | 0% | 0% | 0% | 100%
embedding0% | 0% | 0% | 0% | 100%
common/resource0% | 0% | 0% | 0% | 100%
vocabularies0% | 0% | 0% | 0% | 100%
ct/eligibility0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in src/ct/parser/cfg.go
116 33 1
func()
in src/ct/parser/parser.go
68 25 1
func()
in src/ct/parser/parser.go
65 19 1
func lexAction()
in src/ct/parser/lexer.go
42 18 1
func()
in src/ct/parser/parser.go
47 18 1
func LoadRules()
in src/ct/parser/rules.go
69 17 1
func()
in src/ct/parser/tree.go
57 16 1
func()
in src/cmd/nel/main.go
84 15 1
func()
in src/ct/parser/item.go
31 14 1
func getNERSlots()
in src/cmd/nel/main.go
34 11 3
func()
in src/ct/relation/relation.go
26 11 1
func()
in src/ct/studies/study.go
47 11 1
def transform()
in src/ie/process_ner_data.py
44 11 2
func LoadNodes()
in src/vocabularies/taxonomy/node.go
49 10 1
func()
in src/ct/relation/relation.go
40 10 1
func ItemType()
in src/ct/parser/item.go
24 10 1
func()
in src/ct/parser/item.go
24 10 1
func ReadFnames()
in src/common/util/fio/file.go
28 10 1
func NormalizeScientificMultiplier()
in src/common/util/text/exponential_multiplier.go
23 10 1
func()
in src/common/trie/trie.go
32 10 1