facebookresearch / Context-Aware-Representation-Crop-Yield-Prediction
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
  • 41% duplication:
    • 5,351 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,225 duplicated lines
  • 182 duplicates
system41% (2,225 lines)
Duplication per Extension
py41% (2,225 lines)
Duplication per Component (primary)
crop_yield_prediction94% (795 lines)
ROOT62% (470 lines)
data_preprocessing/sample_quadruplets54% (225 lines)
data_preprocessing/preprocess22% (140 lines)
data_preprocessing/rescaling25% (130 lines)
data_preprocessing/postprocess25% (99 lines)
crop_yield_prediction/plot36% (86 lines)
crop_yield_prediction/dataloader61% (86 lines)
crop_yield_prediction/models6% (64 lines)
data_preprocessing/plot50% (60 lines)
crop_yield_prediction/utils34% (42 lines)
data_preprocessing/utils25% (22 lines)
data_preprocessing/merge13% (6 lines)
data_preprocessing0% (0 lines)

Duplication Between Components (50+ lines)

G crop_yield_prediction/plot crop_yield_prediction/plot data_preprocessing/plot data_preprocessing/plot crop_yield_prediction/plot--data_preprocessing/plot 144

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 182 duplicates...
Size#FoldersFilesLinesCode
74 x 2 crop_yield_prediction
crop_yield_prediction
train_c3d.py
train_cnn_lstm.py
18:129 (44%)
18:129 (44%)
view
68 x 2 crop_yield_prediction
crop_yield_prediction
train_cross_location.py
train_semi_transformer.py
35:129 (27%)
39:133 (26%)
view
57 x 2 data_preprocessing/sample_quadruplets
data_preprocessing/sample_quadruplets
sample_for_counties.py
sample_for_pretrained.py
246:315 (23%)
177:246 (34%)
view
44 x 2 crop_yield_prediction
crop_yield_prediction
train_c3d.py
train_cnn_lstm.py
132:196 (26%)
132:196 (26%)
view
44 x 2 crop_yield_prediction
crop_yield_prediction
train_cross_location.py
train_semi_transformer.py
132:189 (18%)
140:197 (16%)
view
42 x 2 crop_yield_prediction
crop_yield_prediction
train_cross_location.py
train_semi_transformer.py
298:353 (17%)
316:371 (16%)
view
34 x 2 ROOT
ROOT
crop_yield_train_c3d.py
crop_yield_train_cnn_lstm.py
39:81 (30%)
41:83 (28%)
view
33 x 2 crop_yield_prediction
crop_yield_prediction
train_c3d.py
train_cnn_lstm.py
214:260 (20%)
214:260 (20%)
view
30 x 2 crop_yield_prediction/plot
data_preprocessing/plot
plot_crop_yield.py
counties_plot.py
31:64 (60%)
29:62 (43%)
view
29 x 2 crop_yield_prediction/dataloader
crop_yield_prediction/dataloader
c3d_dataloader.py
cnn_lstm_dataloader.py
20:53 (76%)
20:53 (78%)
view
28 x 2 crop_yield_prediction/dataloader
crop_yield_prediction/dataloader
cnn_lstm_dataloader.py
semi_cropyield_dataloader.py
20:51 (75%)
20:51 (77%)
view
28 x 2 crop_yield_prediction/dataloader
crop_yield_prediction/dataloader
c3d_dataloader.py
semi_cropyield_dataloader.py
20:51 (73%)
20:51 (77%)
view
27 x 2 ROOT
ROOT
crop_yield_train_c3d.py
crop_yield_train_cnn_lstm.py
88:115 (24%)
93:120 (22%)
view
27 x 2 crop_yield_prediction
crop_yield_prediction
train_cross_location.py
train_semi_transformer.py
214:252 (11%)
228:266 (10%)
view
26 x 2 ROOT
ROOT
crop_yield_train_cross_location.py
crop_yield_train_semi_transformer.py
198:227 (13%)
184:213 (14%)
view
26 x 2 crop_yield_prediction
crop_yield_prediction
train_c3d.py
train_cross_location.py
145:180 (15%)
227:262 (10%)
view
26 x 2 ROOT
ROOT
crop_yield_train_cross_location.py
crop_yield_train_semi_transformer.py
27:54 (13%)
27:54 (14%)
view
26 x 2 crop_yield_prediction
crop_yield_prediction
train_cnn_lstm.py
train_cross_location.py
145:180 (15%)
227:262 (10%)
view
25 x 2 ROOT
ROOT
crop_yield_train_cnn_lstm.py
crop_yield_train_semi_transformer.py
52:83 (21%)
82:113 (14%)
view
25 x 2 ROOT
ROOT
crop_yield_train_c3d.py
crop_yield_train_semi_transformer.py
50:81 (22%)
82:113 (14%)
view
Duplicated Units
The list of top 11 duplicated units.
See data for all 11 unit duplicates...
Size#FoldersFilesLinesCode
29 x 2 crop_yield_prediction
crop_yield_prediction
train_c3d.py
train_cnn_lstm.py
0:0 
0:0 
view
26 x 2 crop_yield_prediction
crop_yield_prediction
train_cross_location.py
train_semi_transformer.py
0:0 
0:0 
view
24 x 2 data_preprocessing/sample_quadruplets
data_preprocessing/sample_quadruplets
sample_for_counties.py
sample_for_pretrained.py
0:0 
0:0 
view
21 x 2 crop_yield_prediction
crop_yield_prediction
train_c3d.py
train_cnn_lstm.py
0:0 
0:0 
view
19 x 2 crop_yield_prediction
crop_yield_prediction
train_c3d.py
train_cnn_lstm.py
0:0 
0:0 
view
21 x 2 crop_yield_prediction/plot
data_preprocessing/plot
plot_crop_yield.py
counties_plot.py
0:0 
0:0 
view
15 x 2 data_preprocessing/sample_quadruplets
data_preprocessing/sample_quadruplets
sample_for_counties.py
sample_for_pretrained.py
0:0 
0:0 
view
11 x 2 crop_yield_prediction/plot
data_preprocessing/plot
plot_crop_yield_prediction_error.py
counties_plot.py
0:0 
0:0 
view
10 x 3 crop_yield_prediction/dataloader
crop_yield_prediction/dataloader
crop_yield_prediction/dataloader
cnn_lstm_dataloader.py
c3d_dataloader.py
semi_cropyield_dataloader.py
0:0 
0:0 
0:0 
view
9 x 2 data_preprocessing/sample_quadruplets
data_preprocessing/sample_quadruplets
sample_for_counties.py
sample_for_pretrained.py
0:0 
0:0 
view
8 x 2 crop_yield_prediction/utils
data_preprocessing/utils
timing.py
timing.py
0:0 
0:0 
view