golang / mobile
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:
    • 29,894 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,597 duplicated lines
  • 222 duplicates
system8% (2,597 lines)
Duplication per Extension
go9% (2,443 lines)
html88% (96 lines)
c4% (34 lines)
m1% (12 lines)
s22% (12 lines)
Duplication per Component (primary)
gl24% (1,976 lines)
example10% (146 lines)
bind2% (135 lines)
app5% (92 lines)
exp1% (88 lines)
internal2% (68 lines)
cmd1% (62 lines)
event4% (16 lines)
asset22% (14 lines)
geom0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 222 duplicates...
Size#FoldersFilesLinesCode
48 x 2 example/ivy/android/app/src/main/assets
example/ivy/ios/ivy
tape.html
tape.html
6:59 (100%)
6:59 (100%)
view
18 x 2 gl
gl
gl.go
gldebug.go
673:694 (1%)
2132:2151 (<1%)
view
17 x 2 gl
gl
types_debug.go
types_prod.go
53:73 (36%)
64:84 (38%)
view
16 x 2 app
app
darwin_desktop.go
darwin_ios.go
78:95 (4%)
192:209 (15%)
view
16 x 2 gl
gl
gl.go
gldebug.go
633:652 (1%)
2088:2105 (<1%)
view
16 x 2 gl
gl
gendebug.go
gldebug.go
901:922 (1%)
22:43 (<1%)
view
16 x 2 bind
bind
genclasses.go
genclasses.go
394:412 (2%)
468:486 (2%)
view
15 x 2 gl
gl
gl.go
gldebug.go
653:669 (1%)
2110:2124 (<1%)
view
15 x 2 gl
gl
gl.go
gldebug.go
287:303 (1%)
1606:1622 (<1%)
view
15 x 2 gl
gl
types_debug.go
types_prod.go
23:49 (32%)
26:60 (34%)
view
14 x 2 gl
gl
gl.go
gldebug.go
270:285 (<1%)
1585:1600 (<1%)
view
13 x 2 gl
gl
gl.go
gldebug.go
1793:1805 (<1%)
3598:3610 (<1%)
view
13 x 2 gl
gl
gl.go
gldebug.go
1125:1140 (<1%)
2722:2737 (<1%)
view
12 x 2 example/basic
example/flappy
main.go
main.go
61:72 (12%)
32:43 (21%)
view
11 x 2 gl
gl
gl.go
gldebug.go
897:909 (<1%)
2405:2417 (<1%)
view
11 x 2 gl
gl
gl.go
gldebug.go
1297:1308 (<1%)
2934:2945 (<1%)
view
11 x 2 gl
gl
gl.go
gldebug.go
321:331 (<1%)
1648:1658 (<1%)
view
11 x 2 gl
gl
gl.go
gldebug.go
1271:1282 (<1%)
2912:2923 (<1%)
view
11 x 2 gl
gl
gl.go
gldebug.go
698:710 (<1%)
2160:2172 (<1%)
view
11 x 2 gl
gl
gl.go
gldebug.go
305:315 (<1%)
1628:1638 (<1%)
view
Duplicated Units
The list of top 9 duplicated units.
See data for all 9 unit duplicates...
Size#FoldersFilesLinesCode
16 x 2 bind
bind
genclasses.go
genclasses.go
834:850 
852:868 
view
13 x 2 gl
gl
gldebug.go
gendebug.go
22:35 
901:914 
view
10 x 3 exp/f32
exp/f32
exp/f32
mat4.go
affine.go
mat3.go
33:43 
31:41 
30:40 
view
9 x 2 asset
asset
asset_desktop.go
asset_darwin_armx.go
15:24 
16:25 
view
8 x 2 exp/font
exp/font
font_linux.go
font_linux.go
12:21 
23:32 
view
8 x 2 exp/sprite/glsprite
exp/sprite/portable
glsprite.go
portable.go
70:79 
62:72 
view
7 x 2 gl
gl
gl.go
gldebug.go
766:773 
2246:2253 
view
7 x 2 gl
gl
types_prod.go
types_debug.go
70:77 
59:66 
view
6 x 3 bind
internal/importers/java
internal/importers/objc
genclasses.go
java.go
objc.go
415:421 
1176:1182 
854:860 
view