facebook / facebook-ios-sdk
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
  • 15% duplication:
    • 83,096 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 13,207 duplicated lines
  • 1,861 duplicates
system15% (13,207 lines)
Duplication per Extension
swift20% (10,831 lines)
m5% (1,231 lines)
yml53% (568 lines)
h7% (509 lines)
mm8% (68 lines)
Duplication per Component (primary)
FBSDKCoreKit15% (8,360 lines)
FBAEMKit24% (1,623 lines)
FBSDKGamingServicesKit19% (1,254 lines)
FBSDKLoginKit13% (1,031 lines)
FBSDKShareKit12% (675 lines)
TestTools10% (117 lines)
FBSDKCoreKit_Basics6% (76 lines)
FBSDKTVOSKit10% (53 lines)
testing46% (18 lines)
ROOT0% (0 lines)
scripts0% (0 lines)
Sources0% (0 lines)

Duplication Between Components (50+ lines)

G FBAEMKit FBAEMKit FBSDKCoreKit FBSDKCoreKit FBAEMKit--FBSDKCoreKit 387 FBSDKShareKit FBSDKShareKit FBAEMKit--FBSDKShareKit 240 FBSDKGamingServicesKit FBSDKGamingServicesKit FBAEMKit--FBSDKGamingServicesKit 240 FBSDKLoginKit FBSDKLoginKit FBSDKCoreKit--FBSDKLoginKit 316 FBSDKCoreKit--FBSDKShareKit 304 FBSDKCoreKit--FBSDKGamingServicesKit 294 FBSDKLoginKit--FBSDKShareKit 80 FBSDKTVOSKit FBSDKTVOSKit FBSDKLoginKit--FBSDKTVOSKit 72 FBSDKGamingServicesKit--FBSDKShareKit 288

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 1,861 duplicates...
Size#FoldersFilesLinesCode
95 x 2 FBSDKGamingServicesKit/FBSDKGamingServicesKitTests
FBSDKShareKit/FBSDKShareKitTests/Internal
12:149 (98%)
12:149 (98%)
view
95 x 2 FBSDKCoreKit/FBSDKCoreKitTests/Internal
FBSDKShareKit/FBSDKShareKitTests/Internal
12:149 (98%)
12:149 (98%)
view
95 x 2 FBAEMKit/FBAEMKitTests
FBSDKGamingServicesKit/FBSDKGamingServicesKitTests
12:149 (98%)
12:149 (98%)
view
95 x 2 FBAEMKit/FBAEMKitTests
FBSDKCoreKit/FBSDKCoreKitTests/Internal
12:149 (98%)
12:149 (98%)
view
95 x 2 FBSDKCoreKit/FBSDKCoreKitTests/Internal
FBSDKGamingServicesKit/FBSDKGamingServicesKitTests
12:149 (98%)
12:149 (98%)
view
95 x 2 FBAEMKit/FBAEMKitTests
FBSDKShareKit/FBSDKShareKitTests/Internal
12:149 (98%)
12:149 (98%)
view
68 x 2 FBSDKCoreKit/FBSDKCoreKit/Internal/Configuration
FBSDKCoreKit/FBSDKCoreKit/Internal/Configuration
156:225 (46%)
62:131 (24%)
view
59 x 2 FBSDKCoreKit/FBSDKCoreKi...ppEvents/SuggestedEvent
FBSDKCoreKit/FBSDKCoreKi...ppEvents/SuggestedEvent
39:97 (21%)
123:181 (21%)
view
57 x 2 FBSDKCoreKit
FBSDKCoreKit
116:172 (15%)
220:276 (15%)
view
40 x 2 FBSDKCoreKit/FBSDKCoreKi...nal/AppEvents/Integrity
FBSDKCoreKit/FBSDKCoreKi...nal/AppEvents/Integrity
39:80 (10%)
95:135 (10%)
view
36 x 2 FBSDKCoreKit/FBSDKCoreKit
FBSDKCoreKit/FBSDKCoreKit
124:159 (22%)
203:238 (22%)
view
32 x 2 FBSDKCoreKit/FBSDKCoreKi...l/AppEvents/SKAdNetwork
FBSDKCoreKit/FBSDKCoreKi...l/AppEvents/SKAdNetwork
234:265 (9%)
305:336 (9%)
view
29 x 2 FBSDKLoginKit/FBSDKLoginKitTests
FBSDKLoginKit/FBSDKLoginKitTests
517:552 (2%)
571:605 (2%)
view
28 x 2 FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI
FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI
173:201 (11%)
243:271 (11%)
view
25 x 2 FBSDKCoreKit/FBSDKCoreKit/Internal
FBSDKShareKit/FBSDKShareKit/Internal
11:52 (100%)
9:50 (100%)
view
25 x 2 FBAEMKit/FBAEMKit
FBSDKCoreKit/FBSDKCoreKit/Internal
9:50 (100%)
11:52 (100%)
view
25 x 2 FBSDKLoginKit/FBSDKLoginKitTests
FBSDKLoginKit/FBSDKLoginKitTests
825:852 (2%)
869:896 (2%)
view
25 x 2 FBSDKGamingServicesKit/F...ingServicesKit/Internal
FBSDKShareKit/FBSDKShareKit/Internal
11:52 (100%)
9:50 (100%)
view
25 x 2 FBAEMKit/FBAEMKit
FBSDKShareKit/FBSDKShareKit/Internal
9:50 (100%)
9:50 (100%)
view
25 x 2 FBAEMKit/FBAEMKit
FBSDKGamingServicesKit/F...ingServicesKit/Internal
9:50 (100%)
11:52 (100%)
view
25 x 2 FBSDKCoreKit/FBSDKCoreKit/Internal
FBSDKGamingServicesKit/F...ingServicesKit/Internal
11:52 (100%)
11:52 (100%)
view
23 x 2 FBAEMKit/FBAEMKitTests
FBAEMKit/FBAEMKitTests
105:127 (5%)
131:154 (5%)
view
22 x 2 FBSDKCoreKit/FBSDKCoreKitTests/Internal
FBSDKCoreKit/FBSDKCoreKitTests/Internal
43:64 (8%)
124:145 (8%)
view
22 x 2 FBSDKCoreKit/FBSDKCoreKit
FBSDKCoreKit/FBSDKCoreKit/Internal/Device
198:225 (13%)
248:275 (10%)
view
22 x 2 FBSDKCoreKit/FBSDKCoreKitTests
FBSDKCoreKit/FBSDKCoreKitTests
148:170 (2%)
176:198 (2%)
view
22 x 2 FBAEMKit/FBAEMKitTests
FBAEMKit/FBAEMKitTests
603:624 (2%)
636:657 (2%)
view
22 x 2 FBSDKCoreKit/FBSDKCoreKi...l/AppEvents/SKAdNetwork
FBSDKCoreKit/FBSDKCoreKi...l/AppEvents/SKAdNetwork
87:108 (6%)
267:288 (6%)
view
21 x 2 FBSDKLoginKit/FBSDKLoginKitTests
FBSDKLoginKit/FBSDKLoginKitTests
713:734 (1%)
877:899 (1%)
view
21 x 2 FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI
FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI
583:604 (2%)
621:642 (2%)
view
21 x 2 FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI
FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI
660:681 (2%)
699:720 (2%)
view
20 x 2 FBSDKCoreKit/FBSDKCoreKitTests
FBSDKCoreKit/FBSDKCoreKitTests
120:140 (2%)
175:195 (2%)
view
20 x 2 FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI
FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI
572:596 (2%)
648:673 (2%)
view
20 x 2 FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI
FBSDKCoreKit/FBSDKCoreKitTests/Internal/BridgeAPI
610:634 (2%)
687:712 (2%)
view
20 x 2 FBSDKCoreKit/FBSDKCoreKi...l/AppEvents/SKAdNetwork
FBSDKCoreKit/FBSDKCoreKi...l/AppEvents/SKAdNetwork
71:90 (6%)
242:261 (6%)
view
20 x 2 FBSDKCoreKit/FBSDKCoreKi...l/AppEvents/SKAdNetwork
FBSDKCoreKit/FBSDKCoreKi...l/AppEvents/SKAdNetwork
71:90 (6%)
313:332 (6%)
view
19 x 2 FBSDKCoreKit/FBSDKCoreKi...nal/AppEvents/Integrity
FBSDKCoreKit/FBSDKCoreKi...nal/AppEvents/Integrity
62:80 (5%)
269:287 (5%)
view
19 x 2 FBSDKCoreKit/FBSDKCoreKitTests
FBSDKCoreKit/FBSDKCoreKitTests
168:186 (1%)
190:208 (1%)
view
19 x 2 FBAEMKit/FBAEMKitTests/Helpers
FBAEMKit/FBAEMKitTests/Helpers
168:186 (10%)
35:53 (12%)
view
19 x 2 FBSDKCoreKit/FBSDKCoreKi...nal/AppEvents/Integrity
FBSDKCoreKit/FBSDKCoreKi...nal/AppEvents/Integrity
117:135 (5%)
269:287 (5%)
view
19 x 2 FBSDKLoginKit/FBSDKLoginKitTests
FBSDKLoginKit/FBSDKLoginKitTests
199:221 (2%)
559:581 (2%)
view
19 x 2 FBSDKCoreKit/FBSDKCoreKit
FBSDKCoreKit/FBSDKCoreKitTests/Interfaces
83:101 (10%)
30:48 (63%)
view
19 x 2 FBSDKLoginKit/FBSDKLoginKitTests
FBSDKLoginKit/FBSDKLoginKitTests
290:312 (2%)
559:581 (2%)
view
19 x 2 FBSDKCoreKit/FBSDKCoreKitTests
FBSDKCoreKit/FBSDKCoreKitTests
121:140 (1%)
148:167 (1%)
view
19 x 2 FBSDKLoginKit/FBSDKLoginKitTests
FBSDKLoginKit/FBSDKLoginKitTests
199:221 (2%)
290:312 (2%)
view
19 x 2 FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers
FBSDKCoreKit/FBSDKCoreKitTests/Internal/Helpers
24:42 (14%)
84:102 (14%)
view
18 x 2 FBSDKShareKit/FBSDKShareKitTests/UserInterface
FBSDKShareKit/FBSDKShareKitTests/UserInterface
86:111 (17%)
85:110 (17%)
view
18 x 2 FBSDKLoginKit/FBSDKLoginKitTests
FBSDKLoginKit/FBSDKLoginKitTests
713:731 (1%)
834:852 (1%)
view
18 x 2 FBSDKCoreKit/FBSDKCoreKi...vents/Internal/Codeless
FBSDKCoreKit/FBSDKCoreKi.../Internal/ViewHierarchy
503:526 (5%)
657:680 (4%)
view
18 x 2 FBAEMKit/FBAEMKitTests
FBAEMKit/FBAEMKitTests/Helpers
168:185 (5%)
36:53 (11%)
view
18 x 2 FBSDKCoreKit
FBSDKCoreKit
182:199 (5%)
287:304 (5%)
view
Duplicated Units
The list of top 5 duplicated units.
See data for all 5 unit duplicates...
Size#FoldersFilesLinesCode
10 x 4 FBSDKCoreKit/FBSDKCoreKitTests/Internal
FBAEMKit/FBAEMKitTests
FBSDKGamingServicesKit/FBSDKGamingServicesKitTests
FBSDKShareKit/FBSDKShareKitTests/Internal
39:50 
39:50 
39:50 
39:50 
view
9 x 2 FBSDKCoreKit/FBSDKCoreKitTests
FBSDKShareKit/FBSDKShareKitTests/Bridging
16:26 
17:27 
view
7 x 4 FBSDKCoreKit/FBSDKCoreKitTests/Internal
FBAEMKit/FBAEMKitTests
FBSDKGamingServicesKit/FBSDKGamingServicesKitTests
FBSDKShareKit/FBSDKShareKitTests/Internal
61:69 
61:69 
61:69 
61:69 
view
6 x 4 FBSDKCoreKit/FBSDKCoreKitTests/Internal
FBAEMKit/FBAEMKitTests
FBSDKGamingServicesKit/FBSDKGamingServicesKitTests
FBSDKShareKit/FBSDKShareKitTests/Internal
52:59 
52:59 
52:59 
52:59 
view
6 x 4 FBSDKCoreKit/FBSDKCoreKitTests/Internal
FBAEMKit/FBAEMKitTests
FBSDKGamingServicesKit/FBSDKGamingServicesKitTests
FBSDKShareKit/FBSDKShareKitTests/Internal
71:78 
71:78 
71:78 
71:78 
view