facebookresearch / CausalSkillLearning
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
  • 26% duplication:
    • 6,062 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,603 duplicated lines
  • 179 duplicates
system26% (1,603 lines)
Duplication per Extension
py26% (1,603 lines)
Duplication per Component (primary)
Experiments20% (960 lines)
DataLoaders43% (310 lines)
DataGenerator61% (295 lines)
DownstreamRL13% (38 lines)
Experiments/Code_Runs0% (0 lines)

Duplication Between Components (50+ lines)

G DataLoaders DataLoaders Experiments Experiments DataLoaders--Experiments 329

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 179 duplicates...
Size#FoldersFilesLinesCode
45 x 2 DataLoaders
Experiments
MIME_DataLoader.py
MIME_DataLoader.py
78:135 (45%)
59:118 (30%)
view
23 x 2 Experiments
Experiments
PolicyNetworks.py
PolicyNetworks.py
487:525 (2%)
662:701 (2%)
view
23 x 2 DataLoaders
DataLoaders
MIME_DataLoader.py
MIME_Img_DataLoader.py
58:88 (23%)
43:71 (25%)
view
22 x 2 DataGenerator
DataGenerator
NewGoalDirectedTraj.py
PolicyVisualizer.py
27:56 (26%)
28:57 (23%)
view
22 x 2 Experiments
Experiments
PolicyNetworks.py
PolicyNetworks.py
891:934 (2%)
1071:1114 (2%)
view
22 x 2 Experiments
Experiments
PolicyNetworks.py
PolicyNetworks.py
559:597 (2%)
980:1018 (2%)
view
21 x 2 DataLoaders
DataLoaders
MIMEandPlan_DataLoader.py
MIMEandPlan_DataLoader.py
71:96 (14%)
128:153 (14%)
view
21 x 2 DataGenerator
DataGenerator
DirectedContinuousNonZero.py
DirectedContinuousTrajs.py
33:69 (50%)
32:68 (51%)
view
20 x 2 DataLoaders
Experiments
SmallMaps_DataLoader.py
DataLoaders.py
13:50 (95%)
58:95 (10%)
view
20 x 2 DataLoaders
Experiments
GridWorld_DataLoader.py
DataLoaders.py
9:52 (100%)
9:52 (10%)
view
19 x 2 DataGenerator
DataGenerator
DeterministicGoalDirectedTraj.py
GoalDirectedTrajs.py
29:62 (35%)
27:60 (35%)
view
19 x 2 DataLoaders
DataLoaders
MIMEandPlan_DataLoader.py
MIMEandPlan_DataLoader.py
100:123 (13%)
157:180 (13%)
view
18 x 2 DataLoaders
Experiments
MIME_DataLoader.py
MIME_DataLoader.py
23:45 (18%)
14:34 (12%)
view
18 x 2 Experiments
Experiments
Eval_RLRewards.py
Eval_RLRewards.py
161:189 (13%)
191:219 (13%)
view
17 x 2 Experiments
Experiments
Visualizers.py
Visualizers.py
63:84 (13%)
180:201 (13%)
view
16 x 2 Experiments
Experiments
PolicyNetworks.py
PolicyNetworks.py
1093:1122 (2%)
1223:1253 (2%)
view
15 x 2 DataGenerator
DataGenerator
DirectedContinuousNonZero.py
DirectedContinuousTrajs.py
10:30 (35%)
10:30 (36%)
view
15 x 2 Experiments
Experiments
Roboturk_DataLoader.py
Roboturk_DataLoader.py
269:287 (6%)
445:463 (6%)
view
15 x 2 DataGenerator
DataGenerator
ContinuousNonZero.py
ContinuousTrajs.py
27:55 (48%)
25:51 (50%)
view
14 x 2 DataLoaders
DataLoaders
MIME_DataLoader.py
MIME_Img_DataLoader.py
121:139 (14%)
105:124 (15%)
view
Duplicated Units
The list of top 10 duplicated units.
See data for all 10 unit duplicates...
Size#FoldersFilesLinesCode
29 x 2 Experiments
Experiments
PolicyNetworks.py
PolicyNetworks.py
0:0 
0:0 
view
15 x 2 Experiments
Experiments
Visualizers.py
Visualizers.py
0:0 
0:0 
view
10 x 4 Experiments
DataLoaders
DataLoaders
DataLoaders
MIME_DataLoader.py
MIME_Img_DataLoader.py
MIME_DataLoader.py
MIMEandPlan_DataLoader.py
0:0 
0:0 
0:0 
0:0 
view
10 x 2 Experiments
DataLoaders
MIME_DataLoader.py
MIME_DataLoader.py
0:0 
0:0 
view
8 x 4 Experiments
Experiments
DataLoaders
DataLoaders
DataLoaders.py
DataLoaders.py
GridWorld_DataLoader.py
SmallMaps_DataLoader.py
0:0 
0:0 
0:0 
0:0 
view
8 x 2 Experiments
Experiments
PolicyManagers.py
PolicyManagers.py
0:0 
0:0 
view
8 x 2 Experiments
DataLoaders
DataLoaders.py
SmallMaps_DataLoader.py
0:0 
0:0 
view
13 x 2 Experiments
Experiments
PolicyNetworks.py
PolicyNetworks.py
0:0 
0:0 
view
7 x 2 Experiments
DataLoaders
DataLoaders.py
GridWorld_DataLoader.py
0:0 
0:0 
view
6 x 2 Experiments
Experiments
PolicyManagers.py
PolicyManagers.py
0:0 
0:0 
view