facebookresearch / aepsych
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
  • 72% duplication:
    • 28,004 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 20,436 duplicated lines
  • 1,484 duplicates
system72% (20,436 lines)
Duplication per Extension
XML97% (15,884 lines)
shader79% (1,381 lines)
asset35% (959 lines)
py18% (777 lines)
prefab84% (683 lines)
unity27% (282 lines)
cs35% (251 lines)
mat94% (199 lines)
pyi57% (20 lines)
Duplication per Component (primary)
clients/unity83% (19,639 lines)
pubs/owenetal51% (429 lines)
aepsych10% (156 lines)
aepsych/factory36% (53 lines)
aepsych/acquisition20% (50 lines)
aepsych/models7% (39 lines)
aepsych/generators9% (36 lines)
aepsych/database7% (20 lines)
aepsych/benchmark4% (14 lines)
clients/matlab0% (0 lines)
aepsych/kernels0% (0 lines)
aepsych/means0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G aepsych/factory aepsych/factory aepsych/models aepsych/models aepsych/factory--aepsych/models 50

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 1,484 duplicates...
Size#FoldersFilesLinesCode
2735 x 2 clients/unity/Assets/JsonDotNet/Assemblies/AOT
clients/unity/Assets/Jso...t/Assemblies/Standalone
Newtonsoft.Json.XML
Newtonsoft.Json.XML
3937:8011 (50%)
3962:8036 (50%)
view
2671 x 2 clients/unity/Assets/JsonDotNet/Assemblies/AOT
clients/unity/Assets/Jso...t/Assemblies/Standalone
Newtonsoft.Json.XML
Newtonsoft.Json.XML
1:3935 (49%)
1:3935 (49%)
view
591 x 2 clients/unity/Assets/JsonDotNet/Assemblies/AOT
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
2423:3256 (10%)
4798:5631 (10%)
view
591 x 2 clients/unity/Assets/Jso...t/Assemblies/Standalone
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
2423:3256 (10%)
4798:5631 (10%)
view
358 x 2 clients/unity/Assets/Jso...t/Assemblies/Standalone
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
7444:7995 (6%)
3238:3789 (6%)
view
358 x 2 clients/unity/Assets/JsonDotNet/Assemblies/AOT
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
7419:7970 (6%)
3238:3789 (6%)
view
231 x 2 clients/unity/Assets/JsonDotNet/Assemblies/AOT
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
6430:6750 (4%)
1144:1464 (4%)
view
231 x 2 clients/unity/Assets/Jso...t/Assemblies/Standalone
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
6455:6775 (4%)
1144:1464 (4%)
view
204 x 2 clients/unity/Assets/JsonDotNet/Assemblies/AOT
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
7036:7328 (3%)
2390:2682 (3%)
view
204 x 2 clients/unity/Assets/Jso...t/Assemblies/Standalone
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
7061:7353 (3%)
2390:2682 (3%)
view
197 x 2 clients/unity/Assets/Jso...t/Assemblies/Standalone
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
7:303 (3%)
24:320 (3%)
view
197 x 2 clients/unity/Assets/JsonDotNet/Assemblies/AOT
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
7:303 (3%)
24:320 (3%)
view
171 x 2 clients/unity/Assets/JsonDotNet/Assemblies/AOT
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
5767:6028 (3%)
2975:3236 (3%)
view
171 x 2 clients/unity/Assets/Jso...t/Assemblies/Standalone
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
5792:6053 (3%)
2975:3236 (3%)
view
163 x 2 clients/unity/Assets/JsonDotNet/Assemblies/AOT
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
6171:6427 (3%)
2037:2293 (3%)
view
163 x 2 clients/unity/Assets/Jso...t/Assemblies/Standalone
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
6196:6452 (3%)
2037:2293 (3%)
view
156 x 2 clients/unity/Assets/Jso...t/Assemblies/Standalone
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
4495:4726 (2%)
7312:7543 (2%)
view
156 x 2 clients/unity/Assets/JsonDotNet/Assemblies/AOT
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
4470:4701 (2%)
7312:7543 (2%)
view
154 x 2 clients/unity/Assets/Prefabs
clients/unity/Assets/Prefabs
prefab
square.prefab
square_outline.prefab
1:155 (59%)
1:155 (64%)
view
142 x 2 clients/unity/Assets/JsonDotNet/Assemblies/AOT
clients/unity/Assets/JsonDotNet/Assemblies/Windows
Newtonsoft.Json.XML
Newtonsoft.Json.XML
3477:3687 (2%)
6064:6274 (2%)
view
Duplicated Units
The list of top 8 duplicated units.
See data for all 8 unit duplicates...
Size#FoldersFilesLinesCode
16 x 3 clients/unity/Assets/Scripts
clients/unity/Assets/Scripts
clients/unity/Assets/Scripts
Ex1DSingleOpt.cs
Ex3DSingleOpt.cs
Ex2DSingleOpt.cs
75:103 
75:100 
76:103 
view
16 x 2 clients/unity/Assets/Scripts
clients/unity/Assets/Scripts
Ex3DSingleDetection_hue.cs
SingleDetection2D_hue.cs
72:100 
70:97 
view
14 x 7 clients/unity/Assets/Scripts
clients/unity/Assets/Scripts
clients/unity/Assets/Scripts
clients/unity/Assets/Scripts
clients/unity/Assets/Scripts
clients/unity/Assets/Scripts
clients/unity/Assets/Scripts
Ex2DSingleDetection.cs
Ex1DSingleDetection.cs
Ex3DSingleDetection_hue.cs
SingleDetection2D_hue.cs
Ex3DSingleOpt.cs
StratSwitch_2DSingleDetection.cs
Ex2DSingleOpt.cs
43:58 
41:56 
42:57 
42:57 
44:59 
50:65 
45:60 
view
10 x 2 clients/unity/Assets/Scripts
clients/unity/Assets/Scripts
Ex3DSingleOpt.cs
Ex2DSingleOpt.cs
62:73 
63:74 
view
8 x 3 clients/unity/Assets/Scripts
clients/unity/Assets/Scripts
clients/unity/Assets/Scripts
Ex2DSingleDetection.cs
Ex1DSingleOpt.cs
Ex1DSingleDetection.cs
61:69 
65:73 
59:67 
view
6 x 2 clients/unity/Assets/Scripts
clients/unity/Assets/Scripts
Ex2DSingleDetection.cs
StratSwitch_2DSingleDetection.cs
34:40 
41:47 
view
11 x 2 aepsych/models
aepsych/models
monotonic_rejection_gp.py
gp_classification.py
0:0 
0:0 
view
7 x 2 aepsych/models
aepsych/models
monotonic_rejection_gp.py
gp_classification.py
0:0 
0:0 
view