google-deepmind/mujoco
Multi-Joint dynamics with Contact. A general purpose physics simulator.
The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
Most complex files
- src/user/user_objects.cc2454 cx
- src/user/user_model.cc2097 cx
- src/user/user_flexcomp.cc1415 cx
- src/engine/engine_derivative.c975 cx
- wasm/codegen/generated/bindings.h970 cx
- src/engine/engine_core_util.c961 cx
- src/engine/engine_metric.c833 cx
- wasm/codegen/generated/bindings.cc830 cx
- src/engine/engine_vis_visualize.c822 cx
- src/user/user_api.cc797 cx
Dead code 31.29% unused · 60 findings
- python/mujoco/introspect/structs.pyunused-file
- mjx/mujoco/mjx/warp/forward.pyunused-file
- mjx/mujoco/mjx/_src/io.pyunused-file
- mjx/mujoco/mjx/_src/smooth.pyunused-file
- python/mujoco/introspect/enums.pyunused-file
- mjx/mujoco/mjx/_src/support.pyunused-file
- mjx/mujoco/mjx/_src/collision_convex.pyunused-file
- python/mujoco/batch.pyunused-file
- mjx/mujoco/mjx/_src/sensor.pyunused-file
- mjx/mujoco/mjx/_src/constraint.pyunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 58 generated files: doc/_static/onthispage_mjwarp.js, doc/includes/references.h, doc/js/linenumbers.js, include/mujoco/experimental/usd/mjcPhysics/actuator.h, include/mujoco/experimental/usd/mjcPhysics/api.h, include/mujoco/experimental/usd/mjcPhysics/collisionAPI.h, include/mujoco/experimental/usd/mjcPhysics/equalityAPI.h, include/mujoco/experimental/usd/mjcPhysics/equalityConnectAPI.h, include/mujoco/experimental/usd/mjcPhysics/equalityJointAPI.h, include/mujoco/experimental/usd/mjcPhysics/equalityWeldAPI.h, include/mujoco/experimental/usd/mjcPhysics/imageableAPI.h, include/mujoco/experimental/usd/mjcPhysics/jointAPI.h, include/mujoco/experimental/usd/mjcPhysics/keyframe.h, include/mujoco/experimental/usd/mjcPhysics/materialAPI.h, include/mujoco/experimental/usd/mjcPhysics/meshCollisionAPI.h, include/mujoco/experimental/usd/mjcPhysics/sceneAPI.h, include/mujoco/experimental/usd/mjcPhysics/siteAPI.h, include/mujoco/experimental/usd/mjcPhysics/tendon.h, include/mujoco/experimental/usd/mjcPhysics/tokens.h, mjx/mujoco/mjx/warp/bvh.py and 38 more.
Largest clones in the code
- 17 lines in 45 placespython67 tokenspython/mujoco/introspect/functions.py:774–790python/mujoco/introspect/functions.py:794–810python/mujoco/introspect/functions.py:814–830python/mujoco/introspect/functions.py:834–850python/mujoco/introspect/functions.py:854–870and 40 more
774name='mj_step', 775return_type=ValueType(name='void'), 776parameters=( 777 FunctionParameterDecl( 778 name='m', 779 type=PointerType( 780 inner_type=ValueType(name='mjModel', is_const=True), 781 ), 782 ), 783 FunctionParameterDecl(First 10 of 17 lines.
- 16 lines in 29 placespython63 tokenspython/mujoco/introspect/functions.py:1578–1593python/mujoco/introspect/functions.py:2746–2761python/mujoco/introspect/functions.py:2872–2887python/mujoco/introspect/functions.py:3120–3135python/mujoco/introspect/functions.py:3152–3167and 24 more
1578return_type=ValueType(name='void'), 1579parameters=( 1580 FunctionParameterDecl( 1581 name='m', 1582 type=PointerType( 1583 inner_type=ValueType(name='mjModel', is_const=True), 1584 ), 1585 ), 1586 FunctionParameterDecl( 1587 name='d',First 10 of 16 lines.
- 15 lines in 26 placespython63 tokenspython/mujoco/introspect/functions.py:774–788python/mujoco/introspect/functions.py:874–888python/mujoco/introspect/functions.py:902–916python/mujoco/introspect/functions.py:1232–1246python/mujoco/introspect/functions.py:1256–1270and 21 more
774name='mj_step', 775return_type=ValueType(name='void'), 776parameters=( 777 FunctionParameterDecl( 778 name='m', 779 type=PointerType( 780 inner_type=ValueType(name='mjModel', is_const=True), 781 ), 782 ), 783 FunctionParameterDecl(First 10 of 15 lines.
7 more
- 14 lines in 26 placespython53 tokens
- 13 lines in 23 placespython57 tokens
- 9 lines in 8 placescpp75 tokens
- 22 lines in 3 placescpp261 tokens
- 17 lines in 8 placespython67 tokens
- 69 lines in 2 placesc-header441 tokens
- 8 lines in 5 placesc109 tokens
Largest clones over all files, tests and data included
- 171 lines in 9 placesmarkuptests1,837 tokensmjx/mujoco/mjx/test_data/humanoid/02_humanoids.xml:35–205mjx/mujoco/mjx/test_data/humanoid/03_humanoids.xml:38–208mjx/mujoco/mjx/test_data/humanoid/04_humanoids.xml:41–211mjx/mujoco/mjx/test_data/humanoid/05_humanoids.xml:44–214mjx/mujoco/mjx/test_data/humanoid/06_humanoids.xml:47–217and 4 more
35 <geom type="capsule" condim="3" friction=".7" solimp=".9 .99 .003" solref=".015 1" material="body" contype="4" conaffinity="3"/> 36 </default> 37</default> 38 39<visual> 40 <map force="0.1" zfar="30"/> 41 <rgba haze="0.15 0.25 0.35 1"/> 42 <quality shadowsize="4096"/> 43 <global offwidth="800" offheight="800"/> 44</visual>First 10 of 171 lines.
- 802 lines in 2 placesmarkupdata files7,524 tokens
47<geom type="plane" size="0 0 .05" material="plane"/> 48<flexcomp name="bag" type="direct" dim="2" radius="0.002" mass="0.06" rgba=".93 .95 .97 .45" 49 point="0.0899 0.0000 0.0300 0.0868 0.0233 0.0300 0.0778 0.0449 0.0300 0.0635 0.0635 0.0300 0.0449 0.0778 0.0300 0.0233 0.0868 0.0300 0.0000 0.0899 0.… 50 element="0 1 25 0 25 24 1 2 26 1 26 25 2 3 27 2 27 26 3 4 28 3 28 27 4 5 29 4 29 28 5 6 30 5 30 29 6 7 31 6 31 30 7 8 32 7 32 31 8 9 33 8 33 32 9 10 … 51 <elasticity young="21739.5498" poisson="0.4" thickness="6.70820393e-4" elastic2d="both" damping="0.015"/> 52 <contact selfcollide="none"/> 53</flexcomp> 54<body name="s0" pos="0.14202 -0.05094 0.22450"> 55 <inertial pos="0 0 0" mass="0.0002" diaginertia="1e-10 1e-10 1e-10"/> 56 <joint type="slide" axis="1 0 0"/>First 10 of 802 lines.
- 7 lines in 126 placesmarkupdata files52 tokensmodel/flex/bag.xml:54–60model/flex/bag.xml:60–66model/flex/bag.xml:66–72model/flex/bag.xml:72–78model/flex/bag.xml:78–84and 121 more
54<body name="s0" pos="0.14202 -0.05094 0.22450"> 55 <inertial pos="0 0 0" mass="0.0002" diaginertia="1e-10 1e-10 1e-10"/> 56 <joint type="slide" axis="1 0 0"/> 57 <joint type="slide" axis="0 1 0"/> 58 <joint type="slide" axis="0 0 1"/> 59</body> 60<body name="s1" pos="0.14202 -0.05094 0.23550">60<body name="s1" pos="0.14202 -0.05094 0.23550"> 61 <inertial pos="0 0 0" mass="0.0002" diaginertia="1e-10 1e-10 1e-10"/> 62 <joint type="slide" axis="1 0 0"/> 63 <joint type="slide" axis="0 1 0"/> 64 <joint type="slide" axis="0 0 1"/> 65</body> 66<body name="s2" pos="0.14721 -0.03637 0.22450"> - 86 lines in 8 placesmarkuptests913 tokensmjx/mujoco/mjx/test_data/humanoid/03_humanoids.xml:200–285mjx/mujoco/mjx/test_data/humanoid/04_humanoids.xml:203–288mjx/mujoco/mjx/test_data/humanoid/05_humanoids.xml:206–291mjx/mujoco/mjx/test_data/humanoid/06_humanoids.xml:209–294mjx/mujoco/mjx/test_data/humanoid/07_humanoids.xml:212–297and 3 more
- 16 lines in 54 placesmarkuptests105 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 144 | 75,620 | 490 | 7,959 | 10.52% |
| cpp | 169 | 110,080 | 329 | 3,206 | 2.91% |
| c | 48 | 80,767 | 277 | 2,676 | 3.31% |
| c-header | 202 | 40,424 | 64 | 888 | 2.2% |
| csharp | 75 | 8,565 | 10 | 94 | 1.1% |
| bash | 8 | 1,734 | 5 | 146 | 8.42% |
| objectivec | 5 | 602 | 1 | 16 | 2.66% |
| typescript | 2 | 532 | 1 | 13 | 2.44% |
| javascript | 1 | 376 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| cpp | 311 | 255,913 | 3,174 | 31,835 | 12.44% |
| markup | 469 | 89,776 | 1,201 | 41,397 | 46.11% |
| python | 252 | 119,070 | 754 | 13,619 | 11.44% |
| c | 49 | 81,648 | 281 | 2,713 | 3.32% |
| c-header | 226 | 61,604 | 210 | 6,504 | 10.56% |
| rest | 45 | 54,203 | 196 | 2,229 | 4.11% |
| csharp | 132 | 24,427 | 115 | 1,317 | 5.39% |
| cmake | 67 | 7,678 | 15 | 1,277 | 16.63% |
| markdown | 42 | 6,049 | 14 | 119 | 1.97% |
| typescript | 8 | 3,857 | 11 | 98 | 2.54% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Nov 10, 2026 | #3 | 17,017 (+574) | 1,682 | 715,651 | 6,000 | 14.19% | 4.71% | E 34.5 | a937a4f |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.