microsoft / botbuilder-tools
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 373 units with 6,822 lines of code in units (28.2% of code).
    • 4 very complex units (1,145 lines of code)
    • 10 complex units (956 lines of code)
    • 38 medium complex units (1,860 lines of code)
    • 32 simple units (788 lines of code)
    • 289 very simple units (2,073 lines of code)
16% | 14% | 27% | 11% | 30%
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
ts26% | 1% | 40% | 8% | 22%
js14% | 24% | 15% | 12% | 33%
cs0% | 0% | 47% | 13% | 38%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/MSBot/src27% | 1% | 41% | 7% | 21%
packages/Ludown/lib20% | 27% | 14% | 13% | 24%
packages/Chatdown/lib0% | 35% | 21% | 11% | 31%
packages/QnAMaker/lib0% | 4% | 17% | 6% | 71%
packages/LUISGen/src0% | 0% | 47% | 13% | 38%
packages/QnAMaker0% | 0% | 0% | 69% | 30%
packages/LUIS/src0% | 0% | 0% | 31% | 68%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async function processConfiguration()
in packages/MSBot/src/msbot-clone-services.ts
585 117 0
const parseAndHandleEntity = function()
in packages/Ludown/lib/parseFileContents.js
274 92 4
const parseAndHandleIntent = function()
in packages/Ludown/lib/parseFileContents.js
177 69 2
const writeOutFiles = function()
in packages/Ludown/lib/parser.js
109 63 6
parseAndTranslate : async function()
in packages/Ludown/lib/translate-helpers.js
228 49 8
splitFileBySections : function()
in packages/Ludown/lib/helpers.js
152 42 2
collateLUISFiles: async function()
in packages/Ludown/lib/parseFileContents.js
127 37 1
validateLUISBlob: async function()
in packages/Ludown/lib/parseFileContents.js
134 35 1
async function readCommandsFromAggregate()
in packages/Chatdown/lib/index.js
104 33 2
readSync: function()
in packages/Chatdown/lib/read-text-file.js
28 27 1
readSync: function()
in packages/Ludown/lib/read-text-file.js
28 27 1
readSync: function()
in packages/MSBot/src/read-text-file.ts
28 27 1
readSync: function()
in packages/QnAMaker/lib/read-text-file.js
28 27 1
generateMarkdown: async function()
in packages/Ludown/lib/toLU.js
99 26 1
async function exportBot()
in packages/MSBot/src/msbot-export-services.ts
168 24 3
const parseAndHandleModelInfo = function()
in packages/Ludown/lib/parseFileContents.js
87 23 3
public static void Main()
in packages/LUISGen/src/Program.cs
114 22 1
async function processConnectAzureArgs()
in packages/MSBot/src/msbot-connect-bot.ts
52 22 1
function addCard()
in packages/Chatdown/lib/index.js
50 20 3
const VerifyAndUpdateSimpleEntityCollection = function()
in packages/Ludown/lib/parseFileContents.js
42 20 3