apple / swift-nio-transport-services
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
  • 5% duplication:
    • 1,736 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 90 duplicated lines
  • 6 duplicates
system5% (90 lines)
Duplication per Extension
swift5% (90 lines)
Duplication per Component (primary)
Sources/NIOTransportServices5% (90 lines)
ROOT0% (0 lines)
Sources/NIOTSHTTPClient0% (0 lines)
Sources/NIOTSHTTPServer0% (0 lines)
docker0% (0 lines)
Longest Duplicates
The list of 6 longest duplicates.
See data for all 6 duplicates...
Size#FoldersFilesLinesCode
9 x 2 Sources/NIOTransportServices
Sources/NIOTransportServices
NIOTSConnectionChannel.swift
NIOTSListenerChannel.swift
248:267 (2%)
137:156 (3%)
view
8 x 2 Sources/NIOTransportServices
Sources/NIOTransportServices
NIOTSConnectionChannel.swift
NIOTSListenerChannel.swift
872:888 (1%)
480:496 (3%)
view
7 x 2 Sources/NIOTransportServices
Sources/NIOTransportServices
NIOTSConnectionChannel.swift
NIOTSListenerChannel.swift
300:306 (1%)
189:195 (2%)
view
7 x 2 Sources/NIOTransportServices
Sources/NIOTransportServices
NIOTSConnectionChannel.swift
NIOTSListenerChannel.swift
271:279 (1%)
161:169 (2%)
view
7 x 2 Sources/NIOTransportServices
Sources/NIOTransportServices
NIOTSConnectionChannel.swift
NIOTSListenerChannel.swift
353:359 (1%)
226:232 (2%)
view
7 x 2 Sources/NIOTransportServices
Sources/NIOTransportServices
NIOTSConnectionBootstrap.swift
NIOTSListenerBootstrap.swift
129:149 (7%)
223:243 (4%)
view