aws-amplify / aws-appsync-realtime-client-ios
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
  • 18% duplication:
    • 2,016 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 369 duplicated lines
  • 50 duplicates
system18% (369 lines)
Duplication per Extension
swift18% (369 lines)
Duplication per Component (primary)
AppSyncRealTimeClientTests/ConnectionProvider61% (118 lines)
AppSyncRealTimeClientTests/Connection60% (93 lines)
AppSyncRealTimeClientIntegrationTests29% (60 lines)
AppSyncRealTimeClient/Interceptor40% (58 lines)
AppSyncRealTimeClientTests/Interceptor23% (16 lines)
AppSyncRTCSample6% (15 lines)
HostApp33% (9 lines)
AppSyncRealTimeClientTests/Support0% (0 lines)
AppSyncRealTimeClientTests/TestSupport0% (0 lines)
AppSyncRealTimeClientIntegrationTests/Support0% (0 lines)
ROOT0% (0 lines)
AppSyncRealTimeClient/Connection0% (0 lines)
AppSyncRealTimeClient/Websocket0% (0 lines)
AppSyncRealTimeClient/ConnectionProvider0% (0 lines)
AppSyncRealTimeClient/Support0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 50 duplicates...
Size#FoldersFilesLinesCode
29 x 2 AppSyncRealTimeClientTests/ConnectionProvider
AppSyncRealTimeClientTests/ConnectionProvider
ConnectionProviderStaleConnectionTest...
ConnectionProviderTests.swift
21:62 (93%)
184:225 (25%)
view
14 x 2 AppSyncRealTimeClientTests/Connection
AppSyncRealTimeClientTests/Connection
AppSyncSubscriptionConnectionTests.swift
AppSyncSubscriptionConnectionTests.swift
118:136 (9%)
158:176 (9%)
view
13 x 2 AppSyncRealTimeClientTests/Connection
AppSyncRealTimeClientTests/Connection
AppSyncSubscriptionConnectionTests.swift
AppSyncSubscriptionConnectionTests.swift
44:61 (8%)
246:263 (8%)
view
13 x 2 AppSyncRealTimeClientTests/ConnectionProvider
AppSyncRealTimeClientTests/ConnectionProvider
ConnectionProviderTests.swift
ConnectionProviderTests.swift
35:51 (11%)
86:102 (11%)
view
12 x 2 AppSyncRealTimeClient/Interceptor
AppSyncRealTimeClient/Interceptor
APIKeyAuthInterceptor.swift
OIDCAuthInterceptor.swift
33:48 (19%)
59:74 (19%)
view
11 x 2 AppSyncRealTimeClient/Interceptor
AppSyncRealTimeClient/Interceptor
APIKeyAuthInterceptor.swift
OIDCAuthInterceptor.swift
56:68 (18%)
30:42 (18%)
view
10 x 2 AppSyncRealTimeClientTests/Connection
AppSyncRealTimeClientTests/Connection
AppSyncSubscriptionConnectionTests.swift
AppSyncSubscriptionConnectionTests.swift
79:90 (6%)
203:214 (6%)
view
10 x 2 AppSyncRealTimeClientTests/Connection
AppSyncRealTimeClientTests/Connection
AppSyncSubscriptionConnectionTests.swift
AppSyncSubscriptionConnectionTests.swift
41:52 (6%)
203:214 (6%)
view
10 x 2 AppSyncRealTimeClientTests/Connection
AppSyncRealTimeClientTests/Connection
AppSyncSubscriptionConnectionTests.swift
AppSyncSubscriptionConnectionTests.swift
41:52 (6%)
79:90 (6%)
view
9 x 2 AppSyncRTCSample
HostApp
SceneDelegate.swift
SceneDelegate.swift
28:53 (45%)
22:45 (64%)
view
9 x 2 AppSyncRealTimeClientIntegrationTests
AppSyncRealTimeClientIntegrationTests
AppSyncRealTimeClientIntegrationTests...
AppSyncRealTimeClientIntegrationTests...
170:178 (5%)
197:205 (5%)
view
9 x 2 AppSyncRealTimeClientTests/ConnectionProvider
AppSyncRealTimeClientTests/ConnectionProvider
ConnectionProviderTests.swift
ConnectionProviderTests.swift
26:38 (7%)
140:152 (7%)
view
9 x 2 AppSyncRealTimeClientTests/ConnectionProvider
AppSyncRealTimeClientTests/ConnectionProvider
ConnectionProviderTests.swift
ConnectionProviderTests.swift
44:59 (7%)
158:173 (7%)
view
8 x 2 AppSyncRealTimeClientTests/Interceptor
AppSyncRealTimeClientTests/Interceptor
APIKeyAuthInterceptorTests.swift
OIDCAuthInterceptorTests.swift
24:34 (44%)
24:34 (38%)
view
7 x 2 AppSyncRealTimeClientTests/ConnectionProvider
AppSyncRealTimeClientTests/ConnectionProvider
ConnectionProviderTests.swift
ConnectionProviderTests.swift
158:168 (6%)
211:220 (6%)
view
7 x 2 AppSyncRealTimeClientTests/Connection
AppSyncRealTimeClientTests/Connection
AppSyncSubscriptionConnectionTests.swift
AppSyncSubscriptionConnectionTests.swift
41:48 (4%)
163:170 (4%)
view
7 x 2 AppSyncRealTimeClientTests/ConnectionProvider
AppSyncRealTimeClientTests/ConnectionProvider
ConnectionProviderTests.swift
ConnectionProviderTests.swift
44:54 (6%)
211:220 (6%)
view
7 x 2 AppSyncRealTimeClientTests/Connection
AppSyncRealTimeClientTests/Connection
AppSyncSubscriptionConnectionTests.swift
AppSyncSubscriptionConnectionTests.swift
79:86 (4%)
123:130 (4%)
view
7 x 2 AppSyncRealTimeClientTests/Connection
AppSyncRealTimeClientTests/Connection
AppSyncSubscriptionConnectionTests.swift
AppSyncSubscriptionConnectionTests.swift
41:48 (4%)
123:130 (4%)
view
7 x 2 AppSyncRealTimeClientTests/ConnectionProvider
AppSyncRealTimeClientTests/ConnectionProvider
ConnectionProviderStaleConnectionTest...
ConnectionProviderTests.swift
48:57 (22%)
158:168 (6%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
33 x 2 AppSyncRealTimeClientTests/ConnectionProvider
AppSyncRealTimeClientTests/ConnectionProvider
ConnectionProviderTests.swift
ConnectionProviderStaleConnectionTest...
184:226 
21:63 
view
10 x 2 AppSyncRealTimeClientTests/Support
AppSyncRealTimeClientTests/Support
RealtimeGatewayURLInterceptorTests.swift
RealtimeGatewayURLInterceptorTests.swift
19:29 
31:41 
view