aws-samples / aws-cost-control-approval-workflow
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:
    • 1,528 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 274 duplicated lines
  • 34 duplicates
system17% (274 lines)
Duplication per Extension
yaml30% (218 lines)
py7% (56 lines)
Duplication per Component (primary)
ROOT30% (236 lines)
get-ec2-pricing6% (10 lines)
save-request7% (10 lines)
rebase-budgets7% (6 lines)
process-requests3% (6 lines)
approve-request5% (6 lines)
linux-ami-lookup0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 34 duplicates...
Size#FoldersFilesLinesCode
31 x 2 ROOT
ROOT
template.yaml
template.yaml
219:249 (6%)
251:281 (6%)
view
25 x 2 ROOT
ROOT
template.yaml
template.yaml
151:175 (5%)
193:217 (5%)
view
20 x 2 ROOT
ROOT
template.yaml
template.yaml
89:108 (4%)
112:131 (4%)
view
15 x 2 ROOT
ROOT
template.yaml
template.yaml
89:103 (3%)
219:233 (3%)
view
15 x 2 ROOT
ROOT
template.yaml
template.yaml
135:149 (3%)
219:233 (3%)
view
15 x 2 ROOT
ROOT
template.yaml
template.yaml
112:126 (3%)
219:233 (3%)
view
15 x 2 ROOT
ROOT
ec2_approval_template.yaml
template.yaml
5:22 (6%)
5:22 (3%)
view
15 x 2 ROOT
ROOT
template.yaml
template.yaml
112:126 (3%)
135:149 (3%)
view
15 x 2 ROOT
ROOT
template.yaml
template.yaml
135:149 (3%)
177:191 (3%)
view
15 x 2 ROOT
ROOT
template.yaml
template.yaml
112:126 (3%)
251:265 (3%)
view
15 x 2 ROOT
ROOT
template.yaml
template.yaml
89:103 (3%)
177:191 (3%)
view
15 x 2 ROOT
ROOT
template.yaml
template.yaml
177:191 (3%)
219:233 (3%)
view
15 x 2 ROOT
ROOT
template.yaml
template.yaml
112:126 (3%)
177:191 (3%)
view
15 x 2 ROOT
ROOT
template.yaml
template.yaml
135:149 (3%)
251:265 (3%)
view
15 x 2 ROOT
ROOT
template.yaml
template.yaml
89:103 (3%)
135:149 (3%)
view
15 x 2 ROOT
ROOT
template.yaml
template.yaml
89:103 (3%)
251:265 (3%)
view
15 x 2 ROOT
ROOT
template.yaml
template.yaml
177:191 (3%)
251:265 (3%)
view
12 x 2 ROOT
ROOT
template.yaml
template.yaml
206:217 (2%)
270:281 (2%)
view
12 x 2 ROOT
ROOT
template.yaml
template.yaml
206:217 (2%)
238:249 (2%)
view
12 x 2 ROOT
ROOT
template.yaml
template.yaml
164:175 (2%)
238:249 (2%)
view