apple / swift-package-registry-compatibility-test-suite
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
  • 10% duplication:
    • 3,284 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 361 duplicated lines
  • 62 duplicates
system10% (361 lines)
Duplication per Extension
swift11% (361 lines)
Duplication per Component (primary)
Sources/PackageRegistryCompatibilityTestSuite24% (254 lines)
Sources/PackageRegistryCompatibilityTestSuite/APITests11% (83 lines)
Sources/PackageRegistryExample/DataAccess2% (12 lines)
Sources/PackageRegistryTool18% (12 lines)
ROOT0% (0 lines)
Sources/DatabaseMigrations0% (0 lines)
Sources/PackageRegistryClient0% (0 lines)
Sources/PackageRegistryExample/Controllers0% (0 lines)
Sources/PackageRegistryExample0% (0 lines)
Sources/PackageRegistryModels0% (0 lines)
Sources/PostgresMigrations0% (0 lines)
docker0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 62 duplicates...
Size#FoldersFilesLinesCode
25 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
150:186 (4%)
324:360 (4%)
view
25 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
208:244 (4%)
382:418 (4%)
view
25 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
92:128 (4%)
266:302 (4%)
view
25 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
266:302 (4%)
382:418 (4%)
view
25 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
150:186 (4%)
266:302 (4%)
view
25 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
208:244 (4%)
266:302 (4%)
view
25 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
324:360 (4%)
382:418 (4%)
view
25 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
92:128 (4%)
208:244 (4%)
view
25 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
208:244 (4%)
324:360 (4%)
view
25 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
92:128 (4%)
382:418 (4%)
view
25 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
150:186 (4%)
382:418 (4%)
view
25 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
92:128 (4%)
150:186 (4%)
view
25 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
150:186 (4%)
208:244 (4%)
view
25 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
266:302 (4%)
324:360 (4%)
view
25 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
92:128 (4%)
324:360 (4%)
view
21 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
43:72 (3%)
92:121 (3%)
view
21 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
43:72 (3%)
324:353 (3%)
view
21 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
43:72 (3%)
150:179 (3%)
view
21 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
43:72 (3%)
382:411 (3%)
view
21 x 2 Sources/PackageRegistryCompatibilityTestSuite
Sources/PackageRegistryCompatibilityTestSuite
Commands.swift
Commands.swift
43:72 (3%)
208:237 (3%)
view