korosuke613 / playground
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
  • 25% duplication:
    • 1,097 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 283 duplicated lines
  • 14 duplicates
system25% (283 lines)
Duplication per Extension
yaml29% (131 lines)
tf91% (114 lines)
js43% (26 lines)
tfstate14% (12 lines)
Duplication per Component (primary)
terraform41% (152 lines)
kubernetes35% (131 lines)
zx0% (0 lines)
deno0% (0 lines)
docker0% (0 lines)
go0% (0 lines)
rust0% (0 lines)
java0% (0 lines)
earthly0% (0 lines)
aws0% (0 lines)
javascript0% (0 lines)
Longest Duplicates
The list of 14 longest duplicates.
See data for all 14 duplicates...
Size#FoldersFilesLinesCode
25 x 2 terraform/plan-test/file
terraform/terratest
1:29 (100%)
1:29 (100%)
view
17 x 2 terraform/plan-test/file
terraform/terratest
1:21 (80%)
1:21 (100%)
view
15 x 2 terraform/plan-test/file
terraform/terratest
1:19 (100%)
1:19 (100%)
view
14 x 2 kubernetes/introduction-to-kubernetes/nginx
kubernetes/introduction-...bernetes/nginx/not_used
5:18 (29%)
5:18 (73%)
view
13 x 2 terraform/learn-cdktf-docker
terraform/learn-cdktf-typescript
7:187 (100%)
7:187 (100%)
view
12 x 2 kubernetes/introduction-to-kubernetes/guestbook
kubernetes/introduction-to-kubernetes/nginx
32:44 (29%)
21:33 (25%)
view
10 x 2 kubernetes/introduction-...bernetes/nginx/not_used
kubernetes/sandbox
1:10 (100%)
1:10 (100%)
view
8 x 2 kubernetes/introduction-to-kubernetes/guestbook
kubernetes/introduction-to-kubernetes/guestbook
4:11 (26%)
4:11 (50%)
view
8 x 2 kubernetes/introduction-to-kubernetes/guestbook
kubernetes/introduction-to-kubernetes/guestbook
4:11 (26%)
4:11 (47%)
view
7 x 2 kubernetes/introduction-to-kubernetes/guestbook
kubernetes/introduction-to-kubernetes/guestbook
13:19 (23%)
13:19 (23%)
view
6 x 2 kubernetes/introduction-to-kubernetes/guestbook
kubernetes/introduction-to-kubernetes/guestbook
26:31 (20%)
26:31 (20%)
view
6 x 2 kubernetes/introduction-...bernetes/nginx/not_used
kubernetes/introduction-...bernetes/nginx/not_used
5:10 (60%)
14:19 (31%)
view
6 x 2 terraform/plan-test
terraform/plan-test
64:69 (7%)
92:97 (7%)
view
6 x 2 kubernetes/introduction-...bernetes/nginx/not_used
kubernetes/sandbox
14:19 (31%)
5:10 (60%)
view