microsoft / MCW-Building-a-resilient-IaaS-architecture
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
  • 19% duplication:
    • 597 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 114 duplicated lines
  • 5 duplicates
system19% (114 lines)
Duplication per Extension
ps119% (114 lines)
Duplication per Component (primary)
scripts19% (80 lines)
student-files18% (34 lines)
Longest Duplicates
The list of 5 longest duplicates.
See data for all 5 duplicates...
Size#FoldersFilesLinesCode
24 x 2 Hands-on lab/Resources/scripts
Hands-on lab/Resources/scripts
deploy-sqlvm-wrapped.ps1
deploy-webvm.ps1
99:124 (22%)
33:58 (48%)
view
9 x 2 Hands-on lab/Resources/student-files
Hands-on lab/Resources/student-files
ASRRunBookWEB.ps1
ASRRunBookWEB.ps1
76:84 (9%)
101:109 (9%)
view
9 x 2 Hands-on lab/Resources/scripts
Hands-on lab/Resources/scripts
deploy-advm-existing.ps1
deploy-advm-new.ps1
5:14 (25%)
5:14 (28%)
view
8 x 2 Hands-on lab/Resources/student-files
Hands-on lab/Resources/student-files
ASRRunBookSQL.ps1
ASRRunBookWEB.ps1
63:73 (8%)
53:63 (8%)
view
7 x 2 Hands-on lab/Resources/scripts
Hands-on lab/Resources/scripts
ASRFailOverSQLVM1.ps1
ASRFailOverSQLVM2.ps1
10:18 (41%)
10:18 (41%)
view