apple / swift-sample-distributed-actors-transport
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
  • 4% duplication:
    • 1,206 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 49 duplicated lines
  • 5 duplicates
system4% (49 lines)
Duplication per Extension
swift4% (49 lines)
Duplication per Component (primary)
SampleApp/Sources/FishyActorsDemo13% (37 lines)
FishyTransport/Sources/FishyActorsGenerator3% (12 lines)
FishyTransport0% (0 lines)
FishyTransport/Plugins/FishyActorTransportPlugin0% (0 lines)
FishyTransport/Sources/FishyActorTransport0% (0 lines)
SampleApp0% (0 lines)
Longest Duplicates
The list of 5 longest duplicates.
See data for all 5 duplicates...
Size#FoldersFilesLinesCode
8 x 2 SampleApp/Sources/FishyActorsDemo
SampleApp/Sources/FishyActorsDemo
_PrettyDemoLogger.swift
_PrettyDemoLogger.swift
196:208 (4%)
240:252 (4%)
view
7 x 2 SampleApp/Sources/FishyActorsDemo
SampleApp/Sources/FishyActorsDemo
Actors.swift
Actors.swift
137:148 (10%)
153:164 (10%)
view
7 x 2 SampleApp/Sources/FishyActorsDemo
SampleApp/Sources/FishyActorsDemo
_PrettyDemoLogger.swift
_PrettyDemoLogger.swift
196:206 (4%)
218:228 (4%)
view
7 x 2 SampleApp/Sources/FishyActorsDemo
SampleApp/Sources/FishyActorsDemo
_PrettyDemoLogger.swift
_PrettyDemoLogger.swift
218:228 (4%)
240:250 (4%)
view
6 x 2 FishyTransport/Sources/FishyActorsGenerator
FishyTransport/Sources/FishyActorsGenerator
Analysis.swift
Analysis.swift
149:159 (4%)
163:173 (4%)
view