GerritCodeReview / java-prettify
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 205 units with 2,430 lines of code in units (75.0% of code).
    • 2 very long units (287 lines of code)
    • 10 long units (656 lines of code)
    • 12 medium size units (341 lines of code)
    • 35 small units (505 lines of code)
    • 146 very small units (641 lines of code)
11% | 26% | 14% | 20% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java11% | 26% | 14% | 20% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
prettify/parser21% | 42% | 11% | 10% | 14%
syntaxhighlight13% | 5% | 10% | 21% | 48%
prettify/theme0% | 100% | 0% | 0% | 0%
prettify/lang0% | 16% | 25% | 42% | 15%
prettify/example0% | 0% | 100% | 0% | 0%
prettify0% | 0% | 0% | 80% | 20%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public Prettify()
in src/prettify/parser/Prettify.java
155 3 0
public SyntaxHighlighterPane()
in src/syntaxhighlight/SyntaxHighlighterPane.java
132 23 0
protected CreateSimpleLexer sourceDecorator()
in src/prettify/parser/Prettify.java
87 12 1
public LangMumps()
in src/prettify/lang/LangMumps.java
83 1 0
protected String allowAnywhereFoldCaseAndRenumberGroups()
in src/prettify/parser/CombinePrefixPattern.java
77 25 1
public void decorate()
in src/prettify/parser/Prettify.java
69 16 1
protected static String caseFoldCharset()
in src/prettify/parser/CombinePrefixPattern.java
67 18 1
public ThemeDesert()
in src/prettify/theme/ThemeDesert.java
58 1 0
public ThemeDefault()
in src/prettify/theme/ThemeDefault.java
58 1 0
public ThemeSunburst()
in src/prettify/theme/ThemeSunburst.java
53 1 0
public ThemeSonsOfObsidian()
in src/prettify/theme/ThemeSonsOfObsidian.java
52 1 0
public void paint()
in src/syntaxhighlight/JTextComponentRowHeader.java
52 6 1
public JTextComponentRowHeader()
in src/syntaxhighlight/JTextComponentRowHeader.java
48 5 2
public static List removeDuplicates()
in src/prettify/parser/Util.java
32 10 2
public static void main()
in src/prettify/example/Example.java
31 3 1
public LangDart()
in src/prettify/lang/LangDart.java
31 1 0
public LangN()
in src/prettify/lang/LangN.java
30 2 0
public String toString()
in src/syntaxhighlight/Theme.java
30 2 0
public LangCss()
in src/prettify/lang/LangCss.java
26 1 0
protected CreateSimpleLexer()
in src/prettify/parser/Prettify.java
25 6 2