aws-samples / graviton2-workshop
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
  • 30% duplication:
    • 1,334 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 406 duplicated lines
  • 24 duplicates
system30% (406 lines)
Duplication per Extension
py31% (223 lines)
yaml33% (122 lines)
yml51% (47 lines)
java12% (14 lines)
Duplication per Component (primary)
graviton2/cs_graviton39% (172 lines)
scripts27% (117 lines)
graviton2/rds_graviton44% (52 lines)
graviton2/cs_graviton/app56% (40 lines)
src/main/java/com12% (14 lines)
graviton2/elasticsearch_graviton/lambdas42% (11 lines)
ROOT0% (0 lines)
graviton2/vpc_base0% (0 lines)
graviton2/cs_graviton/app/nodejs_code0% (0 lines)
graviton2/elasticsearch_graviton0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 24 duplicates...
Size#FoldersFilesLinesCode
34 x 2 scripts
scripts
cfn-template.yaml
cfn-template.yaml
115:150 (14%)
165:200 (14%)
view
17 x 2 graviton2/cs_graviton
graviton2/cs_graviton
pipeline_graviton2.py
pipeline_netcore_graviton2.py
104:124 (14%)
62:81 (26%)
view
17 x 2 graviton2/cs_graviton
graviton2/cs_graviton
pipeline_graviton2.py
pipeline_netcore_graviton2.py
22:41 (14%)
22:41 (26%)
view
12 x 2 graviton2/cs_graviton
graviton2/cs_graviton
pipeline_graviton2.py
pipeline_netcore_graviton2.py
63:74 (10%)
46:57 (18%)
view
12 x 2 graviton2/cs_graviton/app
graviton2/cs_graviton/app
arm64-buildspec.yml
x86-buildspec.yml
11:22 (57%)
11:22 (57%)
view
11 x 2 graviton2/elasticsearch_graviton/lambdas
scripts
insert_into_index.py
elasticsearch-generate-data.py
25:37 (42%)
29:41 (32%)
view
10 x 2 scripts
scripts
cfn-template.yaml
cfn-template.yaml
103:113 (4%)
153:163 (4%)
view
10 x 2 graviton2/rds_graviton
graviton2/rds_graviton
rds_mysql_8.py
rds_restore.py
28:37 (33%)
32:41 (32%)
view
9 x 2 graviton2/rds_graviton
graviton2/rds_graviton
rds2.py
rds_mysql_5.py
18:26 (36%)
18:26 (30%)
view
9 x 2 graviton2/cs_graviton
graviton2/cs_graviton
Deployment-aspnet.yaml
Deployment.yaml
42:50 (13%)
42:50 (13%)
view
8 x 2 graviton2/cs_graviton/app
graviton2/cs_graviton/app
arm64-buildspec.yml
x86-buildspec.yml
1:9 (38%)
1:9 (38%)
view
8 x 2 graviton2/cs_graviton
graviton2/cs_graviton
Deployment-aspnet.yaml
Deployment.yaml
51:58 (12%)
52:59 (12%)
view
7 x 2 src/main/java/com/company/example/web/bookshop
src/main/java/com/company/example/web/bookshop
VertxBookShopREST.java
VertxBookShopREST.java
69:76 (6%)
131:137 (6%)
view
7 x 2 graviton2/cs_graviton/app
graviton2/cs_graviton
x86-buildspec.yml
arm64-dotnet-buildspec.yml
1:8 (33%)
1:8 (35%)
view
7 x 2 scripts
scripts
elasticsearch-generate-data.py
elasticsearch-search.py
35:41 (20%)
29:35 (18%)
view
7 x 2 graviton2/cs_graviton
graviton2/cs_graviton
pipeline_graviton2.py
pipeline_netcore_graviton2.py
129:135 (5%)
81:87 (10%)
view
7 x 2 graviton2/rds_graviton
graviton2/rds_graviton
rds2.py
rds_mysql_8.py
18:24 (28%)
18:24 (23%)
view
7 x 2 graviton2/cs_graviton
graviton2/cs_graviton
pipeline_graviton2.py
pipeline_graviton2.py
53:59 (5%)
79:85 (5%)
view
7 x 2 graviton2/rds_graviton
graviton2/rds_graviton
rds_mysql_5.py
rds_mysql_8.py
18:24 (23%)
18:24 (23%)
view
7 x 2 scripts
scripts
elasticsearch-generate-data.py
elasticsearch-search.py
23:31 (20%)
19:27 (18%)
view