microsoft / vscode-azure-blockchain-ethereum
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 975 units with 9,759 lines of code in units (68.4% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (102 lines of code)
    • 2 medium complex units (62 lines of code)
    • 40 simple units (929 lines of code)
    • 931 very simple units (8,666 lines of code)
0% | 1% | <1% | 9% | 88%
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
ts0% | 1% | <1% | 9% | 88%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/debugAdapter0% | 3% | 2% | 10% | 83%
src/helpers0% | 3% | 1% | 21% | 72%
src/services0% | 0% | 0% | 16% | 83%
src/validators0% | 0% | 0% | 21% | 78%
src/Generators0% | 0% | 0% | 10% | 89%
src/pages0% | 0% | 0% | 21% | 78%
src/commands0% | 0% | 0% | 3% | 96%
src/resourceExplorers0% | 0% | 0% | 2% | 97%
src0% | 0% | 0% | 5% | 94%
src/Models0% | 0% | 0% | 0% | 100%
src/ARMBlockchain0% | 0% | 0% | 0% | 100%
resources/welcome0% | 0% | 0% | 0% | 100%
src/ViewItems0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function astToNetworkOptions()
in src/debugAdapter/configurationReader.ts
53 35 1
function astToNetworkOptions()
in src/helpers/truffleConfig.ts
49 32 1
24 12 1
function networkOptionsToAst()
in src/debugAdapter/configurationReader.ts
38 11 1
function isModuleExportsExpression()
in src/debugAdapter/configurationReader.ts
20 10 2
32 10 0
function isModuleExportsExpression()
in src/helpers/truffleConfig.ts
20 10 2
function networkOptionsToAst()
in src/helpers/truffleConfig.ts
35 10 1
export function generateFlowAppForMicroservice()
in src/Generators/CodeGenerator/CodeGenerator.ts
59 9 4
export async function mergeAssetsWithExisting()
in src/services/openZeppelin/OpenZeppelinService.ts
24 9 1
public async getJsonsContents()
in src/debugAdapter/contracts/contractJsonsProvider.ts
30 8 0
async function setContractParameters()
in src/helpers/openZeppelinHelper.ts
38 8 1
export async function getDeployedBytecodeByAddress()
in src/services/contract/ContractService.ts
9 8 2
function createServer()
in src/services/infuraService/codeFlowLogin.ts
39 8 0
function validateElementaryType()
in src/validators/solidityTypeValidation/index.ts
17 8 2
function comparePaths()
in src/debugAdapter/helpers.ts
15 7 2
constructor()
in src/debugAdapter/instructionsView/instructionTreeNode.ts
11 7 3
private async getContractNameByAddress()
in src/debugAdapter/transaction/transactionProvider.ts
18 7 1
51 7 4
protected async receiveMessage()
in src/pages/BasicWebView.ts
23 7 1