guardian/daylight-savings-hex-map-australia
Duplication Places in code with 6 or more lines that are exactly the same. |
Duplication Overall
- 47% duplication:
- 3,413 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
- 1,618 duplicated lines
- 40 duplicates
Duplication per Extension
Duplication per Component (primary)
Duplication Between Components (50+ lines)
flowchart TB
n0["atoms"]
n1["processing"]
n2["shared"]
n0 ---|"104"| n1
n1 ---|"93"| n2
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:#DC143CDB,stroke-width:8px
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
atoms (3%)
  --> processing (20%)
104
1 file pair
details...
processing (18%)
  --> shared (3%)
93
2 file pairs
details...
flowchart TB
n0["atoms"]
n1["processing"]
n2["shared"]
n0 ---|"104"| n1
n1 ---|"93"| n2
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:#DC143CDB,stroke-width:8px
Show more details on duplication between components...
| From Component --> To Component |
Duplicated Lines |
File Pairs | Details |
|---|---|---|---|
| atoms (3%)   --> processing (20%) |
104 | 1 file pair | details... |
| processing (18%)   --> shared (3%) |
93 | 2 file pairs | details... |
Longest Duplicates
The list of 40 longest duplicates.
| Size | # | Folders | Files | Lines | Code |
|---|---|---|---|---|---|
| 233 | x 2 | atoms/default/client/cssatoms/savings-everywhere/client/css | 1:283 (100%)1:283 (100%) | view | |
| 233 | x 2 | atoms/abolish-savings/client/cssatoms/select/client/css | 1:283 (100%)1:283 (100%) | view | |
| 233 | x 2 | atoms/abolish-savings/client/cssatoms/normal-savings/client/css | 1:283 (100%)1:283 (100%) | view | |
| 233 | x 2 | atoms/normal-savings/client/cssatoms/select/client/css | 1:283 (100%)1:283 (100%) | view | |
| 233 | x 2 | atoms/normal-savings/client/cssatoms/savings-everywhere/client/css | 1:283 (100%)1:283 (100%) | view | |
| 233 | x 2 | atoms/default/client/cssatoms/normal-savings/client/css | 1:283 (100%)1:283 (100%) | view | |
| 233 | x 2 | atoms/default/client/cssatoms/select/client/css | 1:283 (100%)1:283 (100%) | view | |
| 233 | x 2 | atoms/abolish-savings/client/cssatoms/savings-everywhere/client/css | 1:283 (100%)1:283 (100%) | view | |
| 233 | x 2 | atoms/savings-everywhere/client/cssatoms/select/client/css | 1:283 (100%)1:283 (100%) | view | |
| 233 | x 2 | atoms/abolish-savings/client/cssatoms/default/client/css | 1:283 (100%)1:283 (100%) | view | |
| 82 | x 2 | processingprocessing | 19:215 (80%)50:247 (55%) | view | |
| 27 | x 2 | atoms/default/client/jsprocessing | 6:45 (33%)8:46 (18%) | view | |
| 19 | x 2 | atoms/default/client/jsprocessing | 93:120 (23%)311:338 (12%) | view | |
| 15 | x 2 | atoms/normal-savings/client/jsatoms/select/client/js | 1:20 (100%)1:20 (100%) | view | |
| 15 | x 2 | atoms/default/client/jsatoms/savings-everywhere/client/js | 1:20 (36%)1:20 (100%) | view | |
| 15 | x 2 | atoms/default/client/jsatoms/normal-savings/client/js | 1:20 (36%)1:20 (100%) | view | |
| 15 | x 2 | atoms/savings-everywhere/client/jsatoms/select/client/js | 1:20 (100%)1:20 (100%) | view | |
| 15 | x 2 | atoms/normal-savings/client/jsatoms/savings-everywhere/client/js | 1:20 (100%)1:20 (100%) | view | |
| 15 | x 2 | atoms/default/client/jsatoms/select/client/js | 1:20 (36%)1:20 (100%) | view | |
| 15 | x 2 | atoms/abolish-savings/client/jsatoms/normal-savings/client/js | 1:20 (100%)1:20 (100%) | view | |
| 15 | x 2 | atoms/abolish-savings/client/jsatoms/select/client/js | 1:20 (100%)1:20 (100%) | view | |
| 15 | x 2 | atoms/abolish-savings/client/jsatoms/default/client/js | 1:20 (100%)1:20 (36%) | view | |
| 15 | x 2 | atoms/abolish-savings/client/jsatoms/savings-everywhere/client/js | 1:20 (100%)1:20 (100%) | view | |
| 14 | x 2 | processingshared/js | 167:197 (9%)285:319 (5%) | view | |
| 14 | x 2 | processingshared/js | 135:165 (13%)285:319 (5%) | view | |
| 11 | x 2 | atoms/normal-savings/client/cssatoms/savings-everywhere/client/css | 1:13 (100%)1:13 (100%) | view | |
| 11 | x 2 | atoms/abolish-savings/client/cssatoms/normal-savings/client/css | 1:13 (100%)1:13 (100%) | view | |
| 11 | x 2 | atoms/abolish-savings/client/cssatoms/savings-everywhere/client/css | 1:13 (100%)1:13 (100%) | view | |
| 9 | x 2 | processingshared/js | 100:117 (6%)131:148 (3%) | view | |
| 9 | x 2 | processingshared/js | 68:85 (8%)131:148 (3%) | view | |
| 6 | x 2 | shared/css/guss-typographyshared/css/guss-typography | 188:193 (5%)200:205 (5%) | view | |
| 6 | x 2 | atoms/abolish-savings/client/jsatoms/savings-everywhere/client/js | 5:11 (30%)5:11 (30%) | view | |
| 6 | x 2 | shared/cssshared/css | 182:187 (3%)1:6 (75%) | view | |
| 6 | x 2 | atoms/default/client/jsshared/js | 11:19 (7%)14:22 (2%) | view | |
| 6 | x 2 | atoms/default/client/jsshared/js | 37:45 (7%)42:49 (2%) | view | |
| 6 | x 2 | processingshared/js | 13:21 (4%)14:22 (2%) | view | |
| 6 | x 2 | processingshared/js | 39:46 (4%)42:49 (2%) | view | |
| 6 | x 2 | atoms/default/client/jsprocessing | 85:90 (7%)303:308 (4%) | view | |
| 6 | x 2 | atoms/abolish-savings/client/jsatoms/normal-savings/client/js | 5:11 (30%)5:11 (30%) | view | |
| 6 | x 2 | atoms/normal-savings/client/jsatoms/savings-everywhere/client/js | 5:11 (30%)5:11 (30%) | view |
Most Frequent Duplicates
The list of 50 most frequently found duplicates.
| Size | # | Folders | Files | Lines | Code |
|---|---|---|---|---|---|
| 6 | x 5 | atoms/normal-savings/client/jsatoms/select/client/jsatoms/default/client/jsatoms/savings-everywhere/client/jsatoms/abolish-savings/client/js | 3:10 (40%)3:10 (40%)3:10 (14%)3:10 (40%)3:10 (40%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 223:229 (2%)223:229 (2%)223:229 (2%)223:229 (2%)223:229 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/jsatoms/select/client/jsatoms/default/client/jsatoms/savings-everywhere/client/jsatoms/abolish-savings/client/js | 5:11 (40%)5:11 (40%)5:11 (14%)5:11 (40%)5:11 (40%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 243:249 (2%)243:249 (2%)243:249 (2%)243:249 (2%)243:249 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 236:241 (2%)236:241 (2%)236:241 (2%)236:241 (2%)236:241 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 138:143 (2%)138:143 (2%)138:143 (2%)138:143 (2%)138:143 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 48:53 (2%)48:53 (2%)48:53 (2%)48:53 (2%)48:53 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 82:88 (2%)82:88 (2%)82:88 (2%)82:88 (2%)82:88 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 42:47 (2%)42:47 (2%)42:47 (2%)42:47 (2%)42:47 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 245:250 (2%)245:250 (2%)245:250 (2%)245:250 (2%)245:250 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 95:100 (2%)95:100 (2%)95:100 (2%)95:100 (2%)95:100 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 269:275 (2%)269:275 (2%)269:275 (2%)269:275 (2%)269:275 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 136:142 (2%)136:142 (2%)136:142 (2%)136:142 (2%)136:142 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 84:89 (2%)84:89 (2%)84:89 (2%)84:89 (2%)84:89 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 204:209 (2%)204:209 (2%)204:209 (2%)204:209 (2%)204:209 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 69:75 (2%)69:75 (2%)69:75 (2%)69:75 (2%)69:75 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 81:87 (2%)81:87 (2%)81:87 (2%)81:87 (2%)81:87 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 170:177 (2%)170:177 (2%)170:177 (2%)170:177 (2%)170:177 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 32:39 (2%)32:39 (2%)32:39 (2%)32:39 (2%)32:39 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 47:52 (2%)47:52 (2%)47:52 (2%)47:52 (2%)47:52 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 189:194 (2%)189:194 (2%)189:194 (2%)189:194 (2%)189:194 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 130:135 (2%)130:135 (2%)130:135 (2%)130:135 (2%)130:135 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 174:180 (2%)174:180 (2%)174:180 (2%)174:180 (2%)174:180 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 271:277 (2%)271:277 (2%)271:277 (2%)271:277 (2%)271:277 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 23:29 (2%)23:29 (2%)23:29 (2%)23:29 (2%)23:29 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 194:199 (2%)194:199 (2%)194:199 (2%)194:199 (2%)194:199 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 275:280 (2%)275:280 (2%)275:280 (2%)275:280 (2%)275:280 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 156:163 (2%)156:163 (2%)156:163 (2%)156:163 (2%)156:163 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 97:102 (2%)97:102 (2%)97:102 (2%)97:102 (2%)97:102 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 112:118 (2%)112:118 (2%)112:118 (2%)112:118 (2%)112:118 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/jsatoms/select/client/jsatoms/default/client/jsatoms/savings-everywhere/client/jsatoms/abolish-savings/client/js | 2:8 (40%)2:8 (40%)2:8 (14%)2:8 (40%)2:8 (40%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 34:41 (2%)34:41 (2%)34:41 (2%)34:41 (2%)34:41 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 17:25 (2%)17:25 (2%)17:25 (2%)17:25 (2%)17:25 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 153:159 (2%)153:159 (2%)153:159 (2%)153:159 (2%)153:159 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 3:13 (2%)3:13 (2%)3:13 (2%)3:13 (2%)3:13 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 147:153 (2%)147:153 (2%)147:153 (2%)147:153 (2%)147:153 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 206:212 (2%)206:212 (2%)206:212 (2%)206:212 (2%)206:212 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 125:131 (2%)125:131 (2%)125:131 (2%)125:131 (2%)125:131 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 213:219 (2%)213:219 (2%)213:219 (2%)213:219 (2%)213:219 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 142:148 (2%)142:148 (2%)142:148 (2%)142:148 (2%)142:148 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 261:266 (2%)261:266 (2%)261:266 (2%)261:266 (2%)261:266 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 58:64 (2%)58:64 (2%)58:64 (2%)58:64 (2%)58:64 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 36:42 (2%)36:42 (2%)36:42 (2%)36:42 (2%)36:42 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 216:221 (2%)216:221 (2%)216:221 (2%)216:221 (2%)216:221 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 277:282 (2%)277:282 (2%)277:282 (2%)277:282 (2%)277:282 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/jsatoms/select/client/jsatoms/default/client/jsatoms/savings-everywhere/client/jsatoms/abolish-savings/client/js | 1:7 (40%)1:7 (40%)1:7 (14%)1:7 (40%)1:7 (40%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 167:176 (2%)167:176 (2%)167:176 (2%)167:176 (2%)167:176 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 247:252 (2%)247:252 (2%)247:252 (2%)247:252 (2%)247:252 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 116:122 (2%)116:122 (2%)116:122 (2%)116:122 (2%)116:122 (2%) | view | |
| 6 | x 5 | atoms/normal-savings/client/cssatoms/select/client/cssatoms/abolish-savings/client/cssatoms/default/client/cssatoms/savings-everywhere/client/css | 149:155 (2%)149:155 (2%)149:155 (2%)149:155 (2%)149:155 (2%) | view |
Duplicated Units
The list of top 4 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."