aws-samples / automating-a-security-incident-with-step-functions
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
  • 17% duplication:
    • 316 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 54 duplicated lines
  • 8 duplicates
system17% (54 lines)
Duplication per Extension
yaml13% (30 lines)
js24% (24 lines)
Duplication per Component (primary)
ROOT13% (30 lines)
src/revertPolicy48% (12 lines)
src/policyChangerApprove70% (12 lines)
src/validatePolicy0% (0 lines)
src/recieveUser0% (0 lines)
src/askUser0% (0 lines)
Longest Duplicates
The list of 8 longest duplicates.
See data for all 8 duplicates...
Size#FoldersFilesLinesCode
8 x 2 ROOT
ROOT
template.yaml
template.yaml
58:65 (3%)
75:82 (3%)
view
7 x 2 ROOT
ROOT
template.yaml
template.yaml
23:29 (3%)
58:64 (3%)
view
7 x 2 ROOT
ROOT
template.yaml
template.yaml
23:29 (3%)
92:98 (3%)
view
7 x 2 ROOT
ROOT
template.yaml
template.yaml
75:81 (3%)
92:98 (3%)
view
7 x 2 ROOT
ROOT
template.yaml
template.yaml
23:29 (3%)
75:81 (3%)
view
7 x 2 ROOT
ROOT
template.yaml
template.yaml
58:64 (3%)
92:98 (3%)
view
6 x 2 src/policyChangerApprove
src/revertPolicy
app.js
app.js
15:21 (35%)
15:21 (24%)
view
6 x 2 src/policyChangerApprove
src/revertPolicy
app.js
app.js
5:13 (35%)
5:13 (24%)
view