anthropics / s5cmd
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
  • 21% duplication:
    • 6,807 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,441 duplicated lines
  • 145 duplicates
system21% (1,441 lines)
dependency graphs: 2D graph | 2D graph (with duplicates)... | 3D graph | 3D graph (with duplicates)...
Duplication per Extension
go15% (935 lines)
py56% (506 lines)
Duplication per Component (primary)
command19% (712 lines)
bench58% (255 lines)
benchmark54% (251 lines)
storage13% (223 lines)
parallel0% (0 lines)
log0% (0 lines)
error0% (0 lines)
version0% (0 lines)
strutil0% (0 lines)
useragent0% (0 lines)
orderedwriter0% (0 lines)
ROOT0% (0 lines)
progressbar0% (0 lines)

Duplication Between Components (50+ lines)

flowchart TB
    n0["bench"]
    n1["benchmark"]
    n0 ---|"506"| n1
    classDef default fill:#00b2ee,stroke:#ffffff,color:#000000;
    classDef highlighted fill:#00b2ee,stroke:#ffffff,color:#000000;
    linkStyle 0 stroke:#DC143CFF,stroke-width:10px


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
bench (57%)
  --> benchmark (54%)
506 1 file pair details...

Longest Duplicates
The list of 50 longest duplicates.
See data for all 145 duplicates...
Size#FoldersFilesLinesCode
70 x 2 bench
benchmark
198:275 (16%)
235:319 (15%)
view
47 x 2 bench
benchmark
95:141 (10%)
84:130 (10%)
view
43 x 2 storage
storage
319:386 (4%)
411:478 (4%)
view
37 x 2 storage
storage
506:563 (4%)
822:879 (4%)
view
18 x 2 command
command
124:141 (2%)
42:59 (7%)
view
17 x 2 command
command
191:207 (2%)
85:101 (7%)
view
16 x 2 bench
benchmark
432:447 (3%)
472:487 (3%)
view
16 x 2 bench
benchmark
383:403 (3%)
415:435 (3%)
view
15 x 2 command
command
143:157 (1%)
61:75 (6%)
view
14 x 2 bench
benchmark
413:429 (3%)
445:461 (3%)
view
13 x 2 command
command
46:58 (12%)
127:139 (1%)
view
13 x 2 command
command
46:58 (12%)
45:57 (5%)
view
12 x 2 bench
benchmark
316:330 (2%)
351:365 (2%)
view
12 x 2 bench
benchmark
161:174 (2%)
132:145 (2%)
view
12 x 2 storage
storage
189:207 (1%)
411:429 (1%)
view
12 x 2 command
command
701:714 (1%)
232:245 (5%)
view
12 x 2 bench
benchmark
473:485 (2%)
539:551 (2%)
view
12 x 2 command
command
134:155 (11%)
227:249 (7%)
view
12 x 2 storage
storage
189:207 (1%)
319:337 (1%)
view
11 x 2 command
command
69:79 (4%)
49:59 (6%)
view
11 x 2 command
command
113:133 (12%)
228:249 (6%)
view
11 x 2 command
command
135:155 (10%)
113:133 (12%)
view
10 x 2 command
command
183:192 (1%)
68:77 (5%)
view
10 x 2 storage
storage
301:316 (1%)
393:408 (1%)
view
10 x 2 storage
storage
280:296 (1%)
462:478 (1%)
view
10 x 2 storage
storage
280:296 (1%)
370:386 (1%)
view
10 x 2 command
command
72:81 (5%)
76:85 (5%)
view
9 x 2 bench
benchmark
53:61 (2%)
41:49 (1%)
view
9 x 2 command
command
434:444 (1%)
214:224 (2%)
view
9 x 2 command
command
152:160 (2%)
206:214 (2%)
view
9 x 2 command
command
68:76 (5%)
84:92 (4%)
view
8 x 2 bench
benchmark
103:110 (1%)
106:113 (1%)
view
8 x 2 command
command
38:46 (11%)
34:42 (14%)
view
8 x 2 command
command
51:60 (9%)
71:80 (5%)
view
8 x 2 bench
benchmark
117:124 (1%)
92:99 (1%)
view
8 x 2 command
command
81:90 (11%)
69:78 (14%)
view
8 x 2 benchmark
benchmark
92:99 (1%)
106:113 (1%)
view
8 x 2 bench
benchmark
43:50 (1%)
35:42 (1%)
view
8 x 2 command
command
540:547 (1%)
588:595 (1%)
view
8 x 2 command
command
63:72 (7%)
71:80 (5%)
view
8 x 2 command
command
260:268 (1%)
100:109 (2%)
view
8 x 2 command
command
549:558 (1%)
574:583 (1%)
view
8 x 2 command
command
549:558 (1%)
597:606 (1%)
view
8 x 2 command
command
63:72 (7%)
51:60 (9%)
view
8 x 2 command
command
574:583 (1%)
597:606 (1%)
view
8 x 2 bench
bench
103:110 (1%)
117:124 (1%)
view
8 x 2 command
command
695:704 (1%)
760:769 (1%)
view
7 x 2 command
command
72:78 (4%)
123:129 (2%)
view
7 x 2 bench
benchmark
519:529 (1%)
569:580 (1%)
view
7 x 2 storage
storage
221:231 (<1%)
439:449 (<1%)
view
Most Frequent Duplicates
The list of 50 most frequently found duplicates.
Size#FoldersFilesLinesCode
6 x 11 command
command
command
command
command
command
command
command
command
command
...
51:57 (7%)
84:90 (3%)
120:126 (2%)
71:77 (3%)
262:268 (<1%)
40:46 (8%)
100:106 (2%)
89:95 (3%)
36:42 (10%)
103:109 (1%)
...
view
6 x 4 bench
benchmark
benchmark
bench
105:110 (1%)
94:99 (1%)
108:113 (1%)
119:124 (1%)
view
6 x 4 storage
storage
storage
storage
222:231 (<1%)
260:269 (<1%)
348:357 (<1%)
440:449 (<1%)
view
6 x 4 bench
benchmark
benchmark
bench
104:109 (1%)
93:98 (1%)
107:112 (1%)
118:123 (1%)
view
6 x 4 bench
benchmark
benchmark
bench
103:108 (1%)
92:97 (1%)
106:111 (1%)
117:122 (1%)
view
6 x 4 storage
storage
storage
storage
221:228 (<1%)
259:266 (<1%)
347:354 (<1%)
439:446 (<1%)
view
6 x 3 command
command
command
127:132 (<1%)
46:51 (5%)
45:50 (2%)
view
6 x 3 command
command
command
233:245 (3%)
140:151 (5%)
118:129 (7%)
view
6 x 3 storage
storage
storage
197:207 (<1%)
327:337 (<1%)
419:429 (<1%)
view
6 x 3 storage
storage
storage
280:288 (<1%)
370:378 (<1%)
462:470 (<1%)
view
6 x 3 command
command
command
42:47 (7%)
76:81 (3%)
80:85 (3%)
view
6 x 3 command
command
command
549:554 (<1%)
574:579 (<1%)
597:602 (<1%)
view
6 x 3 command
command
command
129:134 (<1%)
48:53 (5%)
47:52 (2%)
view
6 x 3 command
command
command
130:135 (<1%)
49:54 (5%)
48:53 (2%)
view
6 x 3 command
command
command
54:59 (3%)
63:68 (3%)
74:79 (2%)
view
6 x 3 storage
storage
storage
196:206 (<1%)
326:336 (<1%)
418:428 (<1%)
view
6 x 3 command
command
command
132:137 (<1%)
51:56 (5%)
50:55 (2%)
view
6 x 3 command
command
command
74:80 (3%)
66:72 (5%)
54:60 (7%)
view
6 x 3 command
command
command
619:626 (<1%)
681:687 (<1%)
778:784 (<1%)
view
6 x 3 command
command
command
185:191 (1%)
217:223 (1%)
232:238 (1%)
view
6 x 3 command
command
command
229:240 (3%)
136:147 (5%)
114:125 (7%)
view
6 x 3 command
command
command
232:241 (3%)
139:148 (5%)
117:126 (7%)
view
6 x 3 storage
storage
storage
189:196 (<1%)
319:326 (<1%)
411:418 (<1%)
view
6 x 3 command
command
command
21:28 (3%)
22:29 (1%)
19:26 (2%)
view
6 x 3 command
command
command
73:78 (3%)
124:129 (1%)
77:82 (3%)
view
6 x 3 command
command
command
134:139 (<1%)
53:58 (5%)
52:57 (2%)
view
6 x 3 command
command
command
236:246 (3%)
143:152 (5%)
121:130 (7%)
view
6 x 3 storage
storage
storage
195:202 (<1%)
325:332 (<1%)
417:424 (<1%)
view
6 x 3 storage
storage
storage
190:197 (<1%)
320:327 (<1%)
412:419 (<1%)
view
6 x 3 storage
storage
storage
192:199 (<1%)
322:329 (<1%)
414:421 (<1%)
view
6 x 3 command
command
command
551:558 (<1%)
576:583 (<1%)
599:606 (<1%)
view
6 x 3 storage
storage
storage
176:185 (<1%)
307:316 (<1%)
399:408 (<1%)
view
6 x 3 command
command
command
133:138 (<1%)
52:57 (5%)
51:56 (2%)
view
6 x 3 storage
storage
storage
286:294 (<1%)
376:384 (<1%)
468:476 (<1%)
view
6 x 3 storage
storage
storage
283:291 (<1%)
373:381 (<1%)
465:473 (<1%)
view
6 x 3 storage
storage
storage
284:292 (<1%)
374:382 (<1%)
466:474 (<1%)
view
6 x 3 storage
storage
storage
191:198 (<1%)
321:328 (<1%)
413:420 (<1%)
view
6 x 3 command
command
command
550:557 (<1%)
575:582 (<1%)
598:605 (<1%)
view
6 x 3 command
command
command
72:77 (3%)
123:128 (1%)
76:81 (3%)
view
6 x 3 command
command
command
128:133 (<1%)
47:52 (5%)
46:51 (2%)
view
6 x 3 storage
storage
storage
175:183 (<1%)
306:314 (<1%)
398:406 (<1%)
view
6 x 3 command
command
command
31:38 (1%)
10:17 (14%)
36:43 (<1%)
view
6 x 3 command
command
command
72:79 (3%)
64:71 (5%)
52:59 (7%)
view
6 x 3 command
command
command
68:73 (3%)
107:112 (1%)
84:89 (2%)
view
6 x 3 command
command
command
228:237 (3%)
135:144 (5%)
113:122 (7%)
view
6 x 3 command
command
command
131:136 (<1%)
50:55 (5%)
49:54 (2%)
view
6 x 3 storage
storage
storage
287:296 (<1%)
377:386 (<1%)
469:478 (<1%)
view
6 x 3 command
command
command
33:39 (1%)
12:18 (14%)
38:44 (<1%)
view
6 x 3 command
command
command
237:249 (3%)
144:155 (5%)
122:133 (7%)
view
6 x 3 command
command
command
23:29 (3%)
24:30 (1%)
21:27 (2%)
view