guardian/live-corona-data-vaccine-page
Duplication Places in code with 6 or more lines that are exactly the same. |
Duplication Overall
- 62% duplication:
- 11,078 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
- 6,904 duplicated lines
- 1,117 duplicates
Duplication per Extension
Duplication per Component (primary)
Duplication Between Components (50+ lines)
flowchart TB
n0["Archive"]
n1["ROOT"]
n2["state_by_state"]
n3["state_outbreaks"]
n4["new_thrashers"]
n5["weekly"]
n6["booster_feed"]
n7["modules"]
n8["vaccine_availability"]
n0 ---|"1031"| n1
n0 ---|"1024"| n2
n0 ---|"464"| n3
n4 ---|"432"| n5
n0 ---|"432"| n5
n2 ---|"364"| n3
n6 ---|"337"| n5
n0 ---|"334"| n4
n4 ---|"304"| n2
n6 ---|"298"| n3
n3 ---|"298"| n5
n0 ---|"294"| n6
n7 ---|"288"| n5
n6 ---|"288"| n7
n7 ---|"288"| n4
n6 ---|"288"| n4
n4 ---|"286"| n3
n7 ---|"286"| n3
n7 ---|"276"| n2
n0 ---|"276"| n8
n2 ---|"276"| n8
n6 ---|"276"| n2
n0 ---|"276"| n7
n2 ---|"276"| n5
n6 ---|"262"| n8
n8 ---|"262"| n5
n4 ---|"262"| n8
n7 ---|"262"| n8
n3 ---|"260"| n8
n1 ---|"255"| n5
n2 ---|"130"| n1
n1 ---|"72"| n3
n1 ---|"60"| n4
classDef default fill:#00b2ee,stroke:#ffffff,color:#000000;
classDef highlighted fill:#00b2ee,stroke:#ffffff,color:#000000;
linkStyle 0 stroke:#DC143CFF,stroke-width:10px
linkStyle 1 stroke:#DC143CED,stroke-width:9px
linkStyle 2 stroke:#DC143C93,stroke-width:4px
linkStyle 3 stroke:#DC143C93,stroke-width:4px
linkStyle 4 stroke:#DC143C93,stroke-width:4px
linkStyle 5 stroke:#DC143C82,stroke-width:3px
linkStyle 6 stroke:#DC143C82,stroke-width:3px
linkStyle 7 stroke:#DC143C82,stroke-width:3px
linkStyle 8 stroke:#DC143C70,stroke-width:2px
linkStyle 9 stroke:#DC143C70,stroke-width:2px
linkStyle 10 stroke:#DC143C70,stroke-width:2px
linkStyle 11 stroke:#DC143C70,stroke-width:2px
linkStyle 12 stroke:#DC143C70,stroke-width:2px
linkStyle 13 stroke:#DC143C70,stroke-width:2px
linkStyle 14 stroke:#DC143C70,stroke-width:2px
linkStyle 15 stroke:#DC143C70,stroke-width:2px
linkStyle 16 stroke:#DC143C70,stroke-width:2px
linkStyle 17 stroke:#DC143C70,stroke-width:2px
linkStyle 18 stroke:#DC143C70,stroke-width:2px
linkStyle 19 stroke:#DC143C70,stroke-width:2px
linkStyle 20 stroke:#DC143C70,stroke-width:2px
linkStyle 21 stroke:#DC143C70,stroke-width:2px
linkStyle 22 stroke:#DC143C70,stroke-width:2px
linkStyle 23 stroke:#DC143C70,stroke-width:2px
linkStyle 24 stroke:#DC143C70,stroke-width:2px
linkStyle 25 stroke:#DC143C70,stroke-width:2px
linkStyle 26 stroke:#DC143C70,stroke-width:2px
linkStyle 27 stroke:#DC143C70,stroke-width:2px
linkStyle 28 stroke:#DC143C70,stroke-width:2px
linkStyle 29 stroke:#DC143C70,stroke-width:2px
linkStyle 30 stroke:#DC143C5E,stroke-width:1px
linkStyle 31 stroke:#DC143C4C,stroke-width:1px
linkStyle 32 stroke:#DC143C4C,stroke-width:1px
Download:
Mermaid (.mmd)
(open online Mermaid editor)
2D force graph
|
3D force graph
Show more details on duplication between components...
From Component
--> To Component
Duplicated
Lines
File Pairs
Details
Archive (8%)
  --> ROOT (48%)
