aws-samples / aws-lakeformation-access-controls-automation
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
  • 99% duplication:
    • 4,297 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 4,291 duplicated lines
  • 387 duplicates
system99% (4,291 lines)
Duplication per Extension
yaml100% (3,890 lines)
py98% (401 lines)
Duplication per Component (primary)
blog-templates100% (1,945 lines)
automated-deployment/central-account100% (1,291 lines)
automated-deployment/consumption-account100% (654 lines)
src/lakeformation_permissions/consumption97% (161 lines)
src/lakeformation_permissions/central99% (139 lines)
src/lakeformation_automation99% (101 lines)

Duplication Between Components (50+ lines)

G automated-deployment/central-account automated-deployment/central-account blog-templates blog-templates automated-deployment/central-account--blog-templates 3072 automated-deployment/consumption-account automated-deployment/consumption-account automated-deployment/central-account--automated-deployment/consumption-account 1041 src/lakeformation_permissions/consumption src/lakeformation_permissions/consumption automated-deployment/central-account--src/lakeformation_permissions/consumption 173 src/lakeformation_permissions/central src/lakeformation_permissions/central automated-deployment/central-account--src/lakeformation_permissions/central 266 src/lakeformation_automation src/lakeformation_automation automated-deployment/central-account--src/lakeformation_automation 190 blog-templates--src/lakeformation_permissions/consumption 408 blog-templates--src/lakeformation_permissions/central 353 blog-templates--src/lakeformation_automation 190 automated-deployment/consumption-account--blog-templates 1859 automated-deployment/consumption-account--src/lakeformation_permissions/consumption 322 automated-deployment/consumption-account--src/lakeformation_permissions/central 173 src/lakeformation_permissions/central--src/lakeformation_permissions/consumption 181

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 387 duplicates...
Size#FoldersFilesLinesCode
1291 x 2 automated-deployment/central-account
blog-templates
template.yaml
central.yaml
1:1394 (100%)
1:1394 (100%)
view
654 x 2 automated-deployment/consumption-account
blog-templates
template.yaml
consumption.yaml
1:727 (100%)
1:727 (100%)
view
57 x 2 blog-templates
src/lakeformation_permissions/central
central.yaml
lambda_function.py
550:612 (4%)
98:163 (40%)
view
57 x 2 automated-deployment/central-account
src/lakeformation_permissions/central
template.yaml
lambda_function.py
550:612 (4%)
98:163 (40%)
view
54 x 2 blog-templates
src/lakeformation_permissions/consumption
consumption.yaml
lambda_function.py
192:252 (8%)
147:207 (32%)
view
54 x 2 automated-deployment/consumption-account
src/lakeformation_permissions/consumption
template.yaml
lambda_function.py
192:252 (8%)
147:207 (32%)
view
52 x 2 automated-deployment/consumption-account
blog-templates
template.yaml
central.yaml
140:195 (7%)
499:553 (4%)
view
52 x 2 blog-templates
blog-templates
central.yaml
consumption.yaml
499:553 (4%)
140:195 (7%)
view
52 x 2 automated-deployment/central-account
blog-templates
template.yaml
consumption.yaml
499:553 (4%)
140:195 (7%)
view
52 x 2 automated-deployment/central-account
automated-deployment/consumption-account
template.yaml
template.yaml
499:553 (4%)
140:195 (7%)
view
47 x 2 blog-templates
src/lakeformation_automation
central.yaml
lambda_function.py
174:223 (3%)
118:168 (46%)
view
47 x 2 automated-deployment/central-account
src/lakeformation_automation
template.yaml
lambda_function.py
174:223 (3%)
118:168 (46%)
view
42 x 2 automated-deployment/central-account
blog-templates
template.yaml
consumption.yaml
1190:1233 (3%)
554:597 (6%)
view
42 x 2 automated-deployment/central-account
automated-deployment/consumption-account
template.yaml
template.yaml
1190:1233 (3%)
554:597 (6%)
view
42 x 2 blog-templates
blog-templates
central.yaml
consumption.yaml
1190:1233 (3%)
554:597 (6%)
view
42 x 2 automated-deployment/consumption-account
blog-templates
template.yaml
central.yaml
554:597 (6%)
1190:1233 (3%)
view
38 x 2 automated-deployment/central-account
src/lakeformation_permissions/central
template.yaml
lambda_function.py
662:704 (2%)
215:257 (27%)
view
38 x 2 blog-templates
src/lakeformation_permissions/consumption
consumption.yaml
lambda_function.py
298:337 (5%)
253:292 (23%)
view
38 x 2 blog-templates
src/lakeformation_permissions/central
central.yaml
lambda_function.py
662:704 (2%)
215:257 (27%)
view
38 x 2 automated-deployment/consumption-account
src/lakeformation_permissions/consumption
template.yaml
lambda_function.py
298:337 (5%)
253:292 (23%)
view