aws-samples / aws-cfn-windows-hpc-template
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
  • 12% duplication:
    • 1,092 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 136 duplicated lines
  • 7 duplicates
system12% (136 lines)
Duplication per Extension
yml14% (98 lines)
ps18% (38 lines)
Duplication per Component (primary)
CloudFormation14% (98 lines)
PowerShell8% (38 lines)
Longest Duplicates
The list of 7 longest duplicates.
See data for all 7 duplicates...
Size#FoldersFilesLinesCode
19 x 2 HPCLab/PowerShell
HPCLab/PowerShell
InstallCompute.ps1
InstallHead.ps1
26:44 (48%)
73:93 (24%)
view
13 x 2 HPCLab/CloudFormation
HPCLab/CloudFormation
HPCLab2019.yml
HPCLab2019.yml
395:407 (1%)
483:495 (1%)
view
8 x 2 HPCLab/CloudFormation
HPCLab/CloudFormation
HPCLab2019.yml
HPCLab2019.yml
414:421 (1%)
442:449 (1%)
view
8 x 2 HPCLab/CloudFormation
HPCLab/CloudFormation
HPCLab2019.yml
HPCLab2019.yml
427:434 (1%)
471:478 (1%)
view
7 x 2 HPCLab/CloudFormation
HPCLab/CloudFormation
HPCLab2019.yml
HPCLab2019.yml
592:598 (1%)
660:666 (1%)
view
7 x 2 HPCLab/CloudFormation
HPCLab/CloudFormation
HPCLab2019.yml
HPCLab2019.yml
550:556 (1%)
624:630 (1%)
view
6 x 2 HPCLab/CloudFormation
HPCLab/CloudFormation
HPCLab2019.yml
HPCLab2019.yml
543:548 (<1%)
617:622 (<1%)
view