aws-samples / reactive-refarch-cloudformation
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
  • 10% duplication:
    • 1,760 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 176 duplicated lines
  • 15 duplicates
system10% (176 lines)
Duplication per Extension
yaml14% (150 lines)
proto100% (26 lines)
Duplication per Component (primary)
infrastructure17% (129 lines)
services/tracking-service10% (21 lines)
services/kinesis-consumer/services11% (13 lines)
services/tracking-service/reactive-vertx2% (13 lines)
services/redis-updater/model0% (0 lines)
services/redis-updater/services0% (0 lines)
services/redis-updater/cmd0% (0 lines)
services/kinesis-consumer/model0% (0 lines)
services/kinesis-consumer/cmd0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 15 longest duplicates.
See data for all 15 duplicates...
Size#FoldersFilesLinesCode
17 x 2 infrastructure
infrastructure
ecs-cluster.yaml
ecs-cluster.yaml
73:89 (12%)
108:124 (12%)
view
13 x 2 services/kinesis-consumer/services/consumer
services/tracking-servic...ve-vertx/src/main/proto
proto
tracking.proto
tracking.proto
1:15 (100%)
1:15 (100%)
view
11 x 2 infrastructure
infrastructure
lambda.yaml
lambda.yaml
49:59 (6%)
77:87 (6%)
view
10 x 2 infrastructure
infrastructure
ecs-cluster.yaml
ecs-cluster.yaml
41:50 (7%)
115:124 (7%)
view
10 x 2 infrastructure
infrastructure
ecs-cluster.yaml
ecs-cluster.yaml
41:50 (7%)
80:89 (7%)
view
10 x 2 infrastructure
infrastructure
ecs-cluster.yaml
elasticache.yaml
10:22 (7%)
15:27 (21%)
view
9 x 2 infrastructure
services/tracking-service
elasticache.yaml
service.yaml
15:25 (19%)
6:16 (4%)
view
9 x 2 infrastructure
services/tracking-service
ecs-cluster.yaml
service.yaml
10:20 (6%)
6:16 (4%)
view
7 x 2 infrastructure
infrastructure
dynamodb.yaml
ecs-cluster.yaml
6:14 (18%)
4:12 (5%)
view
6 x 2 services/tracking-service
services/tracking-service
service.yaml
service.yaml
182:187 (3%)
198:203 (3%)
view
6 x 2 infrastructure
infrastructure
security-groups.yaml
security-groups.yaml
38:44 (10%)
54:60 (10%)
view
6 x 2 infrastructure
infrastructure
dynamodb.yaml
security-groups.yaml
4:12 (16%)
4:12 (10%)
view
6 x 2 infrastructure
infrastructure
ecs-cluster.yaml
ecs-cluster.yaml
34:39 (4%)
73:78 (4%)
view
6 x 2 infrastructure
infrastructure
ecs-cluster.yaml
ecs-cluster.yaml
34:39 (4%)
108:113 (4%)
view
6 x 2 infrastructure
infrastructure
load-balancers.yaml
security-groups.yaml
5:12 (9%)
6:13 (10%)
view