aws-samples / aws-security-hub-cross-account-controls-disabler
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:
    • 689 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 87 duplicated lines
  • 8 duplicates
system12% (87 lines)
Duplication per Extension
yaml14% (47 lines)
py10% (40 lines)
Duplication per Component (primary)
UpdateMembers17% (47 lines)
UpdateMembers/src/UpdateMember14% (40 lines)
UpdateMembers/src0% (0 lines)
UpdateMembers/src/CheckResult0% (0 lines)
UpdateMembers/src/GetMembers0% (0 lines)
member-iam-role0% (0 lines)
Longest Duplicates
The list of 8 longest duplicates.
See data for all 8 duplicates...
Size#FoldersFilesLinesCode
14 x 2 UpdateMembers/src/UpdateMember
UpdateMembers/src/UpdateMember
index.py
index.py
254:267 (4%)
290:303 (4%)
view
10 x 2 UpdateMembers
UpdateMembers
template.yaml
template.yaml
73:82 (3%)
228:237 (3%)
view
7 x 2 UpdateMembers
UpdateMembers
template.yaml
template.yaml
76:82 (2%)
157:163 (2%)
view
7 x 2 UpdateMembers
UpdateMembers
template.yaml
template.yaml
157:163 (2%)
231:237 (2%)
view
7 x 2 UpdateMembers
UpdateMembers
template.yaml
template.yaml
113:119 (2%)
126:132 (2%)
view
6 x 2 UpdateMembers
UpdateMembers
template.yaml
template.yaml
113:118 (2%)
143:148 (2%)
view
6 x 2 UpdateMembers/src/UpdateMember
UpdateMembers/src/UpdateMember
index.py
index.py
276:281 (2%)
312:317 (2%)
view
6 x 2 UpdateMembers
UpdateMembers
template.yaml
template.yaml
126:131 (2%)
143:148 (2%)
view