facebookresearch / CrypTen
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:
    • 11,132 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,084 duplicated lines
  • 93 duplicates
system9% (1,084 lines)
Duplication per Extension
py9% (1,052 lines)
js6% (18 lines)
css7% (14 lines)
Duplication per Component (primary)
benchmarks/dash_app38% (311 lines)
crypten10% (232 lines)
crypten/mpc10% (184 lines)
crypten/nn5% (110 lines)
benchmarks8% (58 lines)
crypten/common4% (54 lines)
crypten/communicator9% (51 lines)
tutorials27% (38 lines)
website/pages8% (18 lines)
scripts5% (16 lines)
crypten/debug6% (6 lines)
crypten/cuda1% (6 lines)
pycon-workshop-20200% (0 lines)
website/core0% (0 lines)
website0% (0 lines)
website/static0% (0 lines)
crypten/config0% (0 lines)
crypten/optim0% (0 lines)
crypten/models0% (0 lines)
ROOT0% (0 lines)
configs0% (0 lines)

Duplication Between Components (50+ lines)

G crypten/common crypten/common crypten crypten crypten/common--crypten 66

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 93 duplicates...
Size#FoldersFilesLinesCode
31 x 2 benchmarks/dash_app
benchmarks/dash_app
app.py
app.py
52:82 (4%)
226:256 (4%)
view
20 x 2 crypten/common/functions
crypten
regular.py
gradients.py
170:194 (10%)
1237:1261 (1%)
view
18 x 2 crypten/mpc/primitives
crypten/mpc/primitives
arithmetic.py
binary.py
46:86 (4%)
37:77 (6%)
view
17 x 2 benchmarks/dash_app
benchmarks/dash_app
app.py
app.py
507:525 (2%)
543:561 (2%)
view
16 x 2 crypten/mpc/primitives
crypten/mpc/primitives
arithmetic.py
binary.py
113:138 (3%)
146:171 (5%)
view
15 x 2 benchmarks/dash_app
benchmarks/dash_app
app.py
app.py
622:638 (2%)
671:687 (2%)
view
13 x 2 crypten
crypten
gradients.py
gradients.py
1286:1302 (<1%)
1334:1349 (<1%)
view
13 x 2 crypten/nn
crypten/nn
module.py
module.py
2001:2095 (<1%)
2134:2233 (<1%)
view
12 x 2 crypten/nn
crypten/nn
module.py
module.py
2101:2112 (<1%)
2237:2248 (<1%)
view
12 x 2 crypten
crypten
gradients.py
gradients.py
516:528 (<1%)
556:568 (<1%)
view
12 x 2 benchmarks/dash_app
benchmarks/dash_app
app.py
app.py
406:419 (1%)
438:451 (1%)
view
12 x 2 crypten
crypten
gradients.py
gradients.py
1132:1147 (<1%)
1191:1206 (<1%)
view
10 x 2 benchmarks/dash_app
benchmarks/dash_app
app.py
app.py
85:94 (1%)
258:267 (1%)
view
10 x 2 benchmarks/dash_app
benchmarks/dash_app
app.py
app.py
653:663 (1%)
702:712 (1%)
view
10 x 2 crypten
crypten
gradients.py
gradients.py
407:418 (<1%)
1191:1202 (<1%)
view
10 x 2 crypten
crypten
gradients.py
gradients.py
407:418 (<1%)
1132:1143 (<1%)
view
9 x 2 crypten/nn
crypten/nn
module.py
module.py
971:980 (<1%)
1002:1011 (<1%)
view
9 x 2 benchmarks/dash_app
benchmarks/dash_app
app.py
app.py
123:135 (1%)
298:310 (1%)
view
9 x 2 benchmarks/dash_app
benchmarks/dash_app
app.py
app.py
377:387 (1%)
409:419 (1%)
view
9 x 2 benchmarks/dash_app
benchmarks/dash_app
app.py
app.py
377:387 (1%)
441:451 (1%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
9 x 2 crypten/nn
crypten/nn
module.py
module.py
0:0 
0:0 
view
7 x 2 crypten/nn
crypten/nn
module.py
module.py
0:0 
0:0 
view
7 x 2 crypten/mpc/primitives
crypten/mpc/primitives
arithmetic.py
binary.py
0:0 
0:0 
view