facebook / idb
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
  • 3% duplication:
    • 43,101 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,689 duplicated lines
  • 387 duplicates
system3% (1,689 lines)
Duplication per Extension
m4% (1,065 lines)
py6% (488 lines)
proto5% (40 lines)
h<1% (36 lines)
mm1% (32 lines)
swift2% (28 lines)
Duplication per Component (primary)
idb6% (488 lines)
FBControlCore3% (361 lines)
FBDeviceControl5% (299 lines)
FBSimulatorControl4% (227 lines)
idb_companion1% (86 lines)
Fixtures55% (76 lines)
XCTestBootstrap1% (43 lines)
proto5% (40 lines)
FBSimulatorControlTests5% (24 lines)
fbxctest2% (23 lines)
PrivateHeaders<1% (16 lines)
FBControlCoreTests3% (6 lines)
XCTestBootstrapTests0% (0 lines)
ROOT0% (0 lines)
website0% (0 lines)
Shims0% (0 lines)
Longest Duplicates
The list of 50 longest duplicates.
See data for all 387 duplicates...
Size#FoldersFilesLinesCode
27 x 2 Fixtures/Source/MacUnitTestFixture
Fixtures/Source/iOSUnitTestFixture
51:100 (61%)
51:100 (61%)
view
21 x 2 FBControlCore/Utility
FBControlCore/Utility
186:212 (16%)
125:151 (19%)
view
18 x 2 idb/common
idb/common
96:113 (15%)
129:146 (15%)
view
18 x 2 idb/common
idb/grpc
676:693 (2%)
1320:1340 (1%)
view
15 x 2 FBControlCore/Utility
FBControlCore/Utility
434:467 (5%)
476:509 (5%)
view
14 x 2 idb/common
idb/grpc
454:467 (2%)
1151:1164 (1%)
view
13 x 2 idb/common
idb/grpc
660:672 (2%)
922:934 (1%)
view
13 x 2 FBControlCore/Utility
FBControlCore/Utility
309:338 (4%)
346:375 (4%)
view
12 x 2 idb/common
idb/grpc
10:21 (7%)
10:21 (14%)
view
12 x 2 FBSimulatorControlTests/Fixtures
FBSimulatorControlTests/Fixtures
63:74 (11%)
82:93 (11%)
view
12 x 2 idb/cli/commands
idb/cli/commands
26:37 (12%)
83:94 (12%)
view
11 x 2 Fixtures/Source/MacUnitTestFixture
Fixtures/Source/iOSUnitTestFixture
21:46 (25%)
21:46 (25%)
view
11 x 2 FBControlCore/Applications
FBControlCore/Applications
158:170 (4%)
177:189 (4%)
view
11 x 2 idb/cli/commands
idb/cli/commands
118:129 (9%)
153:164 (7%)
view
11 x 2 idb/grpc
idb/grpc
51:61 (19%)
53:63 (17%)
view
11 x 2 FBDeviceControl/Commands
FBDeviceControl/Commands
197:209 (5%)
235:247 (5%)
view
10 x 2 idb_companion/SwiftServer/MethodHandlers
idb_companion/SwiftServer/MethodHandlers
44:53 (14%)
57:66 (14%)
view
10 x 2 FBDeviceControl/Management
FBDeviceControl/Management
58:67 (12%)
133:142 (12%)
view
10 x 2 FBControlCore/Configuration
FBControlCore/Configuration
25:34 (25%)
37:46 (25%)
view
9 x 2 FBDeviceControl/Management
FBDeviceControl/Management
120:132 (4%)
70:82 (10%)
view
9 x 2 FBControlCore/Utility
FBControlCore/Utility
157:168 (6%)
96:107 (8%)
view
9 x 2 XCTestBootstrap/Strategies
fbxctest/FBXCTestKit/Runners
66:81 (4%)
32:47 (5%)
view
9 x 2 idb_companion/Server
idb_companion/Server
1470:1480 (<1%)
1662:1671 (<1%)
view
9 x 2 FBControlCore/Utility
FBControlCore/Utility
375:394 (1%)
973:992 (1%)
view
9 x 2 FBDeviceControl/Management
FBDeviceControl/Management
29:43 (8%)
228:242 (4%)
view
9 x 2 FBSimulatorControl/Commands
FBSimulatorControl/Commands
65:75 (10%)
82:92 (10%)
view
9 x 2 idb/cli/commands
idb/cli/commands
56:64 (3%)
115:123 (3%)
view
9 x 2 idb/grpc
idb/grpc
985:994 (<1%)
1403:1412 (<1%)
view
9 x 2 FBControlCore/Configuration
FBControlCore/Configuration
17:25 (13%)
32:40 (13%)
view
8 x 2 FBSimulatorControl/Commands
FBSimulatorControl/Commands
30:44 (2%)
29:43 (17%)
view
8 x 2 FBDeviceControl/Commands
FBDeviceControl/Commands
27:41 (14%)
23:37 (47%)
view
8 x 2 FBDeviceControl/Commands
FBDeviceControl/Commands
30:44 (3%)
24:38 (16%)
view
8 x 2 FBDeviceControl/Commands
FBDeviceControl/Commands
30:44 (3%)
40:54 (12%)
view
8 x 2 FBSimulatorControl/Commands
FBSimulatorControl/Commands
379:393 (3%)
25:39 (36%)
view
8 x 2 FBSimulatorControl/Commands
FBSimulatorControl/Commands
29:43 (2%)
24:38 (9%)
view
8 x 2 FBDeviceControl/Commands
FBDeviceControl/Commands
162:176 (6%)
22:36 (11%)
view
8 x 2 FBSimulatorControl/Commands
FBSimulatorControl/Commands
24:38 (9%)
38:52 (6%)
view
8 x 2 FBDeviceControl/Commands
FBDeviceControl/Commands
30:44 (3%)
37:51 (5%)
view
8 x 2 FBDeviceControl/Commands
FBDeviceControl/Commands
26:40 (3%)
23:37 (12%)
view
8 x 2 FBDeviceControl/Commands
FBDeviceControl/Commands
30:44 (3%)
26:40 (22%)
view
8 x 2 FBSimulatorControl/Commands
FBSimulatorControl/Commands
379:393 (3%)
28:42 (8%)
view
8 x 2 FBSimulatorControl/Commands
FBSimulatorControl/Commands
20:34 (18%)
26:40 (18%)
view
8 x 2 FBDeviceControl/Commands
FBDeviceControl/Commands
26:40 (3%)
162:176 (6%)
view
8 x 2 FBSimulatorControl/Commands
FBSimulatorControl/Commands
20:34 (18%)
24:38 (9%)
view
8 x 2 FBSimulatorControl/Commands
FBSimulatorControl/Commands
38:52 (6%)
29:43 (17%)
view
8 x 2 idb_companion/SwiftServer/MethodHandlers
idb_companion/SwiftServer/MethodHandlers
44:51 (11%)
71:78 (11%)
view
8 x 2 idb/common
idb/grpc
469:476 (1%)
1166:1173 (<1%)
view
8 x 2 FBSimulatorControl/Commands
FBSimulatorControl/Commands
38:52 (6%)
34:48 (5%)
view
8 x 2 FBSimulatorControl/Commands
FBSimulatorControl/Commands
29:43 (17%)
34:48 (5%)
view
8 x 2 FBDeviceControl/Commands
FBDeviceControl/Commands
61:75 (16%)
24:38 (16%)
view