microsoft / BlingFire
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 2,259 units with 43,351 lines of code in units (27.1% of code).
    • 0 very complex units (0 lines of code)
    • 28 complex units (3,766 lines of code)
    • 188 medium complex units (11,237 lines of code)
    • 336 simple units (11,166 lines of code)
    • 1,707 very simple units (17,182 lines of code)
0% | 8% | 25% | 25% | 39%
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
cpp0% | 9% | 28% | 25% | 37%
cxx0% | 77% | 0% | 0% | 22%
h0% | 2% | 13% | 32% | 50%
py0% | 0% | 20% | 33% | 45%
cs0% | 0% | 0% | 9% | 90%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
blingfiretools0% | 19% | 40% | 24% | 16%
blingfirecompile.library0% | 3% | 20% | 26% | 50%
blingfireclient.library0% | 11% | 21% | 27% | 39%
ldbsrc0% | 0% | 26% | 31% | 41%
scripts0% | 0% | 9% | 47% | 42%
dist-pypi0% | 0% | 22% | 0% | 77%
nuget0% | 0% | 0% | 9% | 90%
wasm0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int FARegexpParser_msyacc::Parse()
in blingfirecompile.library/src/FARegexpParser_msyacc.cpp
290 49 0
const unsigned int FAEncoding2CodePage()
in blingfirecompile.library/src/FAUtils.cpp
60 49 1
int __cdecl main()
in blingfiretools/fa_line2chain_unicode/fa_line2chain_unicode.cpp
168 44 2
const int TextToIdsWithOffsets_wp()
in blingfiretools/blingfiretokdll/blingfiretokdll.cpp
142 43 8
const int TextToSentencesWithOffsetsWithModel()
in blingfiretools/blingfiretokdll/blingfiretokdll.cpp
136 39 7
const int TextToIdsWithOffsets_sp()
in blingfiretools/blingfiretokdll/blingfiretokdll.cpp
127 38 8
const int FARegexpLexer_char::FindToken()
in blingfirecompile.library/src/FARegexpLexer_char.cpp
80 36 2
cxx
int YYPARSER::Parse()
in blingfirecompile.library/ext/yypars.cxx
175 34 0
void process_args()
in blingfiretools/fa_line2chain_unicode/fa_line2chain_unicode.cpp
137 34 2
int __cdecl main()
in blingfiretools/fa_wrec/fa_wrec.cpp
145 34 2
int __cdecl main()
in blingfiretools/fa_fsm2fsm/fa_fsm2fsm.cpp
140 33 2
void FADictConfKeeper::Init()
in blingfireclient.library/src/FADictConfKeeper.cpp
139 32 2
const int FARSDfa_pack_triv::GetDest()
in blingfireclient.library/src/FARSDfa_pack_triv.cpp
162 32 2
int __cdecl main()
in blingfiretools/fa_lex/fa_lex.cpp
164 32 2
const bool FATestCmpDfa::Process()
in blingfirecompile.library/src/FATestCmpDfa.cpp
95 31 2
int __cdecl main()
in blingfiretools/fa_align/fa_align.cpp
144 31 2
void process_args()
in blingfiretools/fa_fsm2fsm_pack/fa_fsm2fsm_pack.cpp
121 31 2
void process_args()
in blingfiretools/fa_ts2stat/fa_ts2stat.cpp
135 31 2
void FAWbdConfKeeper::Initialize()
in blingfireclient.library/src/FAWbdConfKeeper.cpp
157 30 3
int __cdecl main()
in blingfiretools/fa_line_format/fa_line_format.cpp
109 30 2