1031
94 file pairs
details...
Archive (8%)
  --> state_by_state (44%)
1024
80 file pairs
details...
Archive (3%)
  --> state_outbreaks (32%)
464
69 file pairs
details...
new_thrashers (51%)
  --> weekly (45%)
432
17 file pairs
details...
Archive (3%)
  --> weekly (45%)
432
23 file pairs
details...
state_by_state (15%)
  --> state_outbreaks (25%)
364
27 file pairs
details...
booster_feed (60%)
  --> weekly (35%)
337
13 file pairs
details...
Archive (2%)
  --> new_thrashers (39%)
334
17 file pairs
details...
new_thrashers (36%)
  --> state_by_state (13%)
304
15 file pairs
details...
booster_feed (53%)
  --> state_outbreaks (21%)
298
12 file pairs
details...
state_outbreaks (21%)
  --> weekly (31%)
298
12 file pairs
details...
Archive (2%)
  --> booster_feed (53%)
294
13 file pairs
details...
modules (99%)
  --> weekly (30%)
288
11 file pairs
details...
booster_feed (51%)
  --> modules (99%)
288
11 file pairs
details...
modules (99%)
  --> new_thrashers (34%)
288
11 file pairs
details...
booster_feed (51%)
  --> new_thrashers (34%)
288
11 file pairs
details...
new_thrashers (34%)
  --> state_outbreaks (20%)
286
11 file pairs
details...
modules (98%)
  --> state_outbreaks (20%)
286
11 file pairs
details...
modules (95%)
  --> state_by_state (11%)
276
11 file pairs
details...
Archive (2%)
  --> vaccine_availability (57%)
276
11 file pairs
details...
state_by_state (11%)
  --> vaccine_availability (57%)
276
11 file pairs
details...
booster_feed (49%)
  --> state_by_state (11%)
276
11 file pairs
details...
Archive (2%)
  --> modules (95%)
276
11 file pairs
details...
state_by_state (11%)
  --> weekly (29%)
276
11 file pairs
details...
booster_feed (47%)
  --> vaccine_availability (54%)
262
11 file pairs
details...
vaccine_availability (54%)
  --> weekly (27%)
262
11 file pairs
details...
new_thrashers (31%)
  --> vaccine_availability (54%)
262
11 file pairs
details...
modules (90%)
  --> vaccine_availability (54%)
262
11 file pairs
details...
state_outbreaks (18%)
  --> vaccine_availability (53%)
260
11 file pairs
details...
ROOT (12%)
  --> weekly (27%)
255
17 file pairs
details...
state_by_state (5%)
  --> ROOT (6%)
130
16 file pairs
details...
ROOT (3%)
  --> state_outbreaks (5%)
72
9 file pairs
details...
ROOT (2%)
  --> new_thrashers (7%)
