microsoft / ailab
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,800 units with 34,255 lines of code in units (47.3% of code).
    • 3 very complex units (607 lines of code)
    • 12 complex units (1,107 lines of code)
    • 82 medium complex units (3,493 lines of code)
    • 215 simple units (6,225 lines of code)
    • 2,488 very simple units (22,823 lines of code)
1% | 3% | 10% | 18% | 66%
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
js5% | 8% | 16% | 23% | 45%
cpp0% | 83% | 0% | 0% | 16%
cs0% | 0% | 6% | 15% | 77%
py0% | 0% | 14% | 15% | 70%
tsx0% | 0% | 2% | 19% | 77%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Sketch2Code/Sketch2Code.Web6% | 6% | 17% | 23% | 45%
BuildAnIntelligentBot/src0% | 10% | 8% | 15% | 65%
VirtualStage/KinectMaskGenerator0% | 83% | 0% | 0% | 16%
GoogleAssistantConnector/GoogleAssistant0% | 9% | 12% | 27% | 50%
Snip-Insights/SnipInsight0% | 0% | 8% | 14% | 77%
Pix2Story/source0% | 0% | 16% | 15% | 67%
VirtualStage/Speaker.Recorder0% | 0% | 6% | 23% | 70%
Snip-Insights/SnipInsight.Forms0% | 0% | 6% | 6% | 87%
JFKFiles/JfkWebApiSkills0% | 0% | 14% | 18% | 66%
VirtualStage/BackgroundMatting0% | 0% | 9% | 20% | 69%
Snip-Insights/SnipInsight.Forms.GTK0% | 0% | 2% | 8% | 88%
Sketch2Code/Sketch2Code.Core0% | 0% | 3% | 27% | 69%
JFKFiles/frontend0% | 0% | 1% | 15% | 82%
GoogleAssistantConnector/DemoBot0% | 0% | 0% | 29% | 70%
Sketch2Code/Sketch2Code.AI0% | 0% | 0% | 32% | 67%
JFKFiles/resources0% | 0% | 0% | 36% | 63%
MachineTeaching/Smart-Building0% | 0% | 0% | 0% | 100%
MachineTeaching/Machine-Calibration0% | 0% | 0% | 0% | 100%
MachineTeaching/Motion-Control0% | 0% | 0% | 0% | 100%
Sketch2Code/Sketch2Code.Api0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function()
in Sketch2Code/Sketch2Code.Web/Scripts/bootstrap.bundle.js
270 78 0
function()
in Sketch2Code/Sketch2Code.Web/Scripts/bootstrap.bundle.js
173 63 0
function()
in Sketch2Code/Sketch2Code.Web/Scripts/bootstrap.bundle.js
164 54 0
exports.AttachmentView = function()
in BuildAnIntelligentBot/src/ChatBot/wwwroot/built/Attachment.js
111 43 1
function flip()
in Sketch2Code/Sketch2Code.Web/Scripts/bootstrap.bundle.js
57 41 2
function flip()
in Sketch2Code/Sketch2Code.Web/Scripts/esm/popper.js
57 41 2
function flip()
in Sketch2Code/Sketch2Code.Web/Scripts/popper.js
57 41 2
function flip()
in Sketch2Code/Sketch2Code.Web/Scripts/umd/popper.js
57 41 2
function()
in Sketch2Code/Sketch2Code.Web/Scripts/bootstrap.bundle.js
113 40 0
exports.history = function()
in BuildAnIntelligentBot/src/ChatBot/wwwroot/built/Store.js
72 34 2
function mapLocale()
in BuildAnIntelligentBot/src/ChatBot/wwwroot/built/Strings.js
77 29 1
static compact()
in GoogleAssistantConnector/GoogleAssistant/DirectLineToActionsOnGoogleLib/lib/googleActions/RichMessageLimitationsManager.js
88 28 2
function()
in Sketch2Code/Sketch2Code.Web/Scripts/bootstrap.bundle.js
104 28 0
function()
in Sketch2Code/Sketch2Code.Web/Scripts/bootstrap.bundle.js
110 28 0
int main()
in VirtualStage/KinectMaskGenerator/main.cpp
204 26 2
function()
in Sketch2Code/Sketch2Code.Web/Scripts/bootstrap.bundle.js
105 22 0
private void ProcessLUISData()
in Snip-Insights/SnipInsight.Forms/Features/Insights/OCR/OCRViewModel.cs
69 22 1
public async Task DeleteAsync()
in Snip-Insights/SnipInsight/AppManager.cs
110 22 3
private void RenderThread()
in VirtualStage/Speaker.Recorder/Speaker.Recorder/Kinect/KinectCaptureProvider.cs
79 22 1
private async Task GetLUISInsights()
in Snip-Insights/SnipInsight/AIServices/AIViewModels/OCRViewModel.cs
73 21 1