aws-samples / aws-control-tower-reference-architectures
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
  • 13% duplication:
    • 1,532 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 210 duplicated lines
  • 10 duplicates
system13% (210 lines)
Duplication per Extension
py17% (196 lines)
yaml3% (14 lines)
Duplication per Component (primary)
AccountFactory/BatchUpdate18% (112 lines)
AccountFactory/EnrollAccount13% (98 lines)
SSOManagement/template0% (0 lines)
AccountFactory/ProgrammaticAccess0% (0 lines)

Duplication Between Components (50+ lines)

G AccountFactory/BatchUpdate AccountFactory/BatchUpdate AccountFactory/EnrollAccount AccountFactory/EnrollAccount AccountFactory/BatchUpdate--AccountFactory/EnrollAccount 196

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 10 longest duplicates.
See data for all 10 duplicates...
Size#FoldersFilesLinesCode
29 x 2 customizations/AccountFactory/BatchUpdate
customizations/AccountFactory/EnrollAccount
update_pp.py
enroll_account.py
260:300 (8%)
196:238 (3%)
view
15 x 2 customizations/AccountFactory/BatchUpdate
customizations/AccountFactory/EnrollAccount
update_pp.py
enroll_account.py
36:56 (4%)
56:78 (2%)
view
10 x 2 customizations/AccountFactory/BatchUpdate
customizations/AccountFactory/EnrollAccount
update_pp.py
enroll_account.py
141:153 (2%)
498:511 (1%)
view
10 x 2 customizations/AccountFactory/BatchUpdate
customizations/AccountFactory/EnrollAccount
update_pp.py
enroll_account.py
302:313 (2%)
592:603 (1%)
view
7 x 2 customizations/AccountFactory/BatchUpdate
customizations/AccountFactory/BatchUpdate
launch_compute_env.yaml
launch_compute_env.yaml
142:148 (2%)
260:266 (2%)
view
7 x 2 customizations/AccountFactory/BatchUpdate
customizations/AccountFactory/EnrollAccount
update_pp.py
enroll_account.py
249:256 (2%)
184:191 (<1%)
view
7 x 2 customizations/AccountFactory/BatchUpdate
customizations/AccountFactory/EnrollAccount
update_pp.py
enroll_account.py
58:65 (2%)
80:87 (<1%)
view
7 x 2 customizations/AccountFactory/BatchUpdate
customizations/AccountFactory/EnrollAccount
update_pp.py
enroll_account.py
88:96 (2%)
113:122 (<1%)
view
7 x 2 customizations/AccountFactory/BatchUpdate
customizations/AccountFactory/EnrollAccount
update_pp.py
enroll_account.py
68:78 (2%)
90:101 (<1%)
view
6 x 2 customizations/AccountFactory/BatchUpdate
customizations/AccountFactory/EnrollAccount
update_pp.py
enroll_account.py
166:174 (1%)
526:534 (<1%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
14 x 2 customizations/AccountFactory/EnrollAccount
customizations/AccountFactory/BatchUpdate
enroll_account.py
update_pp.py
0:0 
0:0 
view
12 x 2 customizations/AccountFactory/EnrollAccount
customizations/AccountFactory/BatchUpdate
enroll_account.py
update_pp.py
0:0 
0:0 
view