60
8 file pairs
details...
flowchart TB
n0["Archive"]
n1["ROOT"]
n2["state_by_state"]
n3["state_outbreaks"]
n4["new_thrashers"]
n5["weekly"]
n6["booster_feed"]
n7["modules"]
n8["vaccine_availability"]
n0 ---|"1031"| n1
n0 ---|"1024"| n2
n0 ---|"464"| n3
n4 ---|"432"| n5
n0 ---|"432"| n5
n2 ---|"364"| n3
n6 ---|"337"| n5
n0 ---|"334"| n4
n4 ---|"304"| n2
n6 ---|"298"| n3
n3 ---|"298"| n5
n0 ---|"294"| n6
n7 ---|"288"| n5
n6 ---|"288"| n7
n7 ---|"288"| n4
n6 ---|"288"| n4
n4 ---|"286"| n3
n7 ---|"286"| n3
n7 ---|"276"| n2
n0 ---|"276"| n8
n2 ---|"276"| n8
n6 ---|"276"| n2
n0 ---|"276"| n7
n2 ---|"276"| n5
n6 ---|"262"| n8
n8 ---|"262"| n5
n4 ---|"262"| n8
n7 ---|"262"| n8
n3 ---|"260"| n8
n1 ---|"255"| n5
n2 ---|"130"| n1
n1 ---|"72"| n3
n1 ---|"60"| n4
classDef default fill:#00b2ee,stroke:#ffffff,color:#000000;
classDef highlighted fill:#00b2ee,stroke:#ffffff,color:#000000;
linkStyle 0 stroke:#DC143CFF,stroke-width:10px
linkStyle 1 stroke:#DC143CED,stroke-width:9px
linkStyle 2 stroke:#DC143C93,stroke-width:4px
linkStyle 3 stroke:#DC143C93,stroke-width:4px
linkStyle 4 stroke:#DC143C93,stroke-width:4px
linkStyle 5 stroke:#DC143C82,stroke-width:3px
linkStyle 6 stroke:#DC143C82,stroke-width:3px
linkStyle 7 stroke:#DC143C82,stroke-width:3px
linkStyle 8 stroke:#DC143C70,stroke-width:2px
linkStyle 9 stroke:#DC143C70,stroke-width:2px
linkStyle 10 stroke:#DC143C70,stroke-width:2px
linkStyle 11 stroke:#DC143C70,stroke-width:2px
linkStyle 12 stroke:#DC143C70,stroke-width:2px
linkStyle 13 stroke:#DC143C70,stroke-width:2px
linkStyle 14 stroke:#DC143C70,stroke-width:2px
linkStyle 15 stroke:#DC143C70,stroke-width:2px
linkStyle 16 stroke:#DC143C70,stroke-width:2px
linkStyle 17 stroke:#DC143C70,stroke-width:2px
linkStyle 18 stroke:#DC143C70,stroke-width:2px
linkStyle 19 stroke:#DC143C70,stroke-width:2px
linkStyle 20 stroke:#DC143C70,stroke-width:2px
linkStyle 21 stroke:#DC143C70,stroke-width:2px
linkStyle 22 stroke:#DC143C70,stroke-width:2px
linkStyle 23 stroke:#DC143C70,stroke-width:2px
linkStyle 24 stroke:#DC143C70,stroke-width:2px
linkStyle 25 stroke:#DC143C70,stroke-width:2px
linkStyle 26 stroke:#DC143C70,stroke-width:2px
linkStyle 27 stroke:#DC143C70,stroke-width:2px
linkStyle 28 stroke:#DC143C70,stroke-width:2px
linkStyle 29 stroke:#DC143C70,stroke-width:2px
linkStyle 30 stroke:#DC143C5E,stroke-width:1px
linkStyle 31 stroke:#DC143C4C,stroke-width:1px
linkStyle 32 stroke:#DC143C4C,stroke-width:1px
Show more details on duplication between components...
| From Component --> To Component |
Duplicated Lines |
File Pairs | Details |
|---|---|---|---|
| Archive (8%)   --> ROOT (48%) |
1031 | 94 file pairs | details... |
| Archive (8%)   --> state_by_state (44%) |
1024 | 80 file pairs | details... |
| Archive (3%)   --> state_outbreaks (32%) |
464 | 69 file pairs | details... |
| new_thrashers (51%)   --> weekly (45%) |
432 | 17 file pairs | details... |
| Archive (3%)   --> weekly (45%) |
432 | 23 file pairs | details... |
| state_by_state (15%)   --> state_outbreaks (25%) |
364 | 27 file pairs | details... |
| booster_feed (60%)   --> weekly (35%) |
337 | 13 file pairs | details... |
| Archive (2%)   --> new_thrashers (39%) |
334 | 17 file pairs | details... |
| new_thrashers (36%)   --> state_by_state (13%) |
304 | 15 file pairs | details... |
| booster_feed (53%)   --> state_outbreaks (21%) |
298 | 12 file pairs | details... |
| state_outbreaks (21%)   --> weekly (31%) |
298 | 12 file pairs | details... |
| Archive (2%)   --> booster_feed (53%) |
294 | 13 file pairs | details... |
| modules (99%)   --> weekly (30%) |
288 | 11 file pairs | details... |
| booster_feed (51%)   --> modules (99%) |
288 | 11 file pairs | details... |
| modules (99%)   --> new_thrashers (34%) |
288 | 11 file pairs | details... |
| booster_feed (51%)   --> new_thrashers (34%) |
288 | 11 file pairs | details... |
| new_thrashers (34%)   --> state_outbreaks (20%) |
286 | 11 file pairs | details... |
| modules (98%)   --> state_outbreaks (20%) |
286 | 11 file pairs | details... |
| modules (95%)   --> state_by_state (11%) |
276 | 11 file pairs | details... |
| Archive (2%)   --> vaccine_availability (57%) |
276 | 11 file pairs | details... |
| state_by_state (11%)   --> vaccine_availability (57%) |
276 | 11 file pairs | details... |
| booster_feed (49%)   --> state_by_state (11%) |
276 | 11 file pairs | details... |
| Archive (2%)   --> modules (95%) |
276 | 11 file pairs | details... |
| state_by_state (11%)   --> weekly (29%) |
276 | 11 file pairs | details... |
| booster_feed (47%)   --> vaccine_availability (54%) |
262 | 11 file pairs | details... |
| vaccine_availability (54%)   --> weekly (27%) |
262 | 11 file pairs | details... |
| new_thrashers (31%)   --> vaccine_availability (54%) |
262 | 11 file pairs | details... |
| modules (90%)   --> vaccine_availability (54%) |
262 | 11 file pairs | details... |
| state_outbreaks (18%)   --> vaccine_availability (53%) |
260 | 11 file pairs | details... |
| ROOT (12%)   --> weekly (27%) |
255 | 17 file pairs | details... |
| state_by_state (5%)   --> ROOT (6%) |
130 | 16 file pairs | details... |
| ROOT (3%)   --> state_outbreaks (5%) |
72 | 9 file pairs | details... |
| ROOT (2%)   --> new_thrashers (7%) |
60 | 8 file pairs | details... |
Longest Duplicates
The list of 50 longest duplicates.
Most Frequent Duplicates
The list of 50 most frequently found duplicates.
Duplicated Units
The list of top 13 duplicated units.
About This Analysis
- 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...
- To learn more about duplications and techniques for eliminating duplication, Sokrates recommends the following resources:
- Avoid Repetition, MartinFlower.com (IEEE Software article)
- Refactoring duplicated code, sourcemaking.com
- Beck Design Rules, MartinFowler.com
- DRY (Don't Repeat Yourself) Principle, Wikipedia
- The Cut-and-Paste Programming Software Development Anti-Pattern, sourcemaking.com
- Code Smells / Duplicated Code, Jeff Atwood, codinghorror.com:
- "Duplicated code is the bane of software development. Stamp out duplication whenever possible. You should always be on the lookout for more subtle cases of near-duplication, too. Don't Repeat Yourself!"
- Reducing Coupling, MartinFlower.com (IEEE Software article):
- "There are several ways to describe coupling, but it boils down to this: If changing one module in a program requires changing another module, then coupling exists. ... Duplication always implies coupling, because changing one piece of duplicate code implies changing the other."