aws-quickstart / quickstart-sap-hana-ha
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:
    • 6,795 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,039 duplicated lines
  • 90 duplicates
system30% (2,039 lines)
Duplication per Extension
yaml56% (1,566 lines)
py10% (423 lines)
yml100% (50 lines)
Duplication per Component (primary)
templates56% (1,566 lines)
scripts/ValidateParameters/netaddr/ip8% (145 lines)
scripts/ValidateParameters/netaddr/eui14% (75 lines)
scripts/ValidateParameters/netaddr/strategy11% (68 lines)
scripts/PreHAConfig35% (54 lines)
scripts/HAConfig10% (54 lines)
ci100% (50 lines)
scripts/ValidateParameters25% (27 lines)
scripts/ValidateParameters/netaddr/contrib0% (0 lines)
scripts/ValidateParameters/netaddr0% (0 lines)

Duplication Between Components (50+ lines)

G scripts/HAConfig scripts/HAConfig scripts/PreHAConfig scripts/PreHAConfig scripts/HAConfig--scripts/PreHAConfig 108 scripts/ValidateParameters scripts/ValidateParameters scripts/HAConfig--scripts/ValidateParameters 54 scripts/PreHAConfig--scripts/ValidateParameters 54

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 90 duplicates...
Size#FoldersFilesLinesCode
173 x 2 templates
templates
SAP_HANA_HA_Master_Existing_VPC.yaml
SAP_HANA_HA_Master_New_VPC.yaml
94:266 (23%)
92:264 (22%)
view
110 x 2 templates
templates
SAP_HANA_HA_Master_Existing_VPC.yaml
SAP_HANA_HA_Master_New_VPC.yaml
632:742 (15%)
679:789 (14%)
view
67 x 2 templates
templates
SAP_HANA_HA_Master_Existing_VPC.yaml
SAP_HANA_HA_Master_New_VPC.yaml
362:430 (9%)
359:427 (8%)
view
47 x 2 templates
templates
SAP_HANA_HA_Master_Existing_VPC.yaml
SAP_HANA_HA_Master_New_VPC.yaml
297:343 (6%)
294:340 (6%)
view
44 x 2 templates
templates
SAP_HANA_HA_Master_Existing_VPC.yaml
SAP_HANA_HA_Master_New_VPC.yaml
39:82 (6%)
37:80 (5%)
view
33 x 2 templates
templates
SAP_HANA_HA_Master_Existing_VPC.yaml
SAP_HANA_HA_Master_New_VPC.yaml
530:563 (4%)
568:601 (4%)
view
28 x 2 templates
templates
SAP_HANA_HA_HAConfig.yaml
SAP_HANA_HA_PreHAConfig.yaml
364:391 (6%)
120:147 (13%)
view
27 x 2 scripts/HAConfig
scripts/PreHAConfig
cfnresponse.py
cfnresponse.py
11:45 (100%)
11:45 (100%)
view
27 x 2 scripts/PreHAConfig
scripts/ValidateParameters
cfnresponse.py
cfnresponse.py
11:45 (100%)
11:45 (100%)
view
27 x 2 scripts/HAConfig
scripts/ValidateParameters
cfnresponse.py
cfnresponse.py
11:45 (100%)
11:45 (100%)
view
26 x 2 templates
templates
SAP_HANA_HA_Master_Existing_VPC.yaml
SAP_HANA_HA_Master_New_VPC.yaml
566:591 (3%)
604:629 (3%)
view
25 x 2 ci
ci
config.yml
taskcat.yml
1:26 (100%)
1:26 (100%)
view
23 x 2 templates
templates
SAP_HANA_HA_Master_Existing_VPC.yaml
SAP_HANA_HA_Master_New_VPC.yaml
488:510 (3%)
517:539 (2%)
view
21 x 2 scripts/HAConfig
scripts/PreHAConfig
HAConfig.py
PreHAConfig.py
52:74 (4%)
43:65 (16%)
view
20 x 2 templates
templates
SAP_HANA_HA_Master_Existing_VPC.yaml
SAP_HANA_HA_Master_New_VPC.yaml
608:627 (2%)
649:668 (2%)
view
16 x 2 templates
templates
SAP_HANA_HA_Master_Existing_VPC.yaml
SAP_HANA_HA_Master_New_VPC.yaml
444:460 (2%)
462:478 (2%)
view
15 x 2 scripts/ValidateParameters/netaddr/ip
scripts/ValidateParameters/netaddr/ip
glob.py
glob.py
79:95 (10%)
109:125 (10%)
view
14 x 2 templates
templates
SAP_HANA_HA_HAConfig.yaml
SAP_HANA_HA_PreHAConfig.yaml
18:31 (3%)
4:17 (6%)
view
14 x 2 scripts/ValidateParameters/netaddr/strategy
scripts/ValidateParameters/netaddr/strategy
ipv4.py
ipv6.py
217:240 (12%)
236:259 (12%)
view
14 x 2 templates
templates
SAP_HANA_HA_Master_Existing_VPC.yaml
SAP_HANA_HA_Master_New_VPC.yaml
543:556 (1%)
528:541 (1%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
25 x 3 scripts/PreHAConfig
scripts/ValidateParameters
scripts/HAConfig
cfnresponse.py
cfnresponse.py
cfnresponse.py
0:0 
0:0 
0:0 
view
21 x 2 scripts/PreHAConfig
scripts/HAConfig
PreHAConfig.py
HAConfig.py
0:0 
0:0 
view