facebookresearch / CPA
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:
    • 2,552 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 120 duplicated lines
  • 6 duplicates
system4% (120 lines)
Duplication per Extension
py4% (120 lines)
Duplication per Component (primary)
compert4% (120 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 6 longest duplicates.
See data for all 6 duplicates...
Size#FoldersFilesLinesCode
23 x 2 compert
compert
plotting.py
plotting.py
686:709 (2%)
831:854 (2%)
view
9 x 2 compert
compert
plotting.py
plotting.py
413:422 (<1%)
983:992 (<1%)
view
8 x 2 compert
compert
api.py
train.py
962:976 (1%)
99:113 (4%)
view
7 x 2 compert
compert
plotting.py
plotting.py
630:636 (<1%)
771:777 (<1%)
view
7 x 2 compert
compert
api.py
api.py
600:608 (1%)
763:772 (1%)
view
6 x 2 compert
compert
sweep.py
sweep_icb.py
19:25 (40%)
21:27 (35%)
view