apple / ml-knowledge-conflicts
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
  • 9% duplication:
    • 939 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 90 duplicated lines
  • 5 duplicates
system9% (90 lines)
Duplication per Extension
py9% (90 lines)
Duplication per Component (primary)
src14% (90 lines)
src/classes0% (0 lines)
Longest Duplicates
The list of 5 longest duplicates.
See data for all 5 duplicates...
Size#FoldersFilesLinesCode
18 x 2 src
src
substitution_fns.py
substitution_fns.py
130:148 (6%)
275:293 (6%)
view
8 x 2 src
src
generate_substitutions.py
load_dataset.py
72:79 (5%)
43:50 (17%)
view
7 x 2 src
src
substitution_fns.py
substitution_fns.py
96:116 (2%)
239:260 (2%)
view
6 x 2 src
src
generate_substitutions.py
generate_substitutions.py
149:154 (4%)
166:171 (4%)
view
6 x 2 src
src
generate_substitutions.py
generate_substitutions.py
142:147 (4%)
159:164 (4%)
view