awslabs / aws-go-multi-module-repository-tools
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
  • 4% duplication:
    • 2,969 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 134 duplicated lines
  • 15 duplicates
system4% (134 lines)
Duplication per Extension
go4% (134 lines)
Duplication per Component (primary)
cmd/generatechangelog18% (48 lines)
cmd/calculaterelease44% (24 lines)
cmd/moduleversion34% (22 lines)
cmd/updatemodulemeta18% (21 lines)
git10% (12 lines)
changelog3% (7 lines)
ROOT0% (0 lines)
gomod0% (0 lines)
manifest0% (0 lines)
release0% (0 lines)
internal/semver0% (0 lines)
cmd/updaterequires0% (0 lines)
cmd/gomodgen0% (0 lines)
cmd/changelog0% (0 lines)
cmd/eachmodule0% (0 lines)
cmd/makerelative0% (0 lines)
cmd/editmoduledependency0% (0 lines)
cmd/tagrelease0% (0 lines)
cmd/annotatestablegen0% (0 lines)
Longest Duplicates
The list of 15 longest duplicates.
See data for all 15 duplicates...
Size#FoldersFilesLinesCode
17 x 2 cmd/generatechangelog
cmd/generatechangelog
summary.go
summary.go
17:39 (14%)
57:79 (14%)
view
16 x 2 cmd/calculaterelease
cmd/moduleversion
main.go
main.go
43:68 (29%)
46:71 (25%)
view
7 x 2 cmd/generatechangelog
cmd/generatechangelog
summary.go
summary.go
71:79 (6%)
98:106 (6%)
view
7 x 2 cmd/generatechangelog
cmd/generatechangelog
summary.go
summary.go
31:39 (6%)
98:106 (6%)
view
7 x 2 cmd/generatechangelog
cmd/updatemodulemeta
summary.go
main.go
98:106 (6%)
176:184 (6%)
view
7 x 2 cmd/calculaterelease
cmd/updatemodulemeta
main.go
main.go
40:49 (12%)
38:47 (6%)
view
7 x 2 cmd/generatechangelog
cmd/updatemodulemeta
main.go
main.go
146:156 (7%)
192:202 (6%)
view
7 x 2 changelog
cmd/updatemodulemeta
annotation.go
main.go
99:107 (7%)
176:184 (6%)
view
7 x 2 changelog
cmd/generatechangelog
annotation.go
summary.go
99:107 (7%)
71:79 (6%)
view
7 x 2 changelog
cmd/generatechangelog
annotation.go
summary.go
99:107 (7%)
98:106 (6%)
view
7 x 2 cmd/generatechangelog
cmd/updatemodulemeta
summary.go
main.go
71:79 (6%)
176:184 (6%)
view
7 x 2 changelog
cmd/generatechangelog
annotation.go
summary.go
99:107 (7%)
31:39 (6%)
view
7 x 2 cmd/generatechangelog
cmd/updatemodulemeta
summary.go
main.go
31:39 (6%)
176:184 (6%)
view
6 x 2 cmd/calculaterelease
cmd/moduleversion
main.go
main.go
19:27 (11%)
108:116 (9%)
view
6 x 2 git
git
diff.go
diff.go
12:20 (27%)
27:35 (27%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
9 x 2 cmd/generatechangelog
cmd/updatemodulemeta
main.go
main.go
146:157 
192:203 
view