aws-samples / aws-hpc-tutorials
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
  • 14% duplication:
    • 783 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 110 duplicated lines
  • 15 duplicates
system14% (110 lines)
Duplication per Extension
yaml29% (110 lines)
Duplication per Component (primary)
content/02-aws-getting-started/04-start_cloud9.files25% (58 lines)
static/scripts/aws_batch36% (40 lines)
static/scripts/dcv_license30% (12 lines)
static/css0% (0 lines)
ROOT0% (0 lines)
layouts/partials0% (0 lines)

Duplication Between Components (50+ lines)

G content/02-aws-getting-started/04-start_cloud9.files content/02-aws-getting-started/04-start_cloud9.files static/scripts/aws_batch static/scripts/aws_batch content/02-aws-getting-started/04-start_cloud9.files--static/scripts/aws_batch 50

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 15 longest duplicates.
See data for all 15 duplicates...
Size#FoldersFilesLinesCode
12 x 2 static/scripts/aws_batch
static/scripts/dcv_license
s3policy.yaml
cfn_dcv_policy.yaml
49:60 (10%)
30:41 (30%)
view
11 x 2 static/scripts/aws_batch
static/scripts/aws_batch
s3policy.yaml
s3policy.yaml
70:80 (9%)
95:105 (9%)
view
11 x 2 content/02-aws-getting-s...d/04-start_cloud9.files
static/scripts/dcv_license
infrastructure-plane-VPC-1-1_subnet_C...
cfn_dcv_policy.yaml
170:180 (4%)
30:40 (28%)
view
11 x 2 content/02-aws-getting-s...d/04-start_cloud9.files
static/scripts/aws_batch
infrastructure-plane-VPC-1-1_subnet_C...
s3policy.yaml
170:180 (4%)
49:59 (9%)
view
9 x 2 content/02-aws-getting-s...d/04-start_cloud9.files
content/02-aws-getting-s...d/04-start_cloud9.files
infrastructure-plane-VPC-1-1_subnet_C...
infrastructure-plane-VPC-1-1_subnet_C...
119:127 (3%)
160:168 (3%)
view
9 x 2 content/02-aws-getting-s...d/04-start_cloud9.files
content/02-aws-getting-s...d/04-start_cloud9.files
infrastructure-plane-VPC-1-1_subnet_C...
infrastructure-plane-VPC-1-1_subnet_C...
119:127 (3%)
233:241 (3%)
view
9 x 2 content/02-aws-getting-s...d/04-start_cloud9.files
content/02-aws-getting-s...d/04-start_cloud9.files
infrastructure-plane-VPC-1-1_subnet_C...
infrastructure-plane-VPC-1-1_subnet_C...
160:168 (3%)
233:241 (3%)
view
8 x 2 content/02-aws-getting-s...d/04-start_cloud9.files
static/scripts/aws_batch
infrastructure-plane-VPC-1-1_subnet_C...
s3policy.yaml
170:177 (3%)
70:77 (7%)
view
8 x 2 content/02-aws-getting-s...d/04-start_cloud9.files
static/scripts/aws_batch
infrastructure-plane-VPC-1-1_subnet_C...
s3policy.yaml
170:177 (3%)
95:102 (7%)
view
8 x 2 static/scripts/aws_batch
static/scripts/aws_batch
s3policy.yaml
s3policy.yaml
49:56 (7%)
95:102 (7%)
view
8 x 2 static/scripts/aws_batch
static/scripts/dcv_license
s3policy.yaml
cfn_dcv_policy.yaml
95:102 (7%)
30:37 (20%)
view
8 x 2 static/scripts/aws_batch
static/scripts/dcv_license
s3policy.yaml
cfn_dcv_policy.yaml
70:77 (7%)
30:37 (20%)
view
8 x 2 static/scripts/aws_batch
static/scripts/aws_batch
s3policy.yaml
s3policy.yaml
49:56 (7%)
70:77 (7%)
view
7 x 2 content/02-aws-getting-s...d/04-start_cloud9.files
content/02-aws-getting-s...d/04-start_cloud9.files
infrastructure-plane-VPC-1-1_subnet_C...
infrastructure-plane-VPC-1-1_subnet_C...
65:71 (3%)
87:93 (3%)
view
6 x 2 content/02-aws-getting-s...d/04-start_cloud9.files
static/scripts/aws_batch
infrastructure-plane-VPC-1-1_subnet_C...
s3policy.yaml
185:190 (2%)
85:90 (5%)
view