aws-samples / amazon-rds-auto-restart-protection
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
  • 31% duplication:
    • 334 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 106 duplicated lines
  • 10 duplicates
system31% (106 lines)
Duplication per Extension
yaml34% (94 lines)
py19% (12 lines)
Duplication per Component (primary)
deployment34% (94 lines)
sources/lambda-code/stop-rds-instance-lambda54% (6 lines)
sources/lambda-code/retrieve-rds-instance-state-lambda42% (6 lines)
sources/lambda-code/start-statemachine-execution-lambda0% (0 lines)
Longest Duplicates
The list of 10 longest duplicates.
See data for all 10 duplicates...
Size#FoldersFilesLinesCode
17 x 2 deployment
deployment
master-template.yaml
master-template.yaml
95:111 (6%)
113:129 (6%)
view
17 x 2 deployment
deployment
master-template.yaml
master-template.yaml
77:93 (6%)
113:129 (6%)
view
17 x 2 deployment
deployment
master-template.yaml
master-template.yaml
77:93 (6%)
95:111 (6%)
view
13 x 2 deployment
deployment
master-template.yaml
master-template.yaml
24:36 (4%)
61:73 (4%)
view
9 x 2 deployment
deployment
master-template.yaml
master-template.yaml
24:32 (3%)
44:52 (3%)
view
9 x 2 deployment
deployment
master-template.yaml
master-template.yaml
44:52 (3%)
61:69 (3%)
view
8 x 2 deployment
deployment
master-template.yaml
master-template.yaml
77:84 (2%)
131:138 (2%)
view
8 x 2 deployment
deployment
master-template.yaml
master-template.yaml
95:102 (2%)
131:138 (2%)
view
8 x 2 deployment
deployment
master-template.yaml
master-template.yaml
113:120 (2%)
131:138 (2%)
view
6 x 2 sources/lambda-code/retr...s-instance-state-lambda
sources/lambda-code/stop-rds-instance-lambda
lambda_function.py
lambda_function.py
8:21 (42%)
8:20 (54%)
view