facebookincubator / FBOpenSSH
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
  • 7% duplication:
    • 82,058 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 6,300 duplicated lines
  • 410 duplicates
system7% (6,300 lines)
Duplication per Extension
c6% (4,690 lines)
spec70% (1,107 lines)
h6% (303 lines)
ms57% (108 lines)
in5% (80 lines)
awk3% (12 lines)
Duplication per Component (primary)
ROOT6% (4,618 lines)
openbsd-compat9% (944 lines)
contrib/redhat77% (536 lines)
regress9% (134 lines)
contrib/suse16% (35 lines)
openbsd-compat/regress6% (15 lines)
regress/misc/kexfuzz3% (12 lines)
regress/unittests/authopt1% (6 lines)
regress/misc/fuzz-harness0% (0 lines)
regress/unittests/utf80% (0 lines)
regress/unittests/bitmap0% (0 lines)
regress/unittests/match0% (0 lines)
regress/unittests/kex0% (0 lines)
regress/unittests/hostkeys0% (0 lines)
regress/unittests/conversion0% (0 lines)
regress/unittests0% (0 lines)
regress/unittests/sshbuf0% (0 lines)
regress/unittests/sshkey0% (0 lines)
contrib0% (0 lines)

Duplication Between Components (50+ lines)

G contrib/redhat contrib/redhat ROOT ROOT contrib/redhat--ROOT 1072 openbsd-compat openbsd-compat ROOT--openbsd-compat 368 regress regress ROOT--regress 207

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 50 longest duplicates.
See data for all 410 duplicates...
Size#FoldersFilesLinesCode
327 x 2 contrib/redhat
ROOT
425:843 (47%)
411:829 (48%)
view
114 x 2 ROOT
openbsd-compat
90:217 (70%)
89:219 (69%)
view
32 x 2 contrib/redhat
ROOT
304:340 (4%)
276:312 (4%)
view
28 x 2 ROOT
ROOT
705:738 (1%)
873:906 (1%)
view
27 x 2 contrib/redhat
ROOT
245:275 (3%)
212:241 (4%)
view
24 x 2 ROOT
regress
1855:1887 (1%)
95:127 (19%)
view
24 x 2 contrib/redhat
ROOT
380:404 (3%)
350:374 (3%)
view
23 x 2 ROOT
ROOT
1275:1299 (1%)
1331:1356 (1%)
view
23 x 2 contrib/redhat
ROOT
356:379 (3%)
324:347 (3%)
view
22 x 2 ROOT
ROOT
5:26 (22%)
4:25 (25%)
view
20 x 2 openbsd-compat
openbsd-compat
54:81 (31%)
52:77 (40%)
view
20 x 2 openbsd-compat
openbsd-compat
52:77 (40%)
54:79 (40%)
view
20 x 2 openbsd-compat
openbsd-compat
252:280 (14%)
348:376 (6%)
view
20 x 2 ROOT
ROOT
1292:1314 (1%)
1409:1431 (1%)
view
20 x 2 openbsd-compat
openbsd-compat
54:81 (31%)
54:79 (40%)
view
20 x 2 ROOT
ROOT
379:398 (6%)
410:429 (6%)
view
19 x 2 ROOT
ROOT
543:564 (3%)
584:605 (3%)
view
19 x 2 contrib/suse
ROOT
106:124 (8%)
804:829 (2%)
view
19 x 2 contrib/redhat
contrib/suse
818:843 (2%)
106:124 (8%)
view
18 x 2 ROOT
ROOT
1123:1148 (1%)
1225:1250 (1%)
view
18 x 2 ROOT
openbsd-compat
58:77 (11%)
57:76 (11%)
view
17 x 2 contrib/redhat
ROOT
143:162 (2%)
115:134 (2%)
view
17 x 2 ROOT
ROOT
74:96 (48%)
64:93 (56%)
view
17 x 2 contrib/redhat
ROOT
120:138 (2%)
90:108 (2%)
view
17 x 2 ROOT
openbsd-compat
25:53 (10%)
24:52 (10%)
view
17 x 2 ROOT
ROOT
704:734 (1%)
825:855 (1%)
view
16 x 2 ROOT
ROOT
1971:1989 (<1%)
2183:2201 (<1%)
view
16 x 2 ROOT
ROOT
122:145 (17%)
160:183 (17%)
view
15 x 2 ROOT
ROOT
146:166 (14%)
170:190 (12%)
view
15 x 2 ROOT
ROOT
72:86 (15%)
66:80 (17%)
view
15 x 2 contrib/redhat
ROOT
218:235 (2%)
193:210 (2%)
view
15 x 2 ROOT
ROOT
68:85 (17%)
130:147 (17%)
view
14 x 2 ROOT
openbsd-compat
123:143 (9%)
220:240 (11%)
view
14 x 2 ROOT
ROOT
929:944 (<1%)
1366:1381 (<1%)
view
14 x 2 openbsd-compat
openbsd-compat
426:443 (2%)
465:482 (2%)
view
14 x 2 ROOT
ROOT
1746:1761 (<1%)
2264:2279 (<1%)
view
14 x 2 ROOT
ROOT
1643:1658 (1%)
1715:1730 (1%)
view
14 x 2 openbsd-compat
openbsd-compat
346:361 (2%)
368:383 (2%)
view
14 x 2 ROOT
ROOT
1073:1088 (<1%)
1379:1393 (<1%)
view
14 x 2 ROOT
ROOT
1680:1696 (1%)
2290:2306 (1%)
view
14 x 2 ROOT
ROOT
1038:1052 (<1%)
1608:1622 (<1%)
view
14 x 2 ROOT
ROOT
405:422 (2%)
530:547 (2%)
view
13 x 2 ROOT
ROOT
284:299 (1%)
340:355 (1%)
view
13 x 2 regress
ROOT
61:76 (10%)
1392:1407 (<1%)
view
13 x 2 ROOT
ROOT
726:742 (2%)
1088:1104 (2%)
view
13 x 2 ROOT
ROOT
1091:1107 (<1%)
1425:1441 (<1%)
view
13 x 2 ROOT
ROOT
625:638 (1%)
698:711 (1%)
view
13 x 2 ROOT
ROOT
133:156 (8%)
88:111 (11%)
view
12 x 2 ROOT
ROOT
11:22 (3%)
4:15 (18%)
view
12 x 2 ROOT
ROOT
70:84 (11%)
78:92 (9%)
view