golang / freetype
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 8% duplication:
    • 4,309 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 371 duplicated lines
  • 36 duplicates
system8% (371 lines)
Duplication per Extension
go8% (371 lines)
Duplication per Component (primary)
truetype3% (74 lines)
example/drawer69% (72 lines)
example/freetype74% (72 lines)
raster5% (54 lines)
ROOT15% (28 lines)
example/raster16% (21 lines)
example/capjoin46% (21 lines)
example/gamma31% (15 lines)
example/round25% (14 lines)
cmd/print-glyph-points0% (0 lines)
example/truetype0% (0 lines)
example/genbasicfont0% (0 lines)

Duplication Between Components (50+ lines)

G example/drawer example/drawer example/freetype example/freetype example/drawer--example/freetype 144 ROOT ROOT truetype truetype ROOT--truetype 56

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 36 duplicates...
Size#FoldersFilesLinesCode
41 x 2 example/drawer
example/freetype
main.go
main.go
43:87 (39%)
39:83 (42%)
view
15 x 2 example/freetype
example/gamma
main.go
main.go
132:149 (15%)
68:85 (31%)
view
15 x 2 example/drawer
example/raster
main.go
main.go
140:157 (14%)
167:184 (12%)
view
15 x 2 example/capjoin
example/drawer
main.go
main.go
67:84 (33%)
140:157 (14%)
view
15 x 2 example/capjoin
example/freetype
main.go
main.go
67:84 (33%)
132:149 (15%)
view
15 x 2 example/freetype
example/raster
main.go
main.go
132:149 (15%)
167:184 (12%)
view
15 x 2 example/gamma
example/raster
main.go
main.go
68:85 (31%)
167:184 (12%)
view
15 x 2 example/drawer
example/freetype
main.go
main.go
140:157 (14%)
132:149 (15%)
view
15 x 2 example/capjoin
example/gamma
main.go
main.go
67:84 (33%)
68:85 (31%)
view
15 x 2 example/drawer
example/gamma
main.go
main.go
140:157 (14%)
68:85 (31%)
view
15 x 2 example/capjoin
example/raster
main.go
main.go
67:84 (33%)
167:184 (12%)
view
14 x 2 ROOT
truetype
freetype.go
face.go
105:120 (7%)
419:434 (5%)
view
14 x 2 raster
raster
paint.go
paint.go
45:63 (9%)
85:103 (9%)
view
12 x 2 raster
raster
paint.go
paint.go
45:60 (7%)
128:143 (7%)
view
12 x 2 raster
raster
paint.go
paint.go
85:100 (7%)
128:143 (7%)
view
11 x 2 truetype
truetype
hint.go
hint.go
1176:1192 (<1%)
1251:1267 (<1%)
view
10 x 2 raster
truetype
paint.go
face.go
47:60 (6%)
485:498 (3%)
view
10 x 2 raster
truetype
paint.go
face.go
130:143 (6%)
485:498 (3%)
view
10 x 2 raster
truetype
paint.go
face.go
87:100 (6%)
485:498 (3%)
view
8 x 2 example/gamma
example/round
main.go
main.go
76:85 (17%)
100:109 (14%)
view