microsoft / BotFramework-Composer
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,578 units with 28,559 lines of code in units (24.3% of code).
    • 2 very complex units (566 lines of code)
    • 1 complex units (198 lines of code)
    • 38 medium complex units (2,697 lines of code)
    • 123 simple units (4,343 lines of code)
    • 2,414 very simple units (20,755 lines of code)
1% | <1% | 9% | 15% | 72%
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
ts2% | <1% | 11% | 16% | 67%
tsx0% | 0% | 3% | 8% | 88%
js0% | 0% | 0% | 25% | 74%
nsh0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
extensions/azurePublish17% | 0% | 13% | 32% | 37%
Composer/packages<1% | <1% | 9% | 14% | 74%
extensions/packageManager0% | 0% | 10% | 10% | 79%
extensions/scripts0% | 0% | 0% | 27% | 72%
extensions/mongoStorage0% | 0% | 0% | 24% | 75%
Composer/scripts0% | 0% | 0% | 50% | 50%
extensions/runtimes0% | 0% | 0% | 0% | 100%
extensions/azurePublishNew0% | 0% | 0% | 0% | 100%
extensions/localPublish0% | 0% | 0% | 0% | 100%
extensions/pvaPublish0% | 0% | 0% | 0% | 100%
extensions/sample-ui-plugin0% | 0% | 0% | 0% | 100%
extensions/mockRemotePublish0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function resolveFieldWidget()
in Composer/packages/adaptive-form/src/utils/resolveFieldWidget.ts
124 66 1
export default async()
in extensions/azurePublish/src/node/index.ts
442 52 1
protected async completion()
in Composer/packages/tools/language-servers/language-understanding/src/LUServer.ts
198 29 1
import: async function()
in extensions/packageManager/src/node/index.ts
125 21 2
public async generateProfile()
in Composer/packages/server/src/externalContentProvider/azureBotServiceProvider.ts
41 20 0
private matchState()
in Composer/packages/tools/language-servers/language-generation/src/LGServer.ts
49 20 2
protected async completion()
in Composer/packages/tools/language-servers/language-generation/src/LGServer.ts
139 20 1
export function getOrderedProperties()
in Composer/packages/adaptive-form/src/utils/getOrderedProperties.ts
68 19 3
protected async docTypeFormat()
in Composer/packages/tools/language-servers/language-understanding/src/LUServer.ts
61 19 1
export async function publishLuisToPrediction()
in extensions/azurePublish/src/node/luisAndQnA.ts
110 19 8
name: formatMessage()
in Composer/packages/client/src/pages/knowledge-base/table-view.tsx
127 18 1
async function getAccessToken()
in Composer/packages/client/src/utils/authClient.ts
56 18 1
public async getAccessToken()
in Composer/packages/electron-server/src/auth/oneAuthService.ts
66 17 1
public static async migrateProjectAsync()
in Composer/packages/server/src/services/project.ts
125 17 2
id: getFileName()
in Composer/packages/lib/indexers/src/utils/lgUtil.ts
75 16 1
public static async createProjectAsync()
in Composer/packages/server/src/services/project.ts
127 16 2
public async getARMTokenForTenant()
in Composer/packages/electron-server/src/auth/oneAuthService.ts
68 15 1
public async create()
in extensions/azurePublish/src/node/provision.ts
153 15 1
export function useShell()
in Composer/packages/client/src/shell/useShell.ts
217 14 2
export function getProperties()
in Composer/packages/lib/indexers/src/dialogUtils/extractMemoryPaths.ts
29 14 1