golang / debug
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
  • 2% duplication:
    • 3,670 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 88 duplicated lines
  • 7 duplicates
system2% (88 lines)
Duplication per Extension
go2% (88 lines)
Duplication per Component (primary)
internal/gocore3% (64 lines)
cmd/viewcore2% (24 lines)
internal/core0% (0 lines)
internal/testenv0% (0 lines)
dwtest0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 7 longest duplicates.
See data for all 7 duplicates...
Size#FoldersFilesLinesCode
8 x 2 internal/gocore
internal/gocore
dwarf.go
dwarf.go
255:264 (2%)
307:315 (2%)
view
6 x 2 cmd/viewcore
cmd/viewcore
main.go
main.go
621:628 (1%)
733:740 (1%)
view
6 x 2 internal/gocore
internal/gocore
reverse.go
reverse.go
20:25 (8%)
28:33 (8%)
view
6 x 2 cmd/viewcore
cmd/viewcore
html.go
html.go
279:286 (1%)
289:296 (1%)
view
6 x 2 internal/gocore
internal/gocore
object.go
object.go
288:293 (2%)
301:306 (2%)
view
6 x 2 internal/gocore
internal/gocore
process.go
process.go
664:671 (1%)
687:694 (1%)
view
6 x 2 internal/gocore
internal/gocore
dwarf.go
dwarf.go
404:409 (1%)
470:475 (1%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
8 x 2 internal/gocore
internal/gocore
dominator.go
dominator.go
179:187 
188:196 
view