guardian/oz-covid-hotspot-scrapers
Duplication Places in code with 6 or more lines that are exactly the same. |
Duplication Overall
- 81% duplication:
- 1,415 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
- 1,157 duplicated lines
- 294 duplicates
Duplication per Extension
Duplication per Component (primary)
Duplication Between Components (50+ lines)
flowchart TB
n0["qld_hotspots"]
n1["wa_hotspots"]
n2["act_hotspots"]
n3["vic_hotspots_two"]
n4["Archive"]
n5["modules"]
n6["charts"]
n0 ---|"316"| n1
n2 ---|"316"| n3
n2 ---|"316"| n0
n2 ---|"316"| n1
n0 ---|"316"| n3
n3 ---|"316"| n1
n4 ---|"290"| n2
n5 ---|"284"| n3
n6 ---|"284"| n1
n2 ---|"284"| n5
n6 ---|"284"| n0
n6 ---|"284"| n5
n6 ---|"284"| n3
n5 ---|"284"| n1
n2 ---|"284"| n6
n5 ---|"284"| n0
n4 ---|"274"| n0
n4 ---|"270"| n3
n4 ---|"258"| n1
n4 ---|"178"| n5
n4 ---|"178"| n6
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:#DC143CFF,stroke-width:10px
linkStyle 2 stroke:#DC143CFF,stroke-width:10px
linkStyle 3 stroke:#DC143CFF,stroke-width:10px
linkStyle 4 stroke:#DC143CFF,stroke-width:10px
linkStyle 5 stroke:#DC143CFF,stroke-width:10px
linkStyle 6 stroke:#DC143CED,stroke-width:9px
linkStyle 7 stroke:#DC143CDB,stroke-width:8px
linkStyle 8 stroke:#DC143CDB,stroke-width:8px
linkStyle 9 stroke:#DC143CDB,stroke-width:8px
linkStyle 10 stroke:#DC143CDB,stroke-width:8px
linkStyle 11 stroke:#DC143CDB,stroke-width:8px
linkStyle 12 stroke:#DC143CDB,stroke-width:8px
linkStyle 13 stroke:#DC143CDB,stroke-width:8px
linkStyle 14 stroke:#DC143CDB,stroke-width:8px
linkStyle 15 stroke:#DC143CDB,stroke-width:8px
linkStyle 16 stroke:#DC143CDB,stroke-width:8px
linkStyle 17 stroke:#DC143CDB,stroke-width:8px
linkStyle 18 stroke:#DC143CDB,stroke-width:8px
linkStyle 19 stroke:#DC143CA5,stroke-width:5px
linkStyle 20 stroke:#DC143CA5,stroke-width:5px
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
qld_hotspots (84%)
  --> wa_hotspots (80%)
316
12 file pairs
details...
act_hotspots (83%)
  --> vic_hotspots_two (84%)
316
12 file pairs
details...
act_hotspots (83%)
  --> qld_hotspots (84%)
316
12 file pairs
details...
act_hotspots (83%)
  --> wa_hotspots (80%)
316
12 file pairs
details...
qld_hotspots (84%)
  --> vic_hotspots_two (84%)
316
12 file pairs
details...
vic_hotspots_two (84%)
  --> wa_hotspots (80%)
316
12 file pairs
details...
Archive (45%)
  --> act_hotspots (76%)
290
11 file pairs
details...
modules (99%)
  --> vic_hotspots_two (75%)
284
11 file pairs
details...
charts (75%)
  --> wa_hotspots (72%)
284
11 file pairs
details...
act_hotspots (75%)
  --> modules (99%)
284
11 file pairs
details...
charts (75%)
  --> qld_hotspots (75%)
284
11 file pairs
details...
charts (75%)
  --> modules (99%)
284
11 file pairs
details...
charts (75%)
  --> vic_hotspots_two (75%)
284
11 file pairs
details...
modules (99%)
  --> wa_hotspots (72%)
284
11 file pairs
details...
act_hotspots (75%)
  --> charts (75%)
284
11 file pairs
details...
modules (99%)
  --> qld_hotspots (75%)
284
11 file pairs
details...
Archive (42%)
  --> qld_hotspots (72%)
274
11 file pairs
details...
Archive (42%)
  --> vic_hotspots_two (72%)
270
11 file pairs
details...
Archive (40%)
  --> wa_hotspots (65%)
258
11 file pairs
details...
Archive (27%)
  --> modules (62%)
178
7 file pairs
details...
Archive (27%)
  --> charts (47%)
