kubernetes / release
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
  • 15% duplication:
    • 25,465 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,894 duplicated lines
  • 607 duplicates
system15% (3,894 lines)
Duplication per Extension
go14% (3,568 lines)
yaml21% (261 lines)
spec15% (65 lines)
Duplication per Component (primary)
pkg/anago26% (1,608 lines)
pkg/changelog25% (559 lines)
pkg/release9% (401 lines)
pkg/kubepkg17% (147 lines)
pkg/notes9% (144 lines)
packages/deb33% (133 lines)
pkg/fastforward7% (110 lines)
pkg/build14% (109 lines)
images/build22% (92 lines)
cmd/krel4% (92 lines)
pkg/gcp7% (89 lines)
pkg/kubecross64% (69 lines)
cmd/kubepkg20% (69 lines)
pkg/testgrid25% (62 lines)
gcb/release96% (61 lines)
gcb/stage74% (49 lines)
gcb/fast-forward71% (41 lines)
pkg/mail5% (14 lines)
images/releng7% (12 lines)
pkg/cve4% (12 lines)
packages/rpm3% (8 lines)
pkg/binary1% (7 lines)
images/k8s-cloud-builder5% (6 lines)
cmd/publish-release0% (0 lines)
cmd/ci-reporter0% (0 lines)
cmd/gcbuilder0% (0 lines)
cmd/schedule-builder0% (0 lines)
cmd/release-notes0% (0 lines)
pkg/testing0% (0 lines)
pkg/announce0% (0 lines)
pkg/version0% (0 lines)
ROOT0% (0 lines)
internal0% (0 lines)
config0% (0 lines)

Duplication Between Components (50+ lines)

