aws-samples / aws-security-hub-findings-account-data-enrichment
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
  • 11% duplication:
    • 594 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 66 duplicated lines
  • 3 duplicates
system11% (66 lines)
Duplication per Extension
py12% (54 lines)
yaml11% (12 lines)
Duplication per Component (primary)
enrichment_function/schema/aws/securityhub/securityhubfindingsimported18% (54 lines)
ROOT8% (12 lines)
enrichment_function0% (0 lines)
enrichment_function/import_findings0% (0 lines)
Longest Duplicates
The list of 3 longest duplicates.
See data for all 3 duplicates...
Size#FoldersFilesLinesCode
19 x 2 enrichment_function/sche...rityhubfindingsimported
enrichment_function/sche...rityhubfindingsimported
AWSEvent.py
SecurityHubFindingsImported.py
165:184 (14%)
36:55 (38%)
view
8 x 2 enrichment_function/sche...rityhubfindingsimported
enrichment_function/sche...rityhubfindingsimported
AWSEvent.py
SecurityHubFindingsImported.py
186:197 (6%)
57:68 (16%)
view
6 x 2 ROOT
ROOT
aws-securityhub-findings-resource-enr...
aws-securityhub-findings-resource-enr...
45:50 (5%)
52:57 (5%)
view