facebookresearch / ContextualBanditsAttacks
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
  • 25% duplication:
    • 2,685 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 672 duplicated lines
  • 57 duplicates
system25% (672 lines)
Duplication per Extension
py25% (672 lines)
Duplication per Component (primary)
isoexp/mab34% (280 lines)
isoexp17% (177 lines)
isoexp/contextual33% (126 lines)
isoexp/linear18% (89 lines)

Duplication Between Components (50+ lines)

G isoexp/contextual isoexp/contextual isoexp/mab isoexp/mab isoexp/contextual--isoexp/mab 115 isoexp isoexp isoexp/mab--isoexp 102

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 57 duplicates...
Size#FoldersFilesLinesCode
19 x 2 isoexp/mab
isoexp
main_mab.py
main_mab.py
68:91 (21%)
76:99 (21%)
view
16 x 2 isoexp/mab
isoexp/mab
smab_algs.py
smab_algs.py
323:341 (3%)
353:370 (3%)
view
15 x 2 isoexp/contextual
isoexp/contextual
contextual_linucb.py
contextual_linucb.py
44:71 (5%)
259:276 (5%)
view
15 x 2 isoexp/mab
isoexp/mab
smab_algs.py
smab_algs.py
595:610 (3%)
636:656 (3%)
view
14 x 2 isoexp/linear
isoexp/linear
linearbandit.py
linearbandit.py
43:60 (4%)
121:137 (4%)
view
14 x 2 isoexp/mab
isoexp/mab
smab_algs.py
smab_algs.py
102:121 (2%)
150:169 (2%)
view
13 x 2 isoexp/mab
isoexp/mab
smab_algs.py
smab_algs.py
25:41 (2%)
150:167 (2%)
view
13 x 2 isoexp/mab
isoexp/mab
smab_algs.py
smab_algs.py
25:41 (2%)
102:119 (2%)
view
13 x 2 isoexp/contextual
isoexp/mab
contextual_linucb.py
contextual_mab_algs.py
28:42 (5%)
78:92 (12%)
view
12 x 2 isoexp/linear
isoexp/linear
linearbandit.py
linearbandit.py
28:41 (3%)
106:119 (3%)
view
12 x 2 isoexp
isoexp
main_attack_one_user.py
main_attacked_context.py
180:194 (6%)
96:110 (8%)
view
11 x 2 isoexp/contextual
isoexp/contextual
contextual_linucb.py
contextual_linucb.py
37:52 (4%)
120:131 (4%)
view
10 x 2 isoexp/mab
isoexp
main_mab.py
main_mab.py
44:57 (11%)
51:63 (11%)
view
9 x 2 isoexp/contextual
isoexp/contextual
contextual_linucb.py
contextual_linucb.py
99:109 (3%)
155:165 (3%)
view
9 x 2 isoexp/contextual
isoexp/contextual
contextual_linucb.py
contextual_linucb.py
121:130 (3%)
194:203 (3%)
view
9 x 2 isoexp/contextual
isoexp/mab
contextual_linucb.py
contextual_mab_algs.py
155:165 (3%)
150:161 (8%)
view
9 x 2 isoexp/contextual
isoexp/mab
contextual_linucb.py
contextual_mab_algs.py
46:59 (3%)
96:109 (8%)
view
9 x 2 isoexp/contextual
isoexp/contextual
contextual_linucb.py
contextual_linucb.py
39:51 (3%)
194:203 (3%)
view
9 x 2 isoexp/contextual
isoexp/linear
contextual_linucb.py
linearbandit.py
13:24 (3%)
13:24 (2%)
view
9 x 2 isoexp
isoexp
main_attack_one_user.py
main_attacked_context.py
203:213 (5%)
110:128 (6%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
11 x 2 isoexp/contextual
isoexp/mab
contextual_linucb.py
contextual_mab_algs.py
0:0 
0:0 
view
9 x 2 isoexp/linear
isoexp/linear
linearbandit.py
linearbandit.py
0:0 
0:0 
view
8 x 2 isoexp/linear
isoexp/linear
linearbandit.py
linearbandit.py
0:0 
0:0 
view
6 x 2 isoexp/contextual
isoexp/mab
contextual_linucb.py
contextual_mab_algs.py
0:0 
0:0 
view