facebookresearch / deepfloat
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
  • 18% duplication:
    • 34,676 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 6,454 duplicated lines
  • 2,668 duplicates
system18% (6,454 lines)
Duplication per Extension
sv16% (4,260 lines)
cl62% (934 lines)
h24% (786 lines)
cpp13% (316 lines)
py11% (158 lines)
Duplication per Component (primary)
rtl/posit25% (1,786 lines)
rtl/log7% (1,020 lines)
rtl/paper_syn46% (763 lines)
rtl/float24% (638 lines)
bitstream/positlib57% (467 lines)
bitstream/loglib62% (467 lines)
cpp/utils17% (448 lines)
cpp/ops32% (342 lines)
cpp/layers19% (298 lines)
rtl/utils8% (169 lines)
py8% (42 lines)
cpp4% (14 lines)
bitstream0% (0 lines)

Duplication Between Components (50+ lines)

G bitstream/loglib bitstream/loglib bitstream/positlib bitstream/positlib bitstream/loglib--bitstream/positlib 886 rtl/log rtl/log rtl/posit rtl/posit rtl/log--rtl/posit 881 rtl/utils rtl/utils rtl/posit--rtl/utils 86 rtl/float rtl/float rtl/float--rtl/log 313 rtl/float--rtl/posit 441

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 2,668 duplicates...
Size#FoldersFilesLinesCode
120 x 2 bitstream/loglib
bitstream/positlib
cl
Memory.cl
Memory.cl
1:142 (100%)
1:142 (100%)
view
68 x 2 rtl/paper_syn
rtl/paper_syn
sv
Waves_PaperIntegerSystolicGrid.sv
Waves_PaperLogSystolicGrid.sv
48:131 (64%)
82:165 (51%)
view
54 x 2 rtl/paper_syn
rtl/paper_syn
sv
Waves_PaperLogFlatIntoFloatPETop.sv
Waves_PaperLogFlatPETop.sv
21:82 (45%)
21:82 (45%)
view
46 x 2 rtl/float
rtl/float
sv
FloatAddTest.sv
FloatMultiplyTest.sv
283:341 (15%)
237:295 (12%)
view
43 x 2 bitstream/loglib
bitstream/positlib
cl
LogMM.cl
PositMM.cl
11:59 (22%)
12:60 (23%)
view
42 x 2 bitstream/loglib
bitstream/positlib
cl
LogMath.cl
PositMath.cl
11:58 (26%)
11:58 (26%)
view
40 x 2 rtl/paper_syn
rtl/paper_syn
sv
PaperLogFlatIntoFloatPETop.sv
PaperLogFlatPETop.sv
38:85 (47%)
41:88 (43%)
view
40 x 2 bitstream/loglib
bitstream/positlib
cl
LogMath.cl
PositMath.cl
122:171 (25%)
126:175 (25%)
view
38 x 2 bitstream/loglib
bitstream/positlib
cl
LogConv.cl
PositConv.cl
10:54 (34%)
10:54 (34%)
view
36 x 2 rtl/float
rtl/float
sv
FloatAdd.sv
FloatMultiply.sv
452:491 (8%)
320:359 (11%)
view
36 x 2 rtl/log
rtl/posit
sv
LogCompare.sv
PositCompare.sv
48:85 (49%)
46:83 (51%)
view
36 x 2 rtl/paper_syn
rtl/paper_syn
sv
Waves_PaperLogFlatIntoFloatPETop.sv
Waves_PaperLogFlatPETop.sv
93:138 (30%)
91:136 (30%)
view
32 x 2 rtl/log/operators
rtl/posit/operators
sv
LogMathInstance.sv
PositMathInstance.sv
102:139 (28%)
92:129 (29%)
view
31 x 2 rtl/paper_syn
rtl/paper_syn
sv
Waves_PaperLogFlatPETop.sv
Waves_PaperLogPETop.sv
93:133 (26%)
92:132 (27%)
view
31 x 2 rtl/paper_syn
rtl/paper_syn
sv
Waves_PaperLogFlatIntoFloatPETop.sv
Waves_PaperLogPETop.sv
95:135 (26%)
92:132 (27%)
view
29 x 2 rtl/float
rtl/float
sv
FloatAddTest.sv
FloatMultiplyTest.sv
244:281 (10%)
198:235 (8%)
view
29 x 2 bitstream/loglib
bitstream/positlib
cl
LogConv.cl
PositConv.cl
97:128 (26%)
97:128 (26%)
view
28 x 2 rtl/posit/operators
rtl/posit/operators
sv
PositMath.sv
PositMath.sv
69:101 (8%)
197:229 (8%)
view
26 x 2 rtl/posit
rtl/posit
sv
PositRoundStochastic.sv
PositRoundToNearestEven.sv
26:55 (24%)
26:55 (26%)
view
25 x 2 rtl/paper_syn
rtl/paper_syn
sv
Waves_PaperFloatPETop.sv
Waves_PaperLogFlatIntoFloatPETop.sv
60:93 (29%)
96:128 (21%)
view