microsoft / AzureDWScriptsandUtilities
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
  • 28% duplication:
    • 3,569 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,034 duplicated lines
  • 55 duplicates
system28% (1,034 lines)
Duplication per Extension
ps128% (948 lines)
py31% (86 lines)
Duplication per Component (primary)
APS to SQL DW Migration - Schema and Data Migration with PolyBase/5_CreateExternalTablesSQLDW64% (262 lines)
APS to SQL DW Migration - Schema and Data Migration with PolyBase/4_CreateAPSExportScriptSQLDWImportScript61% (230 lines)
APS to SQL DW Migration - Schema and Data Migration with PolyBase/6_DeployScriptsToSqldw26% (219 lines)
Assessment12% (140 lines)
APS to SQL DW Migration - Schema and Data Migration with PolyBase/0_PreAssessment20% (87 lines)
APS to SQL DW Migration - Schema and Data Migration with PolyBase/2_CleanScripts29% (43 lines)
APS to SQL DW Migration - Schema and Data Migration with PolyBase/3_ChangeSchemas34% (43 lines)
APS to SQL DW Migration - Schema and Data Migration with PolyBase/1_CreateMPPScripts7% (10 lines)

Duplication Between Components (50+ lines)

G APS to SQL DW Migration - Schema and Data Migration with PolyBase/4_CreateAPSExportScriptSQLDWImportScript APS to SQL DW Migration - Schema and Data Migration with PolyBase/4_CreateAPSExportScriptSQLDWImportScript APS to SQL DW Migration - Schema and Data Migration with PolyBase/5_CreateExternalTablesSQLDW APS to SQL DW Migration - Schema and Data Migration with PolyBase/5_CreateExternalTablesSQLDW APS to SQL DW Migration - Schema and Data Migration with PolyBase/4_CreateAPSExportScriptSQLDWImportScript--APS to SQL DW Migration - Schema and Data Migration with PolyBase/5_CreateExternalTablesSQLDW 483 APS to SQL DW Migration - Schema and Data Migration with PolyBase/6_DeployScriptsToSqldw APS to SQL DW Migration - Schema and Data Migration with PolyBase/6_DeployScriptsToSqldw APS to SQL DW Migration - Schema and Data Migration with PolyBase/4_CreateAPSExportScriptSQLDWImportScript--APS to SQL DW Migration - Schema and Data Migration with PolyBase/6_DeployScriptsToSqldw 250 Assessment Assessment APS to SQL DW Migration - Schema and Data Migration with PolyBase/4_CreateAPSExportScriptSQLDWImportScript--Assessment 54 APS to SQL DW Migration - Schema and Data Migration with PolyBase/5_CreateExternalTablesSQLDW--APS to SQL DW Migration - Schema and Data Migration with PolyBase/6_DeployScriptsToSqldw 285 APS to SQL DW Migration - Schema and Data Migration with PolyBase/5_CreateExternalTablesSQLDW--Assessment 81 APS to SQL DW Migration - Schema and Data Migration with PolyBase/6_DeployScriptsToSqldw--Assessment 142 APS to SQL DW Migration - Schema and Data Migration with PolyBase/0_PreAssessment APS to SQL DW Migration - Schema and Data Migration with PolyBase/0_PreAssessment APS to SQL DW Migration - Schema and Data Migration with PolyBase/0_PreAssessment--Assessment 127 APS to SQL DW Migration - Schema and Data Migration with PolyBase/0_PreAssessment--APS to SQL DW Migration - Schema and Data Migration with PolyBase/5_CreateExternalTablesSQLDW 108 APS to SQL DW Migration - Schema and Data Migration with PolyBase/0_PreAssessment--APS to SQL DW Migration - Schema and Data Migration with PolyBase/6_DeployScriptsToSqldw 101 APS to SQL DW Migration - Schema and Data Migration with PolyBase/0_PreAssessment--APS to SQL DW Migration - Schema and Data Migration with PolyBase/4_CreateAPSExportScriptSQLDWImportScript 81 APS to SQL DW Migration - Schema and Data Migration with PolyBase/2_CleanScripts APS to SQL DW Migration - Schema and Data Migration with PolyBase/2_CleanScripts APS to SQL DW Migration - Schema and Data Migration with PolyBase/3_ChangeSchemas APS to SQL DW Migration - Schema and Data Migration with PolyBase/3_ChangeSchemas APS to SQL DW Migration - Schema and Data Migration with PolyBase/2_CleanScripts--APS to SQL DW Migration - Schema and Data Migration with PolyBase/3_ChangeSchemas 86

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 55 duplicates...
Size#FoldersFilesLinesCode
78 x 2 APS to SQL&nbs...ScriptSQLDWImportScript
APS to SQL&nbs...eateExternalTablesSQLDW
Generate_Step4_ConfigFiles.ps1
Generate_Step5_ConfigFiles.ps1
58:148 (30%)
57:146 (31%)
view
72 x 2 APS to SQL&nbs...eateExternalTablesSQLDW
APS to SQL&nbs.../6_DeployScriptsToSqldw
Generate_Step5_ConfigFiles.ps1
Generate_Step6_ConfigFiles.ps1
66:148 (29%)
94:176 (17%)
view
71 x 2 APS to SQL&nbs...ScriptSQLDWImportScript
APS to SQL&nbs.../6_DeployScriptsToSqldw
Generate_Step4_ConfigFiles.ps1
Generate_Step6_ConfigFiles.ps1
67:148 (28%)
94:173 (17%)
view
37 x 2 APS to SQL&nbs...olyBase/0_PreAssessment
APS to SQL&nbs.../6_DeployScriptsToSqldw
PreAssessmentDriver.ps1
RunDSQLScriptsDriver.ps1
13:53 (39%)
16:57 (13%)
view
30 x 2 APS to SQL&nbs...ScriptSQLDWImportScript
APS to SQL&nbs...eateExternalTablesSQLDW
Generate_Step4_ConfigFiles.ps1
Generate_Step5_ConfigFiles.ps1
157:190 (11%)
152:185 (12%)
view
27 x 2 APS to SQL&nbs...olyBase/0_PreAssessment
APS to SQL&nbs.../6_DeployScriptsToSqldw
RunSQLStatementExportCSV.ps1
RunDSQLScriptsDriver.ps1
13:42 (12%)
16:45 (10%)
view
27 x 2 APS to SQL&nbs...olyBase/0_PreAssessment
APS to SQL&nbs...eateExternalTablesSQLDW
PreAssessmentDriver.ps1
ScriptCreateExternalTableDriver.ps1
13:42 (28%)
16:45 (38%)
view
27 x 2 APS to SQL&nbs...eateExternalTablesSQLDW
APS to SQL&nbs.../6_DeployScriptsToSqldw
ScriptCreateExternalTableDriver.ps1
RunDSQLScriptsDriver.ps1
16:45 (38%)
16:45 (10%)
view
27 x 2 APS to SQL&nbs...olyBase/0_PreAssessment
APS to SQL&nbs...olyBase/0_PreAssessment
PreAssessmentDriver.ps1
RunSQLStatementExportCSV.ps1
13:42 (28%)
13:42 (12%)
view
27 x 2 APS to SQL&nbs...olyBase/0_PreAssessment
APS to SQL&nbs...eateExternalTablesSQLDW
RunSQLStatementExportCSV.ps1
ScriptCreateExternalTableDriver.ps1
13:42 (12%)
16:45 (38%)
view
27 x 2 APS to SQL&nbs...olyBase/0_PreAssessment
APS to SQL&nbs...eateExternalTablesSQLDW
PreAssessmentDriver.ps1
CreateSQLDWExtTableStatements.ps1
13:42 (28%)
16:45 (29%)
view
27 x 2 APS to SQL&nbs...ScriptSQLDWImportScript
APS to SQL&nbs.../6_DeployScriptsToSqldw
ScriptCreateExportImportStatementsDri...
RunDSQLScriptsDriver.ps1
16:45 (21%)
16:45 (10%)
view
27 x 2 APS to SQL&nbs...olyBase/0_PreAssessment
Assessment
PreAssessmentDriver.ps1
AssessmentDriver_V2.ps1
13:42 (28%)
15:44 (4%)
view
27 x 2 APS to SQL&nbs...olyBase/0_PreAssessment
APS to SQL&nbs...eateExternalTablesSQLDW
RunSQLStatementExportCSV.ps1
CreateSQLDWExtTableStatements.ps1
13:42 (12%)
16:45 (29%)
view
27 x 2 APS to SQL&nbs...olyBase/0_PreAssessment
APS to SQL&nbs...ScriptSQLDWImportScript
PreAssessmentDriver.ps1
ScriptCreateExportImportStatementsDri...
13:42 (28%)
16:45 (21%)
view
27 x 2 APS to SQL&nbs...ScriptSQLDWImportScript
Assessment
ScriptCreateExportImportStatementsDri...
AssessmentDriver_V2.ps1
16:45 (21%)
15:44 (4%)
view
27 x 2 APS to SQL&nbs...ScriptSQLDWImportScript
APS to SQL&nbs...eateExternalTablesSQLDW
ScriptCreateExportImportStatementsDri...
CreateSQLDWExtTableStatements.ps1
16:45 (21%)
16:45 (29%)
view
27 x 2 APS to SQL&nbs...eateExternalTablesSQLDW
Assessment
CreateSQLDWExtTableStatements.ps1
AssessmentDriver_V2.ps1
16:45 (29%)
15:44 (4%)
view
27 x 2 APS to SQL&nbs...eateExternalTablesSQLDW
APS to SQL&nbs.../6_DeployScriptsToSqldw
CreateSQLDWExtTableStatements.ps1
RunDSQLScriptsDriver.ps1
16:45 (29%)
16:45 (10%)
view
27 x 2 APS to SQL&nbs...eateExternalTablesSQLDW
Assessment
ScriptCreateExternalTableDriver.ps1
AssessmentDriver_V2.ps1
16:45 (38%)
15:44 (4%)
view