Cyclomatic complexity
Also known as: CC max · CC avg · CC
What it is
Cyclomatic complexity counts independent paths through control flow. Each conditional branch (if, else if, while, for, catch, case, ternary) adds one to the count. A method with no branches has a cyclomatic complexity of 1. A method with five branches has a cyclomatic complexity of 6. For Java and Kotlin, AtlasArc.io computes method-backed values and can name the top class and method. TypeScript artifact analysis imports supported SARIF complexity findings and can name the top source file. CC max is the strongest available finding beneath the selected architecture unit; CC avg is the mean across its available findings.
Why it matters
Higher cyclomatic complexity means more linearly independent paths to account for when you design tests. The score is not a one-test-per-point formula: a CC of 10 neither prescribes exactly ten tests nor guarantees branch coverage when ten tests exist. At the package or source-folder level, CC max exposes the strongest outlier and CC avg shows how widely the path complexity is distributed. A low average with a high maximum points you toward one contributor instead of smearing its signal across the aggregate.
What a high value usually means
High CC max means at least one contributor carries a large number of control-flow paths. Values above 10 are worth investigating, with the exact contributor and its role deciding the outcome. High CC avg means the path complexity is spread more broadly. The cause may be accidental nesting or repeated decision logic, but it may also be an intentional parser, state machine, dispatch table, validator, or decision engine.
What a low value usually means
Low CC max and CC avg mean the contributors contain relatively few independent paths. Utility methods, data classes, and pure functions naturally land here. The metric describes control-flow shape, not whether the surrounding package has the right responsibilities or boundary.
When not to overinterpret it
Cyclomatic complexity is aggregated from contributor-level evidence. A high package or source-folder value does not mean its design is wrong; it may contain one complex parser, validator, or decision engine whose complexity is inherent to the problem. Read it alongside class or source-file count and lines of code. One contributor driving the maximum calls for a different investigation than path complexity distributed throughout the aggregate.
Where AtlasArc shows it
CC max in the Hotspots bubble chart as an optional Y axis. Both CC max and CC avg as heatmap colour overlays on the Topology Graph, Package Matrix, and Composition view. CC max in the Subsystems bubble chart. CC max and CC avg in Metrics for supported packages, classes, source folders, and source files.
How AtlasArc computes it
For Java and Kotlin, cyclomatic complexity per method = number of binary decisions (if, else if, for, while, do, case, catch, ternary, &&, ||) plus 1. TypeScript values are imported from supported SARIF findings. CC max is the highest available contributor value in the selected architecture unit; CC avg is the mean of those values.