facebookresearch / Mephisto
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
  • 30% duplication:
    • 23,085 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 7,031 duplicated lines
  • 506 duplicates
system30% (7,031 lines)
Duplication per Extension
js68% (3,295 lines)
py12% (1,716 lines)
css84% (1,692 lines)
tsx19% (198 lines)
jsx6% (100 lines)
html29% (30 lines)
Duplication per Component (primary)
packages/annotated80% (2,411 lines)
packages/annotation-toolkit98% (2,355 lines)
mephisto/abstractions16% (1,478 lines)
mephisto/client12% (305 lines)
mephisto/data_model14% (263 lines)
mephisto/operations6% (110 lines)
packages/cra-template-mephisto-review7% (75 lines)
mephisto/scripts3% (16 lines)
packages/mephisto-review-hook11% (12 lines)
packages/mephisto-task<1% (6 lines)
mephisto/tools0% (0 lines)
mephisto0% (0 lines)
ROOT0% (0 lines)
hydra_plugins0% (0 lines)
hydra_configs/profile0% (0 lines)
packages/global-context-store0% (0 lines)

Duplication Between Components (50+ lines)

G packages/annotated packages/annotated packages/annotation-toolkit packages/annotation-toolkit packages/annotated--packages/annotation-toolkit 4728 mephisto/abstractions mephisto/abstractions mephisto/data_model mephisto/data_model mephisto/abstractions--mephisto/data_model 200

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 506 duplicates...
Size#FoldersFilesLinesCode
558 x 2 packages/annotated/shell/src
packages/annotation-toolkit/src
react-mosaic-component.css
react-mosaic-component.css
19:578 (100%)
19:578 (100%)
view
270 x 2 packages/annotated/bbox/src
packages/annotation-toolkit/src/layers
MovableRect.js
MovableRect.js
31:390 (95%)
32:391 (95%)
view
219 x 2 packages/annotated/bbox/src/RRRR
packages/annotation-toolkit/src/layers/RRRR
utils.js
utils.js
1:255 (100%)
1:255 (100%)
view
174 x 2 packages/annotated/bbox/src/RRRR/Rect
packages/annotation-toolkit/src/layers/RRRR/Rect
index.js
index.js
4:189 (100%)
4:189 (100%)
view
161 x 2 packages/annotated/shell/src/panels
packages/annotation-toolkit/src/panels
ContentPanel.js
ContentPanel.js
9:188 (100%)
9:188 (100%)
view
153 x 2 packages/annotated/shell/src
packages/annotation-toolkit/src
AppShell.js
AppShell.js
10:174 (100%)
10:174 (100%)
view
109 x 2 packages/annotated/shell/src
packages/annotation-toolkit/src
index.css
index.css
1:130 (100%)
1:130 (100%)
view
99 x 2 packages/annotated/bbox/src/RRRR
packages/annotation-toolkit/src/layers/RRRR
index.js
index.js
5:112 (100%)
5:138 (100%)
view
98 x 2 packages/annotated/shell/src
packages/annotation-toolkit/src/layers
Layer.js
Layer.js
6:116 (100%)
6:116 (100%)
view
95 x 2 packages/annotated/shell/src/panels
packages/annotation-toolkit/src/panels
DebugPanel.js
DebugPanel.js
5:113 (100%)
5:113 (100%)
view
94 x 2 packages/annotated/video-player/src
packages/annotation-toolkit/src/layers
VideoPlayer.js
VideoPlayer.js
21:127 (55%)
26:132 (49%)
view
89 x 2 packages/annotated/bbox/src/RRRR
packages/annotation-toolkit/src/layers/RRRR
react-rect.css
react-rect.css
1:91 (100%)
1:91 (100%)
view
77 x 2 packages/annotated/shell/src/panels
packages/annotation-toolkit/src/panels
DebugPanel.css
DebugPanel.css
1:99 (100%)
1:99 (100%)
view
61 x 2 packages/annotated/video-player/src
packages/annotation-toolkit/src/layers
VideoPlayer.js
VideoPlayer.js
128:189 (35%)
134:195 (32%)
view
57 x 2 mephisto/abstractions/providers/mturk
mephisto/abstractions/providers/mturk_sandbox
wrap_crowd_source.js
wrap_crowd_source.js
53:125 (73%)
53:125 (73%)
view
53 x 2 packages/annotated/bbox/src
packages/annotation-toolkit/src/layers
BBoxFrame.js
BBoxFrame.js
5:67 (100%)
5:67 (100%)
view
41 x 2 mephisto/abstractions/providers/mock
mephisto/abstractions/providers/mturk_sandbox
wrap_crowd_source.js
wrap_crowd_source.js
57:106 (66%)
76:125 (52%)
view
41 x 2 mephisto/abstractions/providers/mock
mephisto/abstractions/providers/mturk
wrap_crowd_source.js
wrap_crowd_source.js
57:106 (66%)
76:125 (52%)
view
28 x 2 mephisto/data_model
mephisto/data_model
agent.py
agent.py
278:318 (7%)
523:563 (7%)
view
24 x 2 mephisto/client/full/webapp/src/widgets/components
mephisto/client/full/webapp/src/widgets/components
ProviderSelect.tsx
RequesterSelect.tsx
57:87 (36%)
57:87 (36%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 30 unit duplicates...
Size#FoldersFilesLinesCode
148 x 2 packages/annotated/shell/src/panels
packages/annotation-toolkit/src/panels
ContentPanel.js
ContentPanel.js
9:186 
9:186 
view
90 x 2 packages/annotated/shell/src
packages/annotation-toolkit/src/layers
Layer.js
Layer.js
8:113 
8:113 
view
54 x 2 packages/annotated/bbox/src/RRRR/Rect
packages/annotation-toolkit/src/layers/RRRR/Rect
index.js
index.js
128:190 
128:190 
view
49 x 2 packages/annotated/bbox/src
packages/annotation-toolkit/src/layers
BBoxFrame.js
BBoxFrame.js
5:65 
5:65 
view
37 x 2 packages/annotated/shell/src
packages/annotation-toolkit/src
AppShell.js
AppShell.js
40:96 
40:96 
view
38 x 2 packages/annotated/bbox/src/RRRR
packages/annotation-toolkit/src/layers/RRRR
index.js
index.js
73:113 
99:139 
view
18 x 2 packages/annotated/shell/src
packages/annotation-toolkit/src
AppShell.js
AppShell.js
10:38 
10:38 
view
18 x 2 mephisto/abstractions/blueprints/parlai_chat
mephisto/abstractions/blueprints/static_html_task
parlai_chat_task_builder.py
static_html_task_builder.py
0:0 
0:0 
view
17 x 2 packages/annotated/shell/src/panels
packages/annotation-toolkit/src/panels
ContentPanel.js
ContentPanel.js
62:79 
62:79 
view
16 x 2 mephisto/abstractions/providers/mturk_sandbox
mephisto/abstractions/providers/mturk
wrap_crowd_source.js
wrap_crowd_source.js
56:73 
56:73 
view
12 x 3 mephisto/abstractions/databases
mephisto/abstractions/databases
mephisto/abstractions
local_database.py
local_singleton_database.py
database.py
0:0 
0:0 
0:0 
view
12 x 2 mephisto/abstractions/providers/mturk_sandbox
mephisto/abstractions/providers/mturk
wrap_crowd_source.js
wrap_crowd_source.js
49:63 
49:63 
view
11 x 2 mephisto/abstractions/providers/mturk_sandbox
mephisto/abstractions/providers/mturk
wrap_crowd_source.js
wrap_crowd_source.js
50:63 
50:63 
view
10 x 3 mephisto/abstractions/databases
mephisto/abstractions/databases
mephisto/abstractions
local_database.py
local_singleton_database.py
database.py
0:0 
0:0 
0:0 
view
10 x 2 mephisto/abstractions/providers/mturk_sandbox
mephisto/abstractions/providers/mturk
wrap_crowd_source.js
wrap_crowd_source.js
51:63 
51:63 
view
9 x 2 mephisto/abstractions/databases
mephisto/abstractions
local_database.py
database.py
0:0 
0:0 
view
8 x 3 mephisto/abstractions/databases
mephisto/abstractions/databases
mephisto/abstractions
local_database.py
local_singleton_database.py
database.py
0:0 
0:0 
0:0 
view
8 x 2 mephisto/abstractions/providers/mturk_sandbox
mephisto/abstractions/providers/mturk
wrap_crowd_source.js
wrap_crowd_source.js
44:54 
44:54 
view
7 x 2 mephisto/abstractions/databases
mephisto/abstractions
local_database.py
database.py
0:0 
0:0 
view
7 x 2 mephisto/abstractions/databases
mephisto/abstractions
local_database.py
database.py
0:0 
0:0 
view