microsoft / inventory-hub-java-on-azure
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 112 units with 798 lines of code in units (53.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (117 lines of code)
    • 3 simple units (81 lines of code)
    • 108 very simple units (600 lines of code)
0% | 0% | 14% | 10% | 75%
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
java0% | 0% | 17% | 12% | 70%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
function-apps/Update-Product-Inventory/src/main/java/org/inventory/hub0% | 0% | 100% | 0% | 0%
dashboard-web-app/src/main/java/org/inventory/hub/controller0% | 0% | 0% | 34% | 65%
dashboard-web-app/src/main/java/org/inventory/hub/model0% | 0% | 0% | 20% | 79%
dashboard-web-app/src/main/java/org/inventory/hub/event0% | 0% | 0% | 0% | 100%
dashboard-web-app/src/main/resources/static0% | 0% | 0% | 0% | 100%
dashboard-web-app/src/main/resources/static/Scripts0% | 0% | 0% | 0% | 100%
function-apps/Append-Transaction/src/main/java/org/inventory/hub0% | 0% | 0% | 0% | 100%
dashboard-web-app/src/main/java/org/inventory/hub0% | 0% | 0% | 0% | 100%
function-apps/Point-Of-Transaction/src/main/java/org/inventory/hub0% | 0% | 0% | 0% | 100%
function-apps/Notify-Inventory/src/main/java/org/inventory/hub0% | 0% | 0% | 0% | 100%
dashboard-web-app/src/main/java/org/inventory/hub/security0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public void update()
in function-apps/Update-Product-Inventory/src/main/java/org/inventory/hub/UpdateProductInventory.java
117 15 5
public ResponseEntity getProducts()
in dashboard-web-app/src/main/java/org/inventory/hub/controller/ProductsInventoryController.java
55 8 0
public boolean equals()
in dashboard-web-app/src/main/java/org/inventory/hub/model/Location.java
13 6 1
public boolean equals()
in dashboard-web-app/src/main/java/org/inventory/hub/model/ProductsInventory.java
13 6 1
public ResponseEntity getLocations()
in dashboard-web-app/src/main/java/org/inventory/hub/controller/ProductsInventoryController.java
35 5 0
public boolean equals()
in dashboard-web-app/src/main/java/org/inventory/hub/model/Product.java
10 4 1
public ResponseEntity getProduct()
in dashboard-web-app/src/main/java/org/inventory/hub/controller/ProductsInventoryController.java
25 3 1
public ResponseEntity getTransactions()
in dashboard-web-app/src/main/java/org/inventory/hub/controller/TransactionsController.java
15 3 0
public String toString()
in dashboard-web-app/src/main/java/org/inventory/hub/event/Transaction.java
15 3 0
public void addFirst()
in dashboard-web-app/src/main/java/org/inventory/hub/event/TransactionsFIFO.java
12 3 1
public void receiveTransaction()
in dashboard-web-app/src/main/java/org/inventory/hub/InventoryHub.java
14 2 1
private static Collection makeCollection()
in dashboard-web-app/src/main/java/org/inventory/hub/controller/ProductsInventoryController.java
7 2 1
public String currentUsername()
in dashboard-web-app/src/main/java/org/inventory/hub/controller/SecurityController.java
12 2 1
protected void configure()
in dashboard-web-app/src/main/java/org/inventory/hub/security/WebSecurityConfiguration.java
13 2 1
$scope.fetchUsername = function()
in dashboard-web-app/src/main/resources/static/Scripts/homeCtrl.js
13 2 0
function setConnected()
in dashboard-web-app/src/main/resources/static/app.js
11 2 1
function disconnect()
in dashboard-web-app/src/main/resources/static/app.js
7 2 0
public void sell()
in function-apps/Point-Of-Transaction/src/main/java/org/inventory/hub/POT.java
19 2 2
public static void main()
in dashboard-web-app/src/main/java/org/inventory/hub/InventoryHub.java
3 1 1
public void errorGlobal()
in dashboard-web-app/src/main/java/org/inventory/hub/InventoryHub.java
3 1 1