microsoft / vscode-maven
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 410 units with 4,681 lines of code in units (81.6% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (383 lines of code)
    • 52 medium size units (1,652 lines of code)
    • 93 small units (1,383 lines of code)
    • 260 very small units (1,263 lines of code)
0% | 8% | 35% | 29% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 9% | 34% | 31% | 25%
java0% | 0% | 41% | 20% | 37%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/handlers0% | 22% | 42% | 26% | 8%
src/completion0% | 26% | 21% | 41% | 9%
src0% | 11% | 21% | 32% | 35%
src/utils0% | 7% | 27% | 39% | 24%
src/archetype0% | 0% | 73% | 16% | 9%
jdtls.ext/com.microsoft.java.maven.plugin0% | 0% | 41% | 20% | 37%
src/jdtls0% | 0% | 64% | 13% | 21%
src/explorer0% | 0% | 13% | 34% | 52%
src/definition0% | 0% | 100% | 0% | 0%
src/hover0% | 0% | 100% | 0% | 0%
src/codeAction0% | 0% | 50% | 39% | 10%
scripts0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public async provideCompletionItems()
in src/completion/completionProvider.ts
89 22 4
async function parseTreeNodes()
in src/handlers/parseRawDependencyDataHandler.ts
87 15 5
async function doActivate()
in src/extension.ts
73 7 2
function getElementHierarchy()
in src/utils/lexerUtils.ts
71 25 3
async function insertDependencyManagement()
in src/handlers/setDependencyVersionHandler.ts
63 23 6
public Map searchByClassName()
in jdtls.ext/com.microsoft.java.maven.plugin/src/main/java/com/microsoft/java/maven/ArtifactSearcher.java
50 5 1
async function executeInBackground()
in src/utils/mavenUtils.ts
50 11 2
async function executeInTerminalHandler()
in src/archetype/ArchetypeModule.ts
47 9 1
export async function setDependencyVersionHandler()
in src/handlers/setDependencyVersionHandler.ts
47 17 1
public async run()
in src/archetype/createProject/SpecifyArchetypeVersionStep.ts
46 5 1
export async function addDependencyHandler()
in src/handlers/addDependencyHandler.ts
46 16 1
public List searchByClassName()
in jdtls.ext/com.microsoft.java.maven.plugin/src/main/java/com/microsoft/java/maven/ArtifactSearcher.java
45 13 1
public async run()
in src/archetype/createProject/SpecifyArtifactIdStep.ts
45 4 1
public async run()
in src/archetype/createProject/SpecifyGroupIdStep.ts
45 4 1
44 9 1
private static WorkspaceEdit pomEdit()
in jdtls.ext/com.microsoft.java.maven.plugin/src/main/java/com/microsoft/java/maven/AddDependencyHandler.java
43 5 2
43 6 3
export async function runFavoriteCommandsHandler()
in src/handlers/runFavoriteCommandsHandler.ts
42 9 1
public async run()
in src/archetype/createProject/SelectArchetypeStep.ts
40 3 1
public getArtifactsCodeActions()
in src/jdtls/artifactSearcher.ts
39 4 3