aws-samples / aws-nitro-enclaves-workshop
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
  • 20% duplication:
    • 667 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 136 duplicated lines
  • 6 duplicates
system20% (136 lines)
Duplication per Extension
py33% (120 lines)
yaml6% (16 lines)
Duplication per Component (primary)
resources/code/my-first-enclave/secure-local-channel47% (72 lines)
resources/code/my-first-enclave/cryptographic-attestation23% (48 lines)
resources/templates6% (16 lines)
workshop0% (0 lines)
resources/code/my-first-enclave/nitro-enclaves-cli0% (0 lines)

Duplication Between Components (50+ lines)

G resources/code/my-first-enclave/cryptographic-attestation resources/code/my-first-enclave/cryptographic-attestation resources/code/my-first-enclave/secure-local-channel resources/code/my-first-enclave/secure-local-channel resources/code/my-first-enclave/cryptographic-attestation--resources/code/my-first-enclave/secure-local-channel 96

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 6 longest duplicates.
See data for all 6 duplicates...
Size#FoldersFilesLinesCode
26 x 2 resources/code/my-first-...yptographic-attestation
resources/code/my-first-...ve/secure-local-channel
traffic_forwarder.py
traffic_forwarder.py
7:39 (54%)
7:39 (50%)
view
16 x 2 resources/code/my-first-...yptographic-attestation
resources/code/my-first-...ve/secure-local-channel
traffic_forwarder.py
traffic_forwarder.py
49:67 (33%)
50:68 (31%)
view
8 x 2 resources/templates
resources/templates
cloud9.yaml
cloud9.yaml
112:120 (3%)
241:249 (3%)
view
6 x 2 resources/code/my-first-...yptographic-attestation
resources/code/my-first-...ve/secure-local-channel
traffic_forwarder.py
traffic_forwarder.py
40:46 (12%)
41:46 (11%)
view
6 x 2 resources/code/my-first-...ve/secure-local-channel
resources/code/my-first-...ve/secure-local-channel
client.py
server.py
51:57 (14%)
71:76 (10%)
view
6 x 2 resources/code/my-first-...ve/secure-local-channel
resources/code/my-first-...ve/secure-local-channel
client.py
server.py
70:78 (14%)
84:91 (10%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
22 x 2 resources/code/my-first-...ve/secure-local-channel
resources/code/my-first-...yptographic-attestation
traffic_forwarder.py
traffic_forwarder.py
0:0 
0:0 
view
13 x 2 resources/code/my-first-...ve/secure-local-channel
resources/code/my-first-...yptographic-attestation
traffic_forwarder.py
traffic_forwarder.py
0:0 
0:0 
view