awslabs / aws-mobile-appsync-sdk-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
  • 40% duplication:
    • 17,862 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 7,261 duplicated lines
  • 3,066 duplicates
system40% (7,261 lines)
Duplication per Extension
swift42% (6,920 lines)
yaml30% (299 lines)
graphql8% (42 lines)
Duplication per Component (primary)
StarWarsAPI77% (3,185 lines)
AWSAppSyncTestCommon66% (2,228 lines)
ApolloTests35% (910 lines)
AWSAppSyncIntegrationTests20% (318 lines)
AWSAppSyncIntegrationTests/ConsoleResources26% (313 lines)
AWSAppSyncClient9% (147 lines)
AWSAppSyncClient/Internal4% (82 lines)
AWSAppSyncTestApp23% (36 lines)
AWSAppSyncTestCommon/MockConnectionProvider33% (18 lines)
AWSAppSyncClient/Apollo<1% (14 lines)
AWSAppSyncTestHostApp76% (10 lines)
AWSAppSyncIntegrationTests/Helpers0% (0 lines)
AWSAppSyncTestAppUITests0% (0 lines)
ROOT0% (0 lines)
AWSAppSyncTestCommon/MockAuthProvider0% (0 lines)
AWSAppSyncTestCommon/MockSubscriptionFactory0% (0 lines)

Duplication Between Components (50+ lines)

G AWSAppSyncTestCommon AWSAppSyncTestCommon StarWarsAPI StarWarsAPI AWSAppSyncTestCommon--StarWarsAPI 296

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 3,066 duplicates...
Size#FoldersFilesLinesCode
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
893:1070 (4%)
2963:3140 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
893:1070 (4%)
3224:3401 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
3443:3620 (4%)
4340:4517 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
667:844 (4%)
3224:3401 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
893:1070 (4%)
2737:2914 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
893:1070 (4%)
2285:2462 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
3224:3401 (4%)
3669:3846 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
667:844 (4%)
2737:2914 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
3224:3401 (4%)
3443:3620 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
893:1070 (4%)
2511:2688 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
667:844 (4%)
2511:2688 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
667:844 (4%)
2963:3140 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
893:1070 (4%)
2059:2236 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
429:606 (4%)
4114:4291 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
667:844 (4%)
1821:1998 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
429:606 (4%)
3888:4065 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
1355:1532 (4%)
2963:3140 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
2285:2462 (4%)
3443:3620 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
667:844 (4%)
2285:2462 (4%)
view
107 x 2 AWSAppSyncTestCommon
AWSAppSyncTestCommon
AppSyncTestAPI.swift
AppSyncTestAPI.swift
429:606 (4%)
3669:3846 (4%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
11 x 2 AWSAppSyncClient/Internal/SubscriptionFactory
AWSAppSyncClient/Internal/SubscriptionFactory
OIDCBasedConnectionPool.swift
UserPoolsBasedConnectionPool.swift
20:33 
20:33 
view
10 x 2 ApolloTests
ApolloTests
NormalizeQueryResults.swift
NormalizeQueryResults.swift
164:177 
179:192 
view
10 x 2 ApolloTests
ApolloTests
FragmentConstructionAndConversionTest...
FragmentConstructionAndConversionTest...
322:333 
350:361 
view
9 x 2 ApolloTests
ApolloTests
FragmentConstructionAndConversionTest...
FragmentConstructionAndConversionTest...
187:196 
209:218 
view