microsoft / vscode-java-dependency
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 382 units with 4,178 lines of code in units (77.3% of code).
    • 1 very long units (107 lines of code)
    • 8 long units (561 lines of code)
    • 40 medium size units (1,225 lines of code)
    • 69 small units (1,044 lines of code)
    • 264 very small units (1,241 lines of code)
2% | 13% | 29% | 24% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts3% | 14% | 25% | 24% | 31%
java0% | 11% | 38% | 26% | 23%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/exportJarSteps12% | 33% | 28% | 15% | 9%
jdtls.ext/com.microsoft.jdtls.ext.core0% | 11% | 39% | 26% | 22%
src/views0% | 7% | 19% | 30% | 42%
src/languageServerApi0% | 70% | 0% | 15% | 14%
src0% | 0% | 36% | 26% | 37%
src/explorerCommands0% | 0% | 43% | 25% | 30%
src/controllers0% | 0% | 16% | 34% | 48%
src/java0% | 0% | 0% | 19% | 80%
jdtls.ext/com.microsoft.jdtls.ext.activator0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
templates/invisible-project0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private async generateClasspaths()
in src/exportJarSteps/GenerateJarExecutor.ts
107 19 1
constructor()
in src/views/dependencyExplorer.ts
85 13 1
public static List resolvePath()
in jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core/PackageCommand.java
83 20 2
private async resolveClasspaths()
in src/exportJarSteps/ExportJarTaskProvider.ts
81 21 4
private async generateJar()
in src/exportJarSteps/GenerateJarExecutor.ts
68 15 1
private async resolveJavaProject()
in src/exportJarSteps/ResolveJavaProjectExecutor.ts
68 13 1
private async resolveMainClass()
in src/exportJarSteps/ResolveMainClassExecutor.ts
66 7 1
private static List getPackageFragmentRoots()
in jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core/PackageCommand.java
55 12 2
public async initializeJavaLanguageServerApi()
in src/languageServerApi/languageServerApiManager.ts
55 14 1
private static List convertToPackageNode()
in jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core/PackageCommand.java
49 11 3
public static List getMainClasses()
in jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core/ProjectCommand.java
48 12 2
public async provideTasks()
in src/exportJarSteps/ExportJarTaskProvider.ts
48 10 0
private static boolean exportJarExecution()
in jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core/ProjectCommand.java
45 10 5
private static List getRootTypes()
in jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core/PackageCommand.java
44 11 2
public async open()
in src/exportJarSteps/ExportJarTaskProvider.ts
43 9 1
41 9 1
async function inferPackageFsPath()
in src/explorerCommands/new.ts
41 16 0
private static List getFolderChildren()
in jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core/PackageCommand.java
37 12 2
async function getPackageFsPath()
in src/explorerCommands/new.ts
37 10 1
private async createJarFile()
in src/exportJarSteps/ExportJarTaskProvider.ts
37 9 1