pytorch / translate
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:
    • 20,424 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 5,225 duplicated lines
  • 446 duplicates
system25% (5,225 lines)
Duplication per Extension
py25% (5,225 lines)
Duplication per Component (primary)
pytorch_translate28% (3,764 lines)
pytorch_translate/research33% (852 lines)
pytorch_translate/tasks15% (244 lines)
pytorch_translate/data15% (161 lines)
pytorch_translate/dual_learning19% (138 lines)
pytorch_translate/rescoring5% (34 lines)
pytorch_translate/word_prediction11% (32 lines)
ROOT0% (0 lines)
pytorch_translate/attention0% (0 lines)
pytorch_translate/models0% (0 lines)

Duplication Between Components (50+ lines)

G pytorch_translate pytorch_translate pytorch_translate/research pytorch_translate/research pytorch_translate--pytorch_translate/research 1150 pytorch_translate/dual_learning pytorch_translate/dual_learning pytorch_translate--pytorch_translate/dual_learning 96 pytorch_translate/word_prediction pytorch_translate/word_prediction pytorch_translate--pytorch_translate/word_prediction 92 pytorch_translate/dual_learning--pytorch_translate/word_prediction 63

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 446 duplicates...
Size#FoldersFilesLinesCode
81 x 2 pytorch_translate
pytorch_translate
hybrid_transformer_rnn.py
transformer.py
25:107 (18%)
49:131 (10%)
view
67 x 2 pytorch_translate
pytorch_translate
char_source_hybrid.py
char_source_transformer_model.py
50:119 (24%)
37:106 (24%)
view
60 x 2 pytorch_translate
pytorch_translate
char_source_hybrid.py
char_source_transformer_model.py
262:356 (22%)
264:357 (21%)
view
60 x 2 pytorch_translate
pytorch_translate/research/multisource
beam_decode.py
multisource_decode.py
285:387 (8%)
212:314 (13%)
view
55 x 2 pytorch_translate
pytorch_translate
char_source_hybrid.py
char_source_transformer_model.py
195:260 (20%)
197:262 (19%)
view
53 x 2 pytorch_translate
pytorch_translate
char_encoder.py
char_source_transformer_model.py
34:86 (15%)
43:95 (18%)
view
53 x 2 pytorch_translate
pytorch_translate
char_encoder.py
char_source_hybrid.py
34:86 (15%)
56:108 (19%)
view
49 x 2 pytorch_translate/research/knowledge_distillation
pytorch_translate/research/knowledge_distillation
dual_decoder_kd_model.py
hybrid_dual_decoder_kd_model.py
43:98 (35%)
43:98 (37%)
view
49 x 2 pytorch_translate
pytorch_translate
beam_search_and_decode_v2.py
ensemble_export.py
554:608 (10%)
1525:1579 (3%)
view
43 x 2 pytorch_translate
pytorch_translate/research/multisource
beam_decode.py
multisource_decode.py
511:563 (5%)
433:485 (9%)
view
39 x 2 pytorch_translate/research/rescore
pytorch_translate
cloze_transformer_model.py
transformer.py
23:62 (45%)
225:264 (5%)
view
35 x 2 pytorch_translate
pytorch_translate
ensemble_export.py
ensemble_export.py
217:257 (2%)
1398:1440 (2%)
view
33 x 2 pytorch_translate
pytorch_translate
benchmark.py
generate.py
12:49 (20%)
553:589 (5%)
view
31 x 2 pytorch_translate
pytorch_translate
multilingual_model.py
semi_supervised.py
26:58 (23%)
34:66 (20%)
view
27 x 2 pytorch_translate
pytorch_translate
beam_search_and_decode_v2.py
ensemble_export.py
433:461 (5%)
1477:1505 (1%)
view
27 x 2 pytorch_translate
pytorch_translate/research/multisource
beam_decode.py
multisource_decode.py
567:601 (3%)
486:520 (6%)
view
23 x 2 pytorch_translate
pytorch_translate
beam_search_and_decode_v2.py
ensemble_export.py
45:71 (4%)
303:329 (1%)
view
22 x 2 pytorch_translate/research/tune_ensemble_weights
pytorch_translate/research/tune_ensemble_weights
tune_model_weights.py
tune_model_weights_with_ax.py
12:33 (36%)
10:31 (23%)
view
22 x 2 pytorch_translate
pytorch_translate/research/multisource
beam_decode.py
multisource_decode.py
481:509 (3%)
404:432 (5%)
view
21 x 2 pytorch_translate
pytorch_translate
hybrid_transformer_rnn.py
transformer_aan.py
25:47 (4%)
37:59 (2%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 20 unit duplicates...
Size#FoldersFilesLinesCode
66 x 2 pytorch_translate/research/multisource
pytorch_translate
multisource_decode.py
beam_decode.py
0:0 
0:0 
view
14 x 3 pytorch_translate/research/deliberation_networks
pytorch_translate
pytorch_translate
deliberation_networks.py
transformer_aan.py
transformer.py
0:0 
0:0 
0:0 
view
13 x 2 pytorch_translate
pytorch_translate
char_source_transformer_model.py
char_source_hybrid.py
0:0 
0:0 
view
13 x 2 pytorch_translate
pytorch_translate
ensemble_export.py
beam_search_and_decode_v2.py
0:0 
0:0 
view
17 x 2 pytorch_translate/research/multisource
pytorch_translate
multisource_decode.py
beam_decode.py
0:0 
0:0 
view
10 x 2 pytorch_translate
pytorch_translate
ensemble_export.py
beam_search_and_decode_v2.py
0:0 
0:0 
view
9 x 3 pytorch_translate
pytorch_translate
pytorch_translate
ensemble_export.py
ensemble_export.py
beam_search_and_decode_v2.py
0:0 
0:0 
0:0 
view
8 x 2 pytorch_translate/research/multisource
pytorch_translate
multisource_decode.py
beam_decode.py
0:0 
0:0 
view
8 x 2 pytorch_translate
pytorch_translate
char_source_transformer_model.py
char_source_hybrid.py
0:0 
0:0 
view
8 x 2 pytorch_translate
pytorch_translate
ensemble_export.py
ensemble_export.py
0:0 
0:0 
view
8 x 2 pytorch_translate
pytorch_translate
multilingual_model.py
semi_supervised.py
0:0 
0:0 
view
8 x 2 pytorch_translate/data
pytorch_translate/data
dictionary.py
dictionary.py
0:0 
0:0 
view
7 x 2 pytorch_translate/research/multisource
pytorch_translate/research/multisource
multisource_decode.py
multisource_decode.py
0:0 
0:0 
view
7 x 6 pytorch_translate/research/knowledge_distillation
pytorch_translate/research/knowledge_distillation
pytorch_translate
pytorch_translate
pytorch_translate/word_prediction
pytorch_translate
dual_decoder_kd_model.py
hybrid_dual_decoder_kd_model.py
transformer_aan.py
hybrid_transformer_rnn.py
word_prediction_model.py
transformer.py
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
view
6 x 2 pytorch_translate/research/deliberation_networks
pytorch_translate/research/deliberation_networks
deliberation_networks.py
deliberation_networks.py
0:0 
0:0 
view
6 x 3 pytorch_translate
pytorch_translate
pytorch_translate
beam_decode.py
beam_decode.py
beam_search_and_decode_v2.py
0:0 
0:0 
0:0 
view
6 x 2 pytorch_translate/tasks
pytorch_translate/tasks
pytorch_translate_task.py
pytorch_translate_task.py
0:0 
0:0 
view
6 x 2 pytorch_translate
pytorch_translate
hybrid_transformer_rnn.py
transformer.py
0:0 
0:0 
view
6 x 2 pytorch_translate
pytorch_translate
multi_model.py
multi_model.py
0:0 
0:0 
view
6 x 2 pytorch_translate
pytorch_translate
multi_model.py
multi_model.py
0:0 
0:0 
view