178
7 file pairs
details...
flowchart TB
n0["qld_hotspots"]
n1["wa_hotspots"]
n2["act_hotspots"]
n3["vic_hotspots_two"]
n4["Archive"]
n5["modules"]
n6["charts"]
n0 ---|"316"| n1
n2 ---|"316"| n3
n2 ---|"316"| n0
n2 ---|"316"| n1
n0 ---|"316"| n3
n3 ---|"316"| n1
n4 ---|"290"| n2
n5 ---|"284"| n3
n6 ---|"284"| n1
n2 ---|"284"| n5
n6 ---|"284"| n0
n6 ---|"284"| n5
n6 ---|"284"| n3
n5 ---|"284"| n1
n2 ---|"284"| n6
n5 ---|"284"| n0
n4 ---|"274"| n0
n4 ---|"270"| n3
n4 ---|"258"| n1
n4 ---|"178"| n5
n4 ---|"178"| n6
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:#DC143CFF,stroke-width:10px
linkStyle 2 stroke:#DC143CFF,stroke-width:10px
linkStyle 3 stroke:#DC143CFF,stroke-width:10px
linkStyle 4 stroke:#DC143CFF,stroke-width:10px
linkStyle 5 stroke:#DC143CFF,stroke-width:10px
linkStyle 6 stroke:#DC143CED,stroke-width:9px
linkStyle 7 stroke:#DC143CDB,stroke-width:8px
linkStyle 8 stroke:#DC143CDB,stroke-width:8px
linkStyle 9 stroke:#DC143CDB,stroke-width:8px
linkStyle 10 stroke:#DC143CDB,stroke-width:8px
linkStyle 11 stroke:#DC143CDB,stroke-width:8px
linkStyle 12 stroke:#DC143CDB,stroke-width:8px
linkStyle 13 stroke:#DC143CDB,stroke-width:8px
linkStyle 14 stroke:#DC143CDB,stroke-width:8px
linkStyle 15 stroke:#DC143CDB,stroke-width:8px
linkStyle 16 stroke:#DC143CDB,stroke-width:8px
linkStyle 17 stroke:#DC143CDB,stroke-width:8px
linkStyle 18 stroke:#DC143CDB,stroke-width:8px
linkStyle 19 stroke:#DC143CA5,stroke-width:5px
linkStyle 20 stroke:#DC143CA5,stroke-width:5px
Show more details on duplication between components...
| From Component --> To Component |
Duplicated Lines |
File Pairs | Details |
|---|---|---|---|
| qld_hotspots (84%)   --> wa_hotspots (80%) |
316 | 12 file pairs | details... |
| act_hotspots (83%)   --> vic_hotspots_two (84%) |
316 | 12 file pairs | details... |
| act_hotspots (83%)   --> qld_hotspots (84%) |
316 | 12 file pairs | details... |
| act_hotspots (83%)   --> wa_hotspots (80%) |
316 | 12 file pairs | details... |
| qld_hotspots (84%)   --> vic_hotspots_two (84%) |
316 | 12 file pairs | details... |
| vic_hotspots_two (84%)   --> wa_hotspots (80%) |
316 | 12 file pairs | details... |
| Archive (45%)   --> act_hotspots (76%) |
290 | 11 file pairs | details... |
| modules (99%)   --> vic_hotspots_two (75%) |
284 | 11 file pairs | details... |
| charts (75%)   --> wa_hotspots (72%) |
284 | 11 file pairs | details... |
| act_hotspots (75%)   --> modules (99%) |
284 | 11 file pairs | details... |
| charts (75%)   --> qld_hotspots (75%) |
284 | 11 file pairs | details... |
| charts (75%)   --> modules (99%) |
284 | 11 file pairs | details... |
| charts (75%)   --> vic_hotspots_two (75%) |
284 | 11 file pairs | details... |
| modules (99%)   --> wa_hotspots (72%) |
284 | 11 file pairs | details... |
| act_hotspots (75%)   --> charts (75%) |
284 | 11 file pairs | details... |
| modules (99%)   --> qld_hotspots (75%) |
284 | 11 file pairs | details... |
| Archive (42%)   --> qld_hotspots (72%) |
274 | 11 file pairs | details... |
| Archive (42%)   --> vic_hotspots_two (72%) |
270 | 11 file pairs | details... |
| Archive (40%)   --> wa_hotspots (65%) |
258 | 11 file pairs | details... |
| Archive (27%)   --> modules (62%) |
178 | 7 file pairs | details... |
| Archive (27%)   --> charts (47%) |
178 | 7 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 9 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."