apple / swift-numerics
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:
    • 2,097 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 214 duplicated lines
  • 2 duplicates
system10% (214 lines)
Duplication per Extension
swift11% (214 lines)
Duplication per Component (primary)
Sources/RealModule28% (188 lines)
Sources/IntegerUtilities12% (26 lines)
ROOT0% (0 lines)
Sources/ComplexModule0% (0 lines)
Sources/Numerics0% (0 lines)
Sources/_NumericsShims0% (0 lines)
Sources/_NumericsShims/include0% (0 lines)
Sources/_TestSupport0% (0 lines)
cmake/modules0% (0 lines)
Longest Duplicates
The list of 2 longest duplicates.
See data for all 2 duplicates...
Size#FoldersFilesLinesCode
94 x 2 Sources/RealModule
Sources/RealModule
Float16+Real.swift
Float16+Real.swift
19:175 (48%)
184:340 (48%)
view
13 x 2 Sources/IntegerUtilities
Sources/IntegerUtilities
DivideWithRounding.swift
DivideWithRounding.swift
105:119 (10%)
263:277 (10%)
view