facebookresearch / simmc
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
  • 8% duplication:
    • 5,353 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 449 duplicated lines
  • 37 duplicates
system8% (449 lines)
Duplication per Extension
py8% (449 lines)
Duplication per Component (primary)
mm_action_prediction/tools13% (297 lines)
mm_action_prediction/models/encoders29% (56 lines)
mm_action_prediction/models5% (48 lines)
mm_action_prediction3% (18 lines)
mm_dst/utils14% (16 lines)
mm_action_prediction/loaders2% (14 lines)
mm_dst/gpt2_dst/utils0% (0 lines)
mm_dst/gpt2_dst/scripts0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 37 duplicates...
Size#FoldersFilesLinesCode
28 x 2 mm_action_prediction/tools
mm_action_prediction/tools
data_support.py
support.py
28:70 (17%)
13:58 (43%)
view
27 x 2 mm_action_prediction/tools
mm_action_prediction/tools
action_evaluation.py
response_evaluation.py
195:221 (15%)
119:145 (25%)
view
15 x 2 mm_action_prediction/tools
mm_action_prediction/tools
action_evaluation.py
retrieval_evaluation.py
195:209 (8%)
103:117 (16%)
view
15 x 2 mm_action_prediction/tools
mm_action_prediction/tools
response_evaluation.py
retrieval_evaluation.py
119:133 (14%)
103:117 (16%)
view
14 x 2 mm_action_prediction/models/encoders
mm_action_prediction/models/encoders
hierarchical_recurrent.py
memory_network.py
36:62 (35%)
45:71 (20%)
view
13 x 2 mm_action_prediction/tools
mm_action_prediction/tools
data_support.py
support.py
74:100 (7%)
78:104 (20%)
view
11 x 2 mm_action_prediction/models/encoders
mm_action_prediction/models/encoders
hierarchical_recurrent.py
memory_network.py
19:30 (27%)
21:32 (15%)
view
11 x 2 mm_action_prediction/models
mm_action_prediction/models
decoder.py
decoder.py
121:131 (3%)
230:240 (3%)
view
11 x 2 mm_action_prediction/tools
mm_action_prediction/tools
embed_fashion_assets.py
embed_furniture_assets.py
88:98 (15%)
84:94 (15%)
view
9 x 2 mm_action_prediction
mm_action_prediction
eval_simmc_agent.py
options.py
178:186 (6%)
137:145 (4%)
view
8 x 2 mm_action_prediction/tools
mm_action_prediction/tools
extract_actions.py
extract_actions.py
87:94 (1%)
1032:1039 (1%)
view
8 x 2 mm_action_prediction/tools
mm_action_prediction/tools
extract_actions.py
extract_actions.py
195:202 (1%)
209:216 (1%)
view
8 x 2 mm_action_prediction/tools
mm_action_prediction/tools
data_support.py
support.py
102:110 (4%)
106:114 (12%)
view
8 x 2 mm_action_prediction/tools
mm_action_prediction/tools
extract_actions.py
extract_actions.py
155:162 (1%)
168:175 (1%)
view
8 x 2 mm_dst/utils
mm_dst/utils
evaluate_dst.py
evaluate_dst.py
83:90 (7%)
116:123 (7%)
view
7 x 2 mm_action_prediction/tools
mm_action_prediction/tools
build_multimodal_inputs.py
build_multimodal_inputs.py
298:305 (2%)
328:335 (2%)
view
7 x 2 mm_action_prediction/models
mm_action_prediction/models
action_executor.py
assistant.py
139:145 (3%)
90:96 (8%)
view
7 x 2 mm_action_prediction/tools
mm_action_prediction/tools
action_evaluation.py
extract_attribute_vocabulary.py
16:22 (4%)
16:22 (6%)
view
7 x 2 mm_action_prediction/tools
mm_action_prediction/tools
extract_actions.py
extract_actions.py
714:720 (<1%)
746:752 (<1%)
view
7 x 2 mm_action_prediction/loaders
mm_action_prediction/loaders
loader_simmc.py
loader_simmc.py
371:379 (1%)
416:424 (1%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
10 x 2 mm_action_prediction/tools
mm_action_prediction/tools
data_support.py
support.py
0:0 
0:0 
view