facebookresearch / fvcore
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
  • 2% duplication:
    • 2,420 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 60 duplicated lines
  • 4 duplicates
system2% (60 lines)
Duplication per Extension
py2% (60 lines)
Duplication per Component (primary)
fvcore/nn2% (28 lines)
fvcore/common2% (16 lines)
fvcore/transforms4% (16 lines)
packaging/fvcore0% (0 lines)
fvcore0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 4 longest duplicates.
See data for all 4 duplicates...
Size#FoldersFilesLinesCode
8 x 2 fvcore/nn
fvcore/nn
activation_count.py
flop_count.py
83:91 (27%)
108:116 (16%)
view
8 x 2 fvcore/common
fvcore/common
param_scheduler.py
param_scheduler.py
81:89 (4%)
137:145 (4%)
view
8 x 2 fvcore/transforms
fvcore/transforms
transform.py
transform.py
772:779 (2%)
784:791 (2%)
view
6 x 2 fvcore/nn
fvcore/nn
activation_count.py
flop_count.py
95:118 (20%)
120:144 (12%)
view