microsoft / lsif-java
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 249 units with 1,824 lines of code in units (70.3% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (126 lines of code)
    • 14 medium size units (401 lines of code)
    • 33 small units (476 lines of code)
    • 200 very small units (821 lines of code)
0% | 6% | 21% | 26% | 45%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 6% | 22% | 26% | 44%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/indexer0% | 11% | 14% | 27% | 46%
com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors0% | 8% | 39% | 24% | 28%
com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/protocol0% | 0% | 10% | 0% | 89%
com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal0% | 0% | 9% | 57% | 33%
com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/emitter0% | 0% | 0% | 42% | 57%
cmd/scripts0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private boolean generateExportPackageInformation()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/indexer/Indexer.java
69 15 4
private ImportPackageMetaData generateImportMonikerData()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/SymbolData.java
57 14 4
private void resolve()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/LsifVisitor.java
42 6 4
private void buildIndex()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/indexer/Indexer.java
38 5 3
public void enlist()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/DiagnosticVisitor.java
38 6 0
private String resolveManager()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/SymbolData.java
34 9 4
synchronized public void resolveMoniker()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/SymbolData.java
32 9 4
public static CompilationUnit createAST()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/indexer/ASTUtil.java
30 10 2
public boolean equals()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/protocol/Range.java
27 10 1
private static Range convertRange()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/DiagnosticVisitor.java
26 4 2
synchronized public void resolveDefinition()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/SymbolData.java
25 4 3
synchronized public void generateImportMoniker()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/SymbolData.java
23 4 7
private List getAllSourceFiles()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/indexer/Indexer.java
22 9 1
synchronized public void generateExportMoniker()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/SymbolData.java
22 4 4
public void start()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/LanguageServerIndexerPlugin.java
21 4 1
public static File findPomFromFolder()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/VisitorUtils.java
21 9 2
synchronized public void resolveTypeDefinition()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/SymbolData.java
19 3 3
public static boolean isEmptyHover()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/visitors/VisitorUtils.java
19 8 1
public static Location toLocation()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/JdtlsUtils.java
18 6 2
public static ISourceRange getNameRange()
in com.microsoft.java.lsif.core/src/com/microsoft/java/lsif/core/internal/JdtlsUtils.java
18 8 1