G pkg/anago pkg/anago pkg/changelog pkg/changelog pkg/anago--pkg/changelog 475 pkg/release pkg/release pkg/anago--pkg/release 331 pkg/gcp pkg/gcp pkg/anago--pkg/gcp 210 pkg/fastforward pkg/fastforward pkg/anago--pkg/fastforward 204 pkg/build pkg/build pkg/anago--pkg/build 155 pkg/changelog--pkg/release 377 pkg/kubepkg pkg/kubepkg pkg/changelog--pkg/kubepkg 292 pkg/changelog--pkg/fastforward 142 pkg/kubecross pkg/kubecross pkg/changelog--pkg/kubecross 92 pkg/testgrid pkg/testgrid pkg/changelog--pkg/testgrid 64 pkg/notes pkg/notes pkg/changelog--pkg/notes 112 pkg/release--pkg/testgrid 151 pkg/kubepkg--pkg/release 146 pkg/gcp--pkg/release 94 pkg/fastforward--pkg/release 56 pkg/build--pkg/changelog 192 pkg/build--pkg/release 56 pkg/kubecross--pkg/release 151 pkg/kubecross--pkg/testgrid 124 pkg/notes--pkg/release 56 gcb/release gcb/release gcb/stage gcb/stage gcb/release--gcb/stage 98 gcb/fast-forward gcb/fast-forward gcb/fast-forward--gcb/release 82 gcb/fast-forward--gcb/stage 58 pkg/mail pkg/mail pkg/mail--pkg/release 63 pkg/binary pkg/binary pkg/binary--pkg/release 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 607 duplicates...
Size#FoldersFilesLinesCode
57 x 2 pkg/changelog/changelogfakes
pkg/kubepkg/kubepkgfakes
fake_impl.go
fake_impl.go
2036:2110 (3%)
354:428 (17%)
view
51 x 2 pkg/changelog/changelogfakes
pkg/kubepkg/kubepkgfakes
fake_impl.go
fake_impl.go
1398:1463 (3%)
161:226 (15%)
view
49 x 2 pkg/build/buildfakes
pkg/changelog/changelogfakes
fake_impl.go
fake_impl.go
204:265 (19%)
1274:1335 (2%)
view
49 x 2 pkg/changelog/changelogfakes
pkg/fastforward/fastforwardfakes
fake_impl.go
fake_impl.go
1529:1592 (2%)
919:982 (3%)
view
41 x 2 gcb/fast-forward
gcb/release
cloudbuild.yaml
cloudbuild.yaml
1:57 (71%)
1:57 (65%)
view
29 x 2 gcb/release
gcb/stage
cloudbuild.yaml
cloudbuild.yaml
19:50 (46%)
20:51 (43%)
view
29 x 2 gcb/fast-forward
gcb/stage
cloudbuild.yaml
cloudbuild.yaml
19:50 (50%)
20:51 (43%)
view
25 x 2 pkg/anago/anagofakes
pkg/anago/anagofakes
fake_release_client.go
fake_stage_client.go
73:107 (3%)
73:107 (3%)
view
24 x 2 pkg/changelog
pkg/notes/document
const.go
template.go
37:68 (25%)
36:67 (39%)
view
22 x 2 pkg/notes
pkg/notes
notes.go
notes_v2.go
464:498 (3%)
165:199 (13%)
view
22 x 2 pkg/anago/anagofakes
pkg/changelog/changelogfakes
fake_stage_impl.go
fake_impl.go
398:424 (<1%)
287:313 (1%)
view
21 x 2 pkg/changelog/changelogfakes
pkg/kubecross/kubecrossfakes
fake_impl.go
fake_impl.go
1063:1086 (1%)
82:105 (25%)
view
19 x 2 images/build/debian-iptables
images/build/setcap
cloudbuild.yaml
cloudbuild.yaml
16:38 (46%)
16:38 (46%)
view
19 x 2 packages/deb
packages/deb
build.go
build.go
433:454 (4%)
478:499 (4%)
view
19 x 2 packages/deb
packages/deb
build.go
build.go
409:430 (4%)
478:499 (4%)
view
19 x 2 packages/deb
packages/deb
build.go
build.go
409:430 (4%)
433:454 (4%)
view
18 x 2 pkg/build/buildfakes
pkg/changelog/changelogfakes
fake_impl.go
fake_impl.go
119:139 (7%)
561:581 (1%)
view
17 x 2 pkg/anago/anagofakes
pkg/anago/anagofakes
fake_release_impl.go
fake_stage_impl.go
864:882 (1%)
1311:1329 (<1%)
view
17 x 2 pkg/anago/anagofakes
pkg/gcp/gcb/gcbfakes
fake_release_impl.go
fake_release.go
864:882 (1%)
65:83 (11%)
view
17 x 2 pkg/anago/anagofakes
pkg/gcp/gcb/gcbfakes
fake_stage_impl.go
fake_release.go
1311:1329 (<1%)
65:83 (11%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 82 unit duplicates...
Size#FoldersFilesLinesCode
24 x 2 pkg/changelog/changelogfakes
pkg/kubepkg/kubepkgfakes
fake_impl.go
fake_impl.go
2040:2064 
358:382 
view
20 x 3 pkg/gcp/gcb/gcbfakes
pkg/anago/anagofakes
pkg/anago/anagofakes
fake_release.go
fake_stage_impl.go
fake_release_impl.go
64:84 
1310:1330 
863:883 
view
19 x 2 pkg/changelog/changelogfakes
pkg/anago/anagofakes
fake_impl.go
fake_stage_impl.go
521:540 
880:899 
view
19 x 2 pkg/anago/anagofakes
pkg/anago/anagofakes
fake_stage_impl.go
fake_release_impl.go
636:655 
372:391 
view
18 x 2 pkg/changelog/changelogfakes
pkg/anago/anagofakes
fake_impl.go
fake_stage_impl.go
1595:1613 
2287:2305 
view
18 x 2 pkg/changelog/changelogfakes
pkg/anago/anagofakes
fake_impl.go
fake_stage_impl.go
1660:1678 
2352:2370 
view
18 x 2 pkg/kubecross/kubecrossfakes
pkg/testgrid/testgridfakes
fake_impl.go
fake_client.go
43:61 
45:63 
view
17 x 2 pkg/fastforward/fastforwardfakes
pkg/changelog/changelogfakes
fake_impl.go
fake_impl.go
924:941 
1534:1551 
view
17 x 3 pkg/fastforward/fastforwardfakes
pkg/anago/anagofakes
pkg/anago/anagofakes
fake_impl.go
fake_stage_impl.go
fake_release_impl.go
1528:1545 
2541:2558 
1452:1469 
view
17 x 2 pkg/changelog/changelogfakes
pkg/anago/anagofakes
fake_impl.go
fake_stage_impl.go
768:785 
1005:1022 
view
17 x 3 pkg/changelog/changelogfakes
pkg/release/releasefakes
pkg/release/releasefakes
fake_impl.go
fake_publisher_client.go
fake_version_client.go
1025:1042 
658:675 
44:61 
view
17 x 3 pkg/changelog/changelogfakes
pkg/build/buildfakes
pkg/anago/anagofakes
fake_impl.go
fake_impl.go
fake_stage_impl.go
1274:1291 
204:221 
1976:1993 
view
17 x 3 pkg/changelog/changelogfakes
pkg/release/releasefakes
pkg/kubepkg/kubepkgfakes
fake_impl.go
fake_publisher_client.go
fake_impl.go
1402:1419 
850:867 
165:182 
view
17 x 2 pkg/anago/anagofakes
pkg/anago/anagofakes
fake_release_client.go
fake_stage_client.go
718:735 
665:682 
view
17 x 2 pkg/anago/anagofakes
pkg/anago/anagofakes
fake_stage_impl.go
fake_release_impl.go
819:836 
491:508 
view
17 x 2 pkg/anago/anagofakes
pkg/anago/anagofakes
fake_stage_impl.go
fake_release_impl.go
2665:2682 
1513:1530 
view
16 x 4 pkg/anago/anagofakes
pkg/anago/anagofakes
pkg/anago/anagofakes
pkg/anago/anagofakes
fake_release_client.go
fake_stage_client.go
fake_stage_impl.go
fake_release_impl.go
217:233 
217:233 
766:782 
438:454 
view
16 x 2 pkg/anago/anagofakes
pkg/anago/anagofakes
fake_release_client.go
fake_stage_client.go
323:339 
270:286 
view
16 x 2 pkg/anago/anagofakes
pkg/anago/anagofakes
fake_release_client.go
fake_stage_client.go
429:445 
429:445 
view
16 x 2 pkg/anago/anagofakes
pkg/anago/anagofakes
fake_release_client.go
fake_stage_client.go
482:498 
482:498 
view