Public report of dimforge/rapier, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 14 November 2026, 18:43 UTC · Survey ID cd_1699e7caf676466796219ee6a32127ad
dimforge/rapier
Measured 14 November 2026, 18:42 UTC, at code version 475caa3
Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureTestRunFailed).
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
No change since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 269,651 lines of product code in 32 projects, tests not counted · Estimated rebuild effort: about 2.3 person-years · Weakest lens: Code Health, 48
Findings by how serious they are
96 critical1700 serious56 minor
13 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 18:42 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
53of 53 dimensions measured by tools.
1837of 1852 findings point to an exact file and line, so you can open each one in the code. The other 15 concern the repository as a whole, such as missing documentation.
53dimensions across 8 lenses, read from 269,651 lines of product code in 32 projects.
dimforge/rapier falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 57 out of 100 and is rated Adequate, and 95 of its 96 critical findings are security problems.
Code Health, at 48, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 5 points. Turning on missing-value checks would lift Code Health itself, worth about 4 points. Raising Code Health to 70 would lift the score to about 63.
Ninety-two pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. One pipeline step installs packages that can change without warning, and one weakness in the code could be used by an attacker. Pinning each tool to an exact version, pinning what the pipeline installs and fixing the weaknesses the scanner points to would close these risks. Giving the pull-request workflow read-only access would fix the pipeline that outsiders can trigger with write access. The loop of files that import each other needs breaking.
The product code is 269,651 lines, about €330,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Code Health rose from 48 to 70, the lowest score rated Strong, the score would rise from 57 to about 63.
Code composition: what the lines of code are
Business logic 0%Supporting code 0%Tests 100%
New since the last survey: 411 findings
These 411 critical or serious findings weren't in the previous survey, on 27 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Code Duplication · Near-duplicate member family (12 members, 42 shared lines) bindings/python/rapier-py-3d/src/controllers.rs
Code Duplication · Near-duplicate member pair (177 shared lines) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs
Code Duplication · Near-duplicate member pair (65 shared lines) examples2d/soft_plasticity2.rs
Code Duplication · Near-duplicate member pair (45 shared lines) examples2d/debug_angular_limits2.rs
Code Duplication · Near-duplicate member pair (42 shared lines) bindings/python/rapier-py-3d/src/pipeline.rs
Code Duplication · Edited copy of a member (15 corresponding lines) bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py
Code Duplication · Members sharing a duplicated core (53 members, 50+ identical tokens) bindings/c/src/config_data.rs
Code Duplication · Members sharing a duplicated core (22 members, 50+ identical tokens) bindings/python/rapier-testbed/rapier_testbed/examples3/ccd3.py
Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) bindings/c/src/control.rs
Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) bindings/typescript/src/geometry/broad_phase.rs
Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) src/dynamics/solver/joint_constraint/joint_constraint_helper.rs
Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) bindings/c/src/descriptors.rs
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) bindings/c/src/control.rs
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) bindings/python/rapier-py-3d/src/pipeline.rs
Code Duplication · Edited copy of a member (93 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs
Code Duplication · Edited copy of a member (84 corresponding lines) bindings/python/rapier-py-3d/src/loaders.rs
Code Duplication · Edited copy of a member (55 corresponding lines) examples3d/keva3.rs
Code Duplication · Edited copy of a member (65 corresponding lines) examples2d/one_way_platforms2.rs
Code Duplication · Edited copy of a member (78 corresponding lines) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs
Code Duplication · Edited copy of a member (54 corresponding lines) examples2d/b2d_joint_grid.rs
Code Duplication · Edited copy of a member (64 corresponding lines) examples3d/debug_chain_high_mass_ratio3.rs
Code Duplication · Edited copy of a member (30 corresponding lines) bindings/c/src/soft_body.rs
Code Duplication · Edited copies of one member (3 members, 67+ corresponding lines) examples2d/heightfield2.rs
Code Duplication · Edited copy of a member (31 corresponding lines) bindings/python/rapier-testbed/rapier_testbed/_meshes.py
Code Duplication · Edited copy of a member (47 corresponding lines) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs
Code Duplication · Edited copy of a member (23 corresponding lines) examples2d/utils/character.rs
Code Duplication · Edited copy of a member (44 corresponding lines) examples2d/utils/character.rs
Code Duplication · Edited copy of a member (38 corresponding lines) src/dynamics/solver/contact_constraint/contact_constraint_element.rs
Code Duplication · Edited copy of a member (34 corresponding lines) examples3d/joints3.rs
Code Duplication · Edited copy of a member (50 corresponding lines) bindings/python/rapier-py-3d/src/loaders.rs
Code Duplication · Edited copy of a member (59 corresponding lines) examples3d/joints3.rs
Code Duplication · Edited copy of a member (44 corresponding lines) src/dynamics/solver/contact_constraint/generic_contact_constraint.rs
Code Duplication · Edited copies of one member (3 members, 48+ corresponding lines) src/dynamics/soft_body/collision_mesh/collision_mesh_topology.rs
Code Duplication · Edited copies of one member (3 members, 51+ corresponding lines) examples3d/debug_articulations3.rs
Code Duplication · Edited copy of a member (31 corresponding lines) examples3d/debug_multibody_ang_motor_pos3.rs
Code Duplication · Edited copy of a member (42 corresponding lines) examples2d/restitution2.rs
Code Duplication · Edited copy of a member (43 corresponding lines) examples2d/damping2.rs
Code Duplication · Edited copies of one member (3 members, 53+ corresponding lines) examples2d/pyramid2.rs
Code Duplication · Edited copies of one member (3 members, 37+ corresponding lines) examples2d/b2d_large_pyramid.rs
Code Duplication · Edited copy of a member (40 corresponding lines) examples2d/b2d_many_pyramids.rs
Code Duplication · Edited copies of one member (3 members, 32+ corresponding lines) bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py
Code Duplication · Edited copy of a member (21 corresponding lines) bindings/python/rapier-py-3d/src/math.rs
Code Duplication · Edited copy of a member (43 corresponding lines) crates/rapier3d-mjcf/src/loader/conversion.rs
Code Duplication · Edited copy of a member (49 corresponding lines) examples3d/mjcf3.rs
Code Duplication · Edited copy of a member (17 corresponding lines) bindings/python/rapier-py-3d/src/math.rs
Code Duplication · Edited copies of one member (3 members, 31+ corresponding lines) bindings/typescript/src/control/pid_controller.rs
Code Duplication · Edited copy of a member (21 corresponding lines) bindings/c/src/joint_extras.rs
Code Duplication · Edited copy of a member (20 corresponding lines) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs
Code Duplication · Edited copy of a member (38 corresponding lines) crates/rapier3d-urdf/src/lib.rs
Code Duplication · Edited copy of a member (40 corresponding lines) examples3d/debug_friction3.rs
Code Duplication · Edited copy of a member (24 corresponding lines) bindings/c/src/queries_extras.rs
Code Duplication · Edited copy of a member (32 corresponding lines) bindings/typescript/src/dynamics/rigid_body_set.rs
Code Duplication · Edited copies of one member (3 members, 38+ corresponding lines) examples3d/debug_boxes3.rs
Code Duplication · Edited copy of a member (24 corresponding lines) bindings/c/src/extra.rs
Code Duplication · Edited copy of a member (45 corresponding lines) examples2d/debug_vertical_column2.rs
Code Duplication · Edited copy of a member (33 corresponding lines) bindings/python/rapier-testbed/rapier_testbed/examples3/mjcf3.py
Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) bindings/typescript/src/geometry/shape.rs
Code Duplication · Edited copy of a member (18 corresponding lines) src_testbed/graphics.rs
Code Duplication · Edited copy of a member (20 corresponding lines) bindings/python/rapier-py-3d/src/loaders.rs
Code Duplication · Edited copy of a member (18 corresponding lines) bindings/python/rapier-py-3d/src/joints.rs
Code Duplication · Edited copy of a member (41 corresponding lines) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs
Code Duplication · Edited copy of a member (49 corresponding lines) src/dynamics/solver/contact_constraint/generic_contact_constraint_element.rs
Code Duplication · Edited copy of a member (46 corresponding lines) examples2d/one_way_platforms2.rs
Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) bindings/c/src/scoped_access.rs
Code Duplication · Edited copy of a member (21 corresponding lines) bindings/c/src/read_access.rs
Code Duplication · Edited copy of a member (20 corresponding lines) bindings/c/src/robotics.rs
Code Duplication · Edited copy of a member (20 corresponding lines) bindings/c/src/soft_body.rs
Code Duplication · Edited copy of a member (19 corresponding lines) bindings/c/src/pipeline.rs
Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) bindings/c/src/robotics.rs
Code Duplication · Edited copy of a member (21 corresponding lines) bindings/typescript/src/pipeline/physics_hooks.rs
Code Duplication · Edited copy of a member (19 corresponding lines) bindings/c/src/extra.rs
Code Duplication · Edited copy of a member (15 corresponding lines) bindings/typescript/src/geometry/contact.rs
Code Duplication · Edited copy of a member (21 corresponding lines) examples2d/b2d_rain.rs
Code Duplication · Edited copy of a member (13 corresponding lines) bindings/python/rapier-testbed/rapier_testbed/examples3/ccd3.py
Code Duplication · Edited copy of a member (32 corresponding lines) src/dynamics/island_manager/persistent.rs
Code Duplication · Edited copy of a member (16 corresponding lines) bindings/bevy_rapier/src/dynamics/joint.rs
Code Duplication · Edited copy of a member (17 corresponding lines) bindings/python/rapier-py-3d/src/controllers.rs
Code Duplication · Edited copy of a member (23 corresponding lines) src/dynamics/solver/solver_body.rs
Code Duplication · Edited copy of a member (22 corresponding lines) bindings/c/src/queries_extras.rs
Code Duplication · Edited copies of one member (6 members, 19+ corresponding lines) bindings/c/src/handle_access.rs
Code Duplication · Edited copy of a member (18 corresponding lines) bindings/c/src/scoped_access.rs
Code Duplication · Edited copy of a member (23 corresponding lines) bindings/python/rapier-py-3d/src/events_hooks.rs
Code Duplication · Edited copy of a member (20 corresponding lines) bindings/c/src/geometry.rs
Code Duplication · Edited copy of a member (16 corresponding lines) bindings/c/src/pipeline.rs
Code Duplication · Edited copy of a member (18 corresponding lines) src/dynamics/soft_body/soft_body_builder/soft_body_builder_mesh_helpers.rs
Code Duplication · Edited copy of a member (19 corresponding lines) bindings/c/src/control.rs
Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) bindings/c/src/handle_access.rs
Code Duplication · Edited copy of a member (20 corresponding lines) src/dynamics/soft_body/soft_body_cluster.rs
Code Duplication · Edited copy of a member (21 corresponding lines) src/pipeline/physics_world.rs
Code Duplication · Edited copies of one member (7 members, 16+ corresponding lines) bindings/c/src/handle_access.rs
Code Duplication · Edited copies of one member (7 members, 19+ corresponding lines) bindings/c/src/scoped_access.rs
Code Duplication · Edited copy of a member (31 corresponding lines) examples2d/utils/character.rs
Code Duplication · Edited copies of one member (5 members, 15+ corresponding lines) bindings/c/src/extra.rs
Code Duplication · Edited copy of a member (17 corresponding lines) bindings/c/src/robotics.rs
Code Duplication · Edited copy of a member (19 corresponding lines) bindings/typescript/src/control/pid_controller.rs
Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) bindings/c/src/handle_access.rs
Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) bindings/c/src/extra.rs
Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) bindings/c/src/world_extras.rs
Code Duplication · Edited copy of a member (20 corresponding lines) examples2d/b2d_rain.rs
Code Duplication · Edited copy of a member (12 corresponding lines) src/dynamics/solver/soft_constraint/soft_element_constraint/soft_elastic_constraint.rs
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 143 findings
These 143 critical or serious findings were in the previous survey, on 27 October 2026, and are gone from this one. The first 100 are listed here.
Code Duplication · Near-duplicate member family (12 members, 41 shared lines) bindings/python/rapier-py-3d/src/controllers.rs
Code Duplication · Near-duplicate member family (3 members, 24 shared lines) bindings/python/rapier-py-3d/src/joints.rs
Code Duplication · Near-duplicate member pair (171 shared lines) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs
Code Duplication · Near-duplicate member pair (45 shared lines) examples2d/debug_angular_limits2.rs
Code Duplication · Near-duplicate member pair (42 shared lines) bindings/python/rapier-py-3d/src/pipeline.rs
Code Duplication · Edited copy of a member (15 corresponding lines) bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py
Code Duplication · Members sharing a duplicated core (29 members, 50+ identical tokens) bindings/c/src/handle_access.rs
Code Duplication · Members sharing a duplicated core (24 members, 50+ identical tokens) bindings/c/src/pipeline.rs
Code Duplication · Members sharing a duplicated core (22 members, 50+ identical tokens) bindings/python/rapier-testbed/rapier_testbed/examples3/ccd3.py
Code Duplication · Members sharing a duplicated core (16 members, 50+ identical tokens) bindings/c/src/pipeline.rs
Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) bindings/c/src/extra.rs
Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) bindings/c/src/pipeline.rs
Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) bindings/typescript/src/geometry/broad_phase.rs
Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) bindings/c/src/queries_extras.rs
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) bindings/c/src/extra.rs
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) bindings/c/src/queries_extras.rs
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) bindings/c/src/scoped_access.rs
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) src/dynamics/solver/joint_constraint/joint_constraint_helper.rs
€110,000 to €550,000, for 1,835 to 5,821 hours of work, about 2.3 person-years for 1 to 5 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 at a score of 57. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 269,651 lines of product code
Comment lines
The estimate prices 269,645 lines. Comment lines count towards the size of 269,651 lines but aren't priced as work.
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml.
Raises the score by about 5 points · Low effort · ADR Quality
2
Record your significant design decisions.
Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Reconcile the README with reality: crates/rapier3d-meshloader/README.md links to `CODE_OF_CONDUCT.md`, but `crates/rapier3d-meshloader/CODE_OF_CONDUCT.md` does not exist; crates/rapier3d-meshloader/README.md links to `CONTRIBUTING.md`, but `crates/rapier3d-meshloader/CONTRIBUTING.md` does not exist; crates/rapier3d-urdf/README.md links to `CODE_OF_CONDUCT.md`, but `crates/rapier3d-urdf/CODE_OF_CONDUCT.md` does not exist; crates/rapier3d-urdf/README.md links to `CONTRIBUTING.md`, but `crates/rapier3d-urdf/CONTRIBUTING.md` does not exist.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €330,000 to build again, about 2.3 person-years of work. Its weakest lens is Code Health, at 48 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.6 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 8% on every change. The history of the code shows how much it changes: about 285,779 lines over the last 90 days, which is about 1,158,993 lines a year. At that pace, the extra work comes to an estimated 104.5 to 626.8 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
606 modules, with 1418 dependencies between them. 9 loops run through 130 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 566 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
bindings.typescript.src_ts.geometry.collider uses bindings.typescript.src_ts.math, so a change to bindings.typescript.src_ts.math can break bindings.typescript.src_ts.geometry.collider, while a change to bindings.typescript.src_ts.geometry.collider can't break bindings.typescript.src_ts.math.
Position
Below the diagonal: bindings.typescript.src_ts.geometry.collider uses a module listed above it, which is the healthy direction.
7→12 bindings.typescript.src_ts.geometry.collider uses bindings.typescript.src_ts.geometry.collider_setpart of a loop✕
Connections
1 pair of types, where a type in bindings.typescript.src_ts.geometry.collider uses a type in bindings.typescript.src_ts.geometry.collider_set.
bindings.typescript.src_ts.geometry.collider uses bindings.typescript.src_ts.geometry.collider_set, so a change to bindings.typescript.src_ts.geometry.collider_set can break bindings.typescript.src_ts.geometry.collider, while a change to bindings.typescript.src_ts.geometry.collider can't break bindings.typescript.src_ts.geometry.collider_set.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→14 bindings.typescript.src_ts.geometry.collider uses bindings.typescript.src_ts.dynamics.rigid_body_setpart of a loop✕
Connections
1 pair of types, where a type in bindings.typescript.src_ts.geometry.collider uses a type in bindings.typescript.src_ts.dynamics.rigid_body_set.
bindings.typescript.src_ts.geometry.collider uses bindings.typescript.src_ts.dynamics.rigid_body_set, so a change to bindings.typescript.src_ts.dynamics.rigid_body_set can break bindings.typescript.src_ts.geometry.collider, while a change to bindings.typescript.src_ts.geometry.collider can't break bindings.typescript.src_ts.dynamics.rigid_body_set.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8→34 crate.bindings.bevy_rapier.src.dynamics.joint uses crate.bindings.bevy_rapier.src.dynamics.generic_jointpart of a loop✕
Connections
2 pairs of types, where a type in crate.bindings.bevy_rapier.src.dynamics.joint uses a type in crate.bindings.bevy_rapier.src.dynamics.generic_joint.
crate.bindings.bevy_rapier.src.dynamics.joint uses crate.bindings.bevy_rapier.src.dynamics.generic_joint, so a change to crate.bindings.bevy_rapier.src.dynamics.generic_joint can break crate.bindings.bevy_rapier.src.dynamics.joint, while a change to crate.bindings.bevy_rapier.src.dynamics.joint can't break crate.bindings.bevy_rapier.src.dynamics.generic_joint.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
crate.bindings.bevy_rapier.src.geometry.collider uses crate.geometry.collider_handle, so a change to crate.geometry.collider_handle can break crate.bindings.bevy_rapier.src.geometry.collider, while a change to crate.bindings.bevy_rapier.src.geometry.collider can't break crate.geometry.collider_handle.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.geometry.collider uses a module listed above it, which is the healthy direction.
9→30 crate.bindings.bevy_rapier.src.geometry.collider uses crate.dynamics.rigid_body_componentspart of a loop✕
Connections
1 pair of types, where a type in crate.bindings.bevy_rapier.src.geometry.collider uses a type in crate.dynamics.rigid_body_components.
crate.bindings.bevy_rapier.src.geometry.collider uses crate.dynamics.rigid_body_components, so a change to crate.dynamics.rigid_body_components can break crate.bindings.bevy_rapier.src.geometry.collider, while a change to crate.bindings.bevy_rapier.src.geometry.collider can't break crate.dynamics.rigid_body_components.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→31 crate.bindings.bevy_rapier.src.geometry.collider uses crate.bindings.bevy_rapier.src.dynamics.rigid_bodypart of a loop✕
Connections
2 pairs of types, where a type in crate.bindings.bevy_rapier.src.geometry.collider uses a type in crate.bindings.bevy_rapier.src.dynamics.rigid_body.
crate.bindings.bevy_rapier.src.geometry.collider uses crate.bindings.bevy_rapier.src.dynamics.rigid_body, so a change to crate.bindings.bevy_rapier.src.dynamics.rigid_body can break crate.bindings.bevy_rapier.src.geometry.collider, while a change to crate.bindings.bevy_rapier.src.geometry.collider can't break crate.bindings.bevy_rapier.src.dynamics.rigid_body.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
crate.bindings.c.src.types uses crate.dynamics.integration_parameters, so a change to crate.dynamics.integration_parameters can break crate.bindings.c.src.types, while a change to crate.bindings.c.src.types can't break crate.dynamics.integration_parameters.
Position
Below the diagonal: crate.bindings.c.src.types uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.types uses crate.dynamics.rigid_body_handle, so a change to crate.dynamics.rigid_body_handle can break crate.bindings.c.src.types, while a change to crate.bindings.c.src.types can't break crate.dynamics.rigid_body_handle.
Position
Below the diagonal: crate.bindings.c.src.types uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.types uses crate.dynamics.soft_body.soft_body_handle, so a change to crate.dynamics.soft_body.soft_body_handle can break crate.bindings.c.src.types, while a change to crate.bindings.c.src.types can't break crate.dynamics.soft_body.soft_body_handle.
Position
Below the diagonal: crate.bindings.c.src.types uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.types uses crate.geometry.collider_handle, so a change to crate.geometry.collider_handle can break crate.bindings.c.src.types, while a change to crate.bindings.c.src.types can't break crate.geometry.collider_handle.
Position
Below the diagonal: crate.bindings.c.src.types uses a module listed above it, which is the healthy direction.
crate.dynamics.joint.multibody_joint.multibody_joint_set uses crate.dynamics.rigid_body_handle, so a change to crate.dynamics.rigid_body_handle can break crate.dynamics.joint.multibody_joint.multibody_joint_set, while a change to crate.dynamics.joint.multibody_joint.multibody_joint_set can't break crate.dynamics.rigid_body_handle.
Position
Below the diagonal: crate.dynamics.joint.multibody_joint.multibody_joint_set uses a module listed above it, which is the healthy direction.
bindings.typescript.src_ts.geometry.collider_set uses bindings.typescript.src_ts.geometry.collider, so a change to bindings.typescript.src_ts.geometry.collider can break bindings.typescript.src_ts.geometry.collider_set, while a change to bindings.typescript.src_ts.geometry.collider_set can't break bindings.typescript.src_ts.geometry.collider.
Position
Below the diagonal: bindings.typescript.src_ts.geometry.collider_set uses a module listed above it, which is the healthy direction.
12→14 bindings.typescript.src_ts.geometry.collider_set uses bindings.typescript.src_ts.dynamics.rigid_body_setpart of a loop✕
Connections
1 pair of types, where a type in bindings.typescript.src_ts.geometry.collider_set uses a type in bindings.typescript.src_ts.dynamics.rigid_body_set.
bindings.typescript.src_ts.geometry.collider_set uses bindings.typescript.src_ts.dynamics.rigid_body_set, so a change to bindings.typescript.src_ts.dynamics.rigid_body_set can break bindings.typescript.src_ts.geometry.collider_set, while a change to bindings.typescript.src_ts.geometry.collider_set can't break bindings.typescript.src_ts.dynamics.rigid_body_set.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
crate.dynamics.soft_body.soft_body_set.soft_body_set uses crate.dynamics.integration_parameters, so a change to crate.dynamics.integration_parameters can break crate.dynamics.soft_body.soft_body_set.soft_body_set, while a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can't break crate.dynamics.integration_parameters.
Position
Below the diagonal: crate.dynamics.soft_body.soft_body_set.soft_body_set uses a module listed above it, which is the healthy direction.
crate.dynamics.soft_body.soft_body_set.soft_body_set uses crate.dynamics.rigid_body_handle, so a change to crate.dynamics.rigid_body_handle can break crate.dynamics.soft_body.soft_body_set.soft_body_set, while a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can't break crate.dynamics.rigid_body_handle.
Position
Below the diagonal: crate.dynamics.soft_body.soft_body_set.soft_body_set uses a module listed above it, which is the healthy direction.
crate.dynamics.soft_body.soft_body_set.soft_body_set uses crate.dynamics.soft_body.soft_body_handle, so a change to crate.dynamics.soft_body.soft_body_handle can break crate.dynamics.soft_body.soft_body_set.soft_body_set, while a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can't break crate.dynamics.soft_body.soft_body_handle.
Position
Below the diagonal: crate.dynamics.soft_body.soft_body_set.soft_body_set uses a module listed above it, which is the healthy direction.
crate.dynamics.soft_body.soft_body_set.soft_body_set uses crate.geometry.collider_handle, so a change to crate.geometry.collider_handle can break crate.dynamics.soft_body.soft_body_set.soft_body_set, while a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can't break crate.geometry.collider_handle.
Position
Below the diagonal: crate.dynamics.soft_body.soft_body_set.soft_body_set uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.dynamics.soft_body.soft_body_set.soft_body_set uses a type in crate.dynamics.joint.multibody_joint.multibody_joint_set.
crate.dynamics.soft_body.soft_body_set.soft_body_set uses crate.dynamics.joint.multibody_joint.multibody_joint_set, so a change to crate.dynamics.joint.multibody_joint.multibody_joint_set can break crate.dynamics.soft_body.soft_body_set.soft_body_set, while a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can't break crate.dynamics.joint.multibody_joint.multibody_joint_set.
Position
Below the diagonal: crate.dynamics.soft_body.soft_body_set.soft_body_set uses a module listed above it, which is the healthy direction.
13→15 crate.dynamics.soft_body.soft_body_set.soft_body_set uses crate.dynamics.rigid_body_setpart of a loop✕
Connections
1 pair of types, where a type in crate.dynamics.soft_body.soft_body_set.soft_body_set uses a type in crate.dynamics.rigid_body_set.
crate.dynamics.soft_body.soft_body_set.soft_body_set uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.dynamics.soft_body.soft_body_set.soft_body_set, while a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can't break crate.dynamics.rigid_body_set.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→17 crate.dynamics.soft_body.soft_body_set.soft_body_set uses crate.dynamics.joint.impulse_joint.impulse_joint_setpart of a loop✕
Connections
1 pair of types, where a type in crate.dynamics.soft_body.soft_body_set.soft_body_set uses a type in crate.dynamics.joint.impulse_joint.impulse_joint_set.
crate.dynamics.soft_body.soft_body_set.soft_body_set uses crate.dynamics.joint.impulse_joint.impulse_joint_set, so a change to crate.dynamics.joint.impulse_joint.impulse_joint_set can break crate.dynamics.soft_body.soft_body_set.soft_body_set, while a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can't break crate.dynamics.joint.impulse_joint.impulse_joint_set.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→21 crate.dynamics.soft_body.soft_body_set.soft_body_set uses crate.dynamics.island_manager.managerpart of a loop✕
Connections
1 pair of types, where a type in crate.dynamics.soft_body.soft_body_set.soft_body_set uses a type in crate.dynamics.island_manager.manager.
crate.dynamics.soft_body.soft_body_set.soft_body_set uses crate.dynamics.island_manager.manager, so a change to crate.dynamics.island_manager.manager can break crate.dynamics.soft_body.soft_body_set.soft_body_set, while a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can't break crate.dynamics.island_manager.manager.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→22 crate.dynamics.soft_body.soft_body_set.soft_body_set uses crate.geometry.collider_setpart of a loop✕
Connections
1 pair of types, where a type in crate.dynamics.soft_body.soft_body_set.soft_body_set uses a type in crate.geometry.collider_set.
crate.dynamics.soft_body.soft_body_set.soft_body_set uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.dynamics.soft_body.soft_body_set.soft_body_set, while a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can't break crate.geometry.collider_set.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→23 crate.dynamics.soft_body.soft_body_set.soft_body_set uses crate.bindings.bevy_rapier.src.dynamics.soft_bodypart of a loop✕
Connections
1 pair of types, where a type in crate.dynamics.soft_body.soft_body_set.soft_body_set uses a type in crate.bindings.bevy_rapier.src.dynamics.soft_body.
crate.dynamics.soft_body.soft_body_set.soft_body_set uses crate.bindings.bevy_rapier.src.dynamics.soft_body, so a change to crate.bindings.bevy_rapier.src.dynamics.soft_body can break crate.dynamics.soft_body.soft_body_set.soft_body_set, while a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can't break crate.bindings.bevy_rapier.src.dynamics.soft_body.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
bindings.typescript.src_ts.dynamics.rigid_body_set uses bindings.typescript.src_ts.geometry.collider_set, so a change to bindings.typescript.src_ts.geometry.collider_set can break bindings.typescript.src_ts.dynamics.rigid_body_set, while a change to bindings.typescript.src_ts.dynamics.rigid_body_set can't break bindings.typescript.src_ts.geometry.collider_set.
Position
Below the diagonal: bindings.typescript.src_ts.dynamics.rigid_body_set uses a module listed above it, which is the healthy direction.
crate.dynamics.rigid_body_set uses crate.dynamics.rigid_body_handle, so a change to crate.dynamics.rigid_body_handle can break crate.dynamics.rigid_body_set, while a change to crate.dynamics.rigid_body_set can't break crate.dynamics.rigid_body_handle.
Position
Below the diagonal: crate.dynamics.rigid_body_set uses a module listed above it, which is the healthy direction.
crate.dynamics.rigid_body_set uses crate.dynamics.joint.multibody_joint.multibody_joint_set, so a change to crate.dynamics.joint.multibody_joint.multibody_joint_set can break crate.dynamics.rigid_body_set, while a change to crate.dynamics.rigid_body_set can't break crate.dynamics.joint.multibody_joint.multibody_joint_set.
Position
Below the diagonal: crate.dynamics.rigid_body_set uses a module listed above it, which is the healthy direction.
crate.dynamics.rigid_body_set uses crate.dynamics.soft_body.soft_body_set.soft_body_set, so a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can break crate.dynamics.rigid_body_set, while a change to crate.dynamics.rigid_body_set can't break crate.dynamics.soft_body.soft_body_set.soft_body_set.
Position
Below the diagonal: crate.dynamics.rigid_body_set uses a module listed above it, which is the healthy direction.
15→17 crate.dynamics.rigid_body_set uses crate.dynamics.joint.impulse_joint.impulse_joint_setpart of a loop✕
Connections
1 pair of types, where a type in crate.dynamics.rigid_body_set uses a type in crate.dynamics.joint.impulse_joint.impulse_joint_set.
crate.dynamics.rigid_body_set uses crate.dynamics.joint.impulse_joint.impulse_joint_set, so a change to crate.dynamics.joint.impulse_joint.impulse_joint_set can break crate.dynamics.rigid_body_set, while a change to crate.dynamics.rigid_body_set can't break crate.dynamics.joint.impulse_joint.impulse_joint_set.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→21 crate.dynamics.rigid_body_set uses crate.dynamics.island_manager.managerpart of a loop✕
Connections
1 pair of types, where a type in crate.dynamics.rigid_body_set uses a type in crate.dynamics.island_manager.manager.
crate.dynamics.rigid_body_set uses crate.dynamics.island_manager.manager, so a change to crate.dynamics.island_manager.manager can break crate.dynamics.rigid_body_set, while a change to crate.dynamics.rigid_body_set can't break crate.dynamics.island_manager.manager.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→22 crate.dynamics.rigid_body_set uses crate.geometry.collider_setpart of a loop✕
Connections
1 pair of types, where a type in crate.dynamics.rigid_body_set uses a type in crate.geometry.collider_set.
crate.dynamics.rigid_body_set uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.dynamics.rigid_body_set, while a change to crate.dynamics.rigid_body_set can't break crate.geometry.collider_set.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→31 crate.dynamics.rigid_body_set uses crate.bindings.bevy_rapier.src.dynamics.rigid_bodypart of a loop✕
Connections
1 pair of types, where a type in crate.dynamics.rigid_body_set uses a type in crate.bindings.bevy_rapier.src.dynamics.rigid_body.
crate.dynamics.rigid_body_set uses crate.bindings.bevy_rapier.src.dynamics.rigid_body, so a change to crate.bindings.bevy_rapier.src.dynamics.rigid_body can break crate.dynamics.rigid_body_set, while a change to crate.dynamics.rigid_body_set can't break crate.bindings.bevy_rapier.src.dynamics.rigid_body.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
bindings.typescript.src_ts.pipeline.world uses bindings.typescript.src_ts.math, so a change to bindings.typescript.src_ts.math can break bindings.typescript.src_ts.pipeline.world, while a change to bindings.typescript.src_ts.pipeline.world can't break bindings.typescript.src_ts.math.
Position
Below the diagonal: bindings.typescript.src_ts.pipeline.world uses a module listed above it, which is the healthy direction.
bindings.typescript.src_ts.pipeline.world uses bindings.typescript.src_ts.geometry.collider, so a change to bindings.typescript.src_ts.geometry.collider can break bindings.typescript.src_ts.pipeline.world, while a change to bindings.typescript.src_ts.pipeline.world can't break bindings.typescript.src_ts.geometry.collider.
Position
Below the diagonal: bindings.typescript.src_ts.pipeline.world uses a module listed above it, which is the healthy direction.
bindings.typescript.src_ts.pipeline.world uses bindings.typescript.src_ts.geometry.collider_set, so a change to bindings.typescript.src_ts.geometry.collider_set can break bindings.typescript.src_ts.pipeline.world, while a change to bindings.typescript.src_ts.pipeline.world can't break bindings.typescript.src_ts.geometry.collider_set.
Position
Below the diagonal: bindings.typescript.src_ts.pipeline.world uses a module listed above it, which is the healthy direction.
bindings.typescript.src_ts.pipeline.world uses bindings.typescript.src_ts.dynamics.rigid_body_set, so a change to bindings.typescript.src_ts.dynamics.rigid_body_set can break bindings.typescript.src_ts.pipeline.world, while a change to bindings.typescript.src_ts.pipeline.world can't break bindings.typescript.src_ts.dynamics.rigid_body_set.
Position
Below the diagonal: bindings.typescript.src_ts.pipeline.world uses a module listed above it, which is the healthy direction.
crate.dynamics.joint.impulse_joint.impulse_joint_set uses crate.dynamics.rigid_body_handle, so a change to crate.dynamics.rigid_body_handle can break crate.dynamics.joint.impulse_joint.impulse_joint_set, while a change to crate.dynamics.joint.impulse_joint.impulse_joint_set can't break crate.dynamics.rigid_body_handle.
Position
Below the diagonal: crate.dynamics.joint.impulse_joint.impulse_joint_set uses a module listed above it, which is the healthy direction.
crate.dynamics.joint.impulse_joint.impulse_joint_set uses crate.bindings.bevy_rapier.src.dynamics.joint, so a change to crate.bindings.bevy_rapier.src.dynamics.joint can break crate.dynamics.joint.impulse_joint.impulse_joint_set, while a change to crate.dynamics.joint.impulse_joint.impulse_joint_set can't break crate.bindings.bevy_rapier.src.dynamics.joint.
Position
Below the diagonal: crate.dynamics.joint.impulse_joint.impulse_joint_set uses a module listed above it, which is the healthy direction.
crate.dynamics.joint.impulse_joint.impulse_joint_set uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.dynamics.joint.impulse_joint.impulse_joint_set, while a change to crate.dynamics.joint.impulse_joint.impulse_joint_set can't break crate.dynamics.rigid_body_set.
Position
Below the diagonal: crate.dynamics.joint.impulse_joint.impulse_joint_set uses a module listed above it, which is the healthy direction.
17→21 crate.dynamics.joint.impulse_joint.impulse_joint_set uses crate.dynamics.island_manager.managerpart of a loop✕
Connections
1 pair of types, where a type in crate.dynamics.joint.impulse_joint.impulse_joint_set uses a type in crate.dynamics.island_manager.manager.
crate.dynamics.joint.impulse_joint.impulse_joint_set uses crate.dynamics.island_manager.manager, so a change to crate.dynamics.island_manager.manager can break crate.dynamics.joint.impulse_joint.impulse_joint_set, while a change to crate.dynamics.joint.impulse_joint.impulse_joint_set can't break crate.dynamics.island_manager.manager.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses crate.dynamics.integration_parameters, so a change to crate.dynamics.integration_parameters can break crate.geometry.narrow_phase.soft_contacts.soft_contacts_types, while a change to crate.geometry.narrow_phase.soft_contacts.soft_contacts_types can't break crate.dynamics.integration_parameters.
Position
Below the diagonal: crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses a module listed above it, which is the healthy direction.
crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses crate.geometry.collider_handle, so a change to crate.geometry.collider_handle can break crate.geometry.narrow_phase.soft_contacts.soft_contacts_types, while a change to crate.geometry.narrow_phase.soft_contacts.soft_contacts_types can't break crate.geometry.collider_handle.
Position
Below the diagonal: crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses a type in crate.bindings.bevy_rapier.src.geometry.collider.
crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses crate.bindings.bevy_rapier.src.geometry.collider, so a change to crate.bindings.bevy_rapier.src.geometry.collider can break crate.geometry.narrow_phase.soft_contacts.soft_contacts_types, while a change to crate.geometry.narrow_phase.soft_contacts.soft_contacts_types can't break crate.bindings.bevy_rapier.src.geometry.collider.
Position
Below the diagonal: crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses a type in crate.dynamics.soft_body.soft_body_set.soft_body_set.
crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses crate.dynamics.soft_body.soft_body_set.soft_body_set, so a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can break crate.geometry.narrow_phase.soft_contacts.soft_contacts_types, while a change to crate.geometry.narrow_phase.soft_contacts.soft_contacts_types can't break crate.dynamics.soft_body.soft_body_set.soft_body_set.
Position
Below the diagonal: crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses a module listed above it, which is the healthy direction.
crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.geometry.narrow_phase.soft_contacts.soft_contacts_types, while a change to crate.geometry.narrow_phase.soft_contacts.soft_contacts_types can't break crate.dynamics.rigid_body_set.
Position
Below the diagonal: crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses a module listed above it, which is the healthy direction.
18→22 crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses crate.geometry.collider_setpart of a loop✕
Connections
1 pair of types, where a type in crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses a type in crate.geometry.collider_set.
crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.geometry.narrow_phase.soft_contacts.soft_contacts_types, while a change to crate.geometry.narrow_phase.soft_contacts.soft_contacts_types can't break crate.geometry.collider_set.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
18→23 crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses crate.bindings.bevy_rapier.src.dynamics.soft_bodypart of a loop✕
Connections
1 pair of types, where a type in crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses a type in crate.bindings.bevy_rapier.src.dynamics.soft_body.
crate.geometry.narrow_phase.soft_contacts.soft_contacts_types uses crate.bindings.bevy_rapier.src.dynamics.soft_body, so a change to crate.bindings.bevy_rapier.src.dynamics.soft_body can break crate.geometry.narrow_phase.soft_contacts.soft_contacts_types, while a change to crate.geometry.narrow_phase.soft_contacts.soft_contacts_types can't break crate.bindings.bevy_rapier.src.dynamics.soft_body.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
crate.geometry.contact_pair uses crate.dynamics.rigid_body_handle, so a change to crate.dynamics.rigid_body_handle can break crate.geometry.contact_pair, while a change to crate.geometry.contact_pair can't break crate.dynamics.rigid_body_handle.
Position
Below the diagonal: crate.geometry.contact_pair uses a module listed above it, which is the healthy direction.
crate.geometry.contact_pair uses crate.geometry.collider_handle, so a change to crate.geometry.collider_handle can break crate.geometry.contact_pair, while a change to crate.geometry.contact_pair can't break crate.geometry.collider_handle.
Position
Below the diagonal: crate.geometry.contact_pair uses a module listed above it, which is the healthy direction.
crate.geometry.contact_pair uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.geometry.contact_pair, while a change to crate.geometry.contact_pair can't break crate.dynamics.rigid_body_set.
Position
Below the diagonal: crate.geometry.contact_pair uses a module listed above it, which is the healthy direction.
crate.geometry.contact_pair uses crate.geometry.narrow_phase.soft_contacts.soft_contacts_types, so a change to crate.geometry.narrow_phase.soft_contacts.soft_contacts_types can break crate.geometry.contact_pair, while a change to crate.geometry.contact_pair can't break crate.geometry.narrow_phase.soft_contacts.soft_contacts_types.
Position
Below the diagonal: crate.geometry.contact_pair uses a module listed above it, which is the healthy direction.
19→22 crate.geometry.contact_pair uses crate.geometry.collider_setpart of a loop✕
Connections
2 pairs of types, where a type in crate.geometry.contact_pair uses a type in crate.geometry.collider_set.
crate.geometry.contact_pair uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.geometry.contact_pair, while a change to crate.geometry.contact_pair can't break crate.geometry.collider_set.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
crate.geometry.narrow_phase uses crate.dynamics.rigid_body_handle, so a change to crate.dynamics.rigid_body_handle can break crate.geometry.narrow_phase, while a change to crate.geometry.narrow_phase can't break crate.dynamics.rigid_body_handle.
Position
Below the diagonal: crate.geometry.narrow_phase uses a module listed above it, which is the healthy direction.
crate.geometry.narrow_phase uses crate.geometry.collider_handle, so a change to crate.geometry.collider_handle can break crate.geometry.narrow_phase, while a change to crate.geometry.narrow_phase can't break crate.geometry.collider_handle.
Position
Below the diagonal: crate.geometry.narrow_phase uses a module listed above it, which is the healthy direction.
crate.geometry.narrow_phase uses crate.dynamics.joint.multibody_joint.multibody_joint_set, so a change to crate.dynamics.joint.multibody_joint.multibody_joint_set can break crate.geometry.narrow_phase, while a change to crate.geometry.narrow_phase can't break crate.dynamics.joint.multibody_joint.multibody_joint_set.
Position
Below the diagonal: crate.geometry.narrow_phase uses a module listed above it, which is the healthy direction.
crate.geometry.narrow_phase uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.geometry.narrow_phase, while a change to crate.geometry.narrow_phase can't break crate.dynamics.rigid_body_set.
Position
Below the diagonal: crate.geometry.narrow_phase uses a module listed above it, which is the healthy direction.
crate.geometry.narrow_phase uses crate.dynamics.joint.impulse_joint.impulse_joint_set, so a change to crate.dynamics.joint.impulse_joint.impulse_joint_set can break crate.geometry.narrow_phase, while a change to crate.geometry.narrow_phase can't break crate.dynamics.joint.impulse_joint.impulse_joint_set.
Position
Below the diagonal: crate.geometry.narrow_phase uses a module listed above it, which is the healthy direction.
crate.geometry.narrow_phase uses crate.geometry.narrow_phase.soft_contacts.soft_contacts_types, so a change to crate.geometry.narrow_phase.soft_contacts.soft_contacts_types can break crate.geometry.narrow_phase, while a change to crate.geometry.narrow_phase can't break crate.geometry.narrow_phase.soft_contacts.soft_contacts_types.
Position
Below the diagonal: crate.geometry.narrow_phase uses a module listed above it, which is the healthy direction.
crate.geometry.narrow_phase uses crate.geometry.contact_pair, so a change to crate.geometry.contact_pair can break crate.geometry.narrow_phase, while a change to crate.geometry.narrow_phase can't break crate.geometry.contact_pair.
Position
Below the diagonal: crate.geometry.narrow_phase uses a module listed above it, which is the healthy direction.
20→21 crate.geometry.narrow_phase uses crate.dynamics.island_manager.managerpart of a loop✕
Connections
2 pairs of types, where a type in crate.geometry.narrow_phase uses a type in crate.dynamics.island_manager.manager.
crate.geometry.narrow_phase uses crate.dynamics.island_manager.manager, so a change to crate.dynamics.island_manager.manager can break crate.geometry.narrow_phase, while a change to crate.geometry.narrow_phase can't break crate.dynamics.island_manager.manager.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
20→22 crate.geometry.narrow_phase uses crate.geometry.collider_setpart of a loop✕
Connections
2 pairs of types, where a type in crate.geometry.narrow_phase uses a type in crate.geometry.collider_set.
crate.geometry.narrow_phase uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.geometry.narrow_phase, while a change to crate.geometry.narrow_phase can't break crate.geometry.collider_set.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
crate.dynamics.island_manager.manager uses crate.dynamics.rigid_body_handle, so a change to crate.dynamics.rigid_body_handle can break crate.dynamics.island_manager.manager, while a change to crate.dynamics.island_manager.manager can't break crate.dynamics.rigid_body_handle.
Position
Below the diagonal: crate.dynamics.island_manager.manager uses a module listed above it, which is the healthy direction.
crate.dynamics.island_manager.manager uses crate.dynamics.soft_body.soft_body_handle, so a change to crate.dynamics.soft_body.soft_body_handle can break crate.dynamics.island_manager.manager, while a change to crate.dynamics.island_manager.manager can't break crate.dynamics.soft_body.soft_body_handle.
Position
Below the diagonal: crate.dynamics.island_manager.manager uses a module listed above it, which is the healthy direction.
crate.dynamics.island_manager.manager uses crate.dynamics.joint.multibody_joint.multibody_joint_set, so a change to crate.dynamics.joint.multibody_joint.multibody_joint_set can break crate.dynamics.island_manager.manager, while a change to crate.dynamics.island_manager.manager can't break crate.dynamics.joint.multibody_joint.multibody_joint_set.
Position
Below the diagonal: crate.dynamics.island_manager.manager uses a module listed above it, which is the healthy direction.
crate.dynamics.island_manager.manager uses crate.dynamics.soft_body.soft_body_set.soft_body_set, so a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can break crate.dynamics.island_manager.manager, while a change to crate.dynamics.island_manager.manager can't break crate.dynamics.soft_body.soft_body_set.soft_body_set.
Position
Below the diagonal: crate.dynamics.island_manager.manager uses a module listed above it, which is the healthy direction.
crate.dynamics.island_manager.manager uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.dynamics.island_manager.manager, while a change to crate.dynamics.island_manager.manager can't break crate.dynamics.rigid_body_set.
Position
Below the diagonal: crate.dynamics.island_manager.manager uses a module listed above it, which is the healthy direction.
crate.dynamics.island_manager.manager uses crate.dynamics.joint.impulse_joint.impulse_joint_set, so a change to crate.dynamics.joint.impulse_joint.impulse_joint_set can break crate.dynamics.island_manager.manager, while a change to crate.dynamics.island_manager.manager can't break crate.dynamics.joint.impulse_joint.impulse_joint_set.
Position
Below the diagonal: crate.dynamics.island_manager.manager uses a module listed above it, which is the healthy direction.
crate.dynamics.island_manager.manager uses crate.geometry.narrow_phase, so a change to crate.geometry.narrow_phase can break crate.dynamics.island_manager.manager, while a change to crate.dynamics.island_manager.manager can't break crate.geometry.narrow_phase.
Position
Below the diagonal: crate.dynamics.island_manager.manager uses a module listed above it, which is the healthy direction.
21→22 crate.dynamics.island_manager.manager uses crate.geometry.collider_setpart of a loop✕
Connections
1 pair of types, where a type in crate.dynamics.island_manager.manager uses a type in crate.geometry.collider_set.
crate.dynamics.island_manager.manager uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.dynamics.island_manager.manager, while a change to crate.dynamics.island_manager.manager can't break crate.geometry.collider_set.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
21→30 crate.dynamics.island_manager.manager uses crate.dynamics.rigid_body_componentspart of a loop✕
Connections
1 pair of types, where a type in crate.dynamics.island_manager.manager uses a type in crate.dynamics.rigid_body_components.
crate.dynamics.island_manager.manager uses crate.dynamics.rigid_body_components, so a change to crate.dynamics.rigid_body_components can break crate.dynamics.island_manager.manager, while a change to crate.dynamics.island_manager.manager can't break crate.dynamics.rigid_body_components.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
21→31 crate.dynamics.island_manager.manager uses crate.bindings.bevy_rapier.src.dynamics.rigid_bodypart of a loop✕
Connections
1 pair of types, where a type in crate.dynamics.island_manager.manager uses a type in crate.bindings.bevy_rapier.src.dynamics.rigid_body.
crate.dynamics.island_manager.manager uses crate.bindings.bevy_rapier.src.dynamics.rigid_body, so a change to crate.bindings.bevy_rapier.src.dynamics.rigid_body can break crate.dynamics.island_manager.manager, while a change to crate.dynamics.island_manager.manager can't break crate.bindings.bevy_rapier.src.dynamics.rigid_body.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
crate.geometry.collider_set uses crate.dynamics.rigid_body_handle, so a change to crate.dynamics.rigid_body_handle can break crate.geometry.collider_set, while a change to crate.geometry.collider_set can't break crate.dynamics.rigid_body_handle.
Position
Below the diagonal: crate.geometry.collider_set uses a module listed above it, which is the healthy direction.
crate.geometry.collider_set uses crate.geometry.collider_handle, so a change to crate.geometry.collider_handle can break crate.geometry.collider_set, while a change to crate.geometry.collider_set can't break crate.geometry.collider_handle.
Position
Below the diagonal: crate.geometry.collider_set uses a module listed above it, which is the healthy direction.
crate.geometry.collider_set uses crate.bindings.bevy_rapier.src.geometry.collider, so a change to crate.bindings.bevy_rapier.src.geometry.collider can break crate.geometry.collider_set, while a change to crate.geometry.collider_set can't break crate.bindings.bevy_rapier.src.geometry.collider.
Position
Below the diagonal: crate.geometry.collider_set uses a module listed above it, which is the healthy direction.
crate.geometry.collider_set uses crate.dynamics.soft_body.soft_body_set.soft_body_set, so a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can break crate.geometry.collider_set, while a change to crate.geometry.collider_set can't break crate.dynamics.soft_body.soft_body_set.soft_body_set.
Position
Below the diagonal: crate.geometry.collider_set uses a module listed above it, which is the healthy direction.
crate.geometry.collider_set uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.geometry.collider_set, while a change to crate.geometry.collider_set can't break crate.dynamics.rigid_body_set.
Position
Below the diagonal: crate.geometry.collider_set uses a module listed above it, which is the healthy direction.
crate.geometry.collider_set uses crate.dynamics.island_manager.manager, so a change to crate.dynamics.island_manager.manager can break crate.geometry.collider_set, while a change to crate.geometry.collider_set can't break crate.dynamics.island_manager.manager.
Position
Below the diagonal: crate.geometry.collider_set uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.dynamics.soft_body uses crate.dynamics.integration_parameters, so a change to crate.dynamics.integration_parameters can break crate.bindings.bevy_rapier.src.dynamics.soft_body, while a change to crate.bindings.bevy_rapier.src.dynamics.soft_body can't break crate.dynamics.integration_parameters.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.dynamics.soft_body uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.dynamics.soft_body uses crate.dynamics.soft_body.soft_body_handle, so a change to crate.dynamics.soft_body.soft_body_handle can break crate.bindings.bevy_rapier.src.dynamics.soft_body, while a change to crate.bindings.bevy_rapier.src.dynamics.soft_body can't break crate.dynamics.soft_body.soft_body_handle.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.dynamics.soft_body uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.dynamics.soft_body uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.bindings.bevy_rapier.src.dynamics.soft_body, while a change to crate.bindings.bevy_rapier.src.dynamics.soft_body can't break crate.geometry.collider_set.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.dynamics.soft_body uses a module listed above it, which is the healthy direction.
crate.bindings.typescript.src.geometry.collider_set uses crate.bindings.bevy_rapier.src.geometry.collider, so a change to crate.bindings.bevy_rapier.src.geometry.collider can break crate.bindings.typescript.src.geometry.collider_set, while a change to crate.bindings.typescript.src.geometry.collider_set can't break crate.bindings.bevy_rapier.src.geometry.collider.
Position
Below the diagonal: crate.bindings.typescript.src.geometry.collider_set uses a module listed above it, which is the healthy direction.
crate.bindings.typescript.src.geometry.collider_set uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.bindings.typescript.src.geometry.collider_set, while a change to crate.bindings.typescript.src.geometry.collider_set can't break crate.geometry.collider_set.
Position
Below the diagonal: crate.bindings.typescript.src.geometry.collider_set uses a module listed above it, which is the healthy direction.
24→26 crate.bindings.typescript.src.geometry.collider_set uses crate.bindings.typescript.src.dynamics.soft_bodypart of a loop✕
Connections
2 pairs of types, where a type in crate.bindings.typescript.src.geometry.collider_set uses a type in crate.bindings.typescript.src.dynamics.soft_body.
crate.bindings.typescript.src.geometry.collider_set uses crate.bindings.typescript.src.dynamics.soft_body, so a change to crate.bindings.typescript.src.dynamics.soft_body can break crate.bindings.typescript.src.geometry.collider_set, while a change to crate.bindings.typescript.src.geometry.collider_set can't break crate.bindings.typescript.src.dynamics.soft_body.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
24→28 crate.bindings.typescript.src.geometry.collider_set uses crate.bindings.typescript.src.dynamics.rigid_body_setpart of a loop✕
Connections
1 pair of types, where a type in crate.bindings.typescript.src.geometry.collider_set uses a type in crate.bindings.typescript.src.dynamics.rigid_body_set.
crate.bindings.typescript.src.geometry.collider_set uses crate.bindings.typescript.src.dynamics.rigid_body_set, so a change to crate.bindings.typescript.src.dynamics.rigid_body_set can break crate.bindings.typescript.src.geometry.collider_set, while a change to crate.bindings.typescript.src.geometry.collider_set can't break crate.bindings.typescript.src.dynamics.rigid_body_set.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
crate.geometry.broad_phase_bvh uses crate.dynamics.integration_parameters, so a change to crate.dynamics.integration_parameters can break crate.geometry.broad_phase_bvh, while a change to crate.geometry.broad_phase_bvh can't break crate.dynamics.integration_parameters.
Position
Below the diagonal: crate.geometry.broad_phase_bvh uses a module listed above it, which is the healthy direction.
crate.geometry.broad_phase_bvh uses crate.geometry.collider_handle, so a change to crate.geometry.collider_handle can break crate.geometry.broad_phase_bvh, while a change to crate.geometry.broad_phase_bvh can't break crate.geometry.collider_handle.
Position
Below the diagonal: crate.geometry.broad_phase_bvh uses a module listed above it, which is the healthy direction.
crate.geometry.broad_phase_bvh uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.geometry.broad_phase_bvh, while a change to crate.geometry.broad_phase_bvh can't break crate.dynamics.rigid_body_set.
Position
Below the diagonal: crate.geometry.broad_phase_bvh uses a module listed above it, which is the healthy direction.
crate.geometry.broad_phase_bvh uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.geometry.broad_phase_bvh, while a change to crate.geometry.broad_phase_bvh can't break crate.geometry.collider_set.
Position
Below the diagonal: crate.geometry.broad_phase_bvh uses a module listed above it, which is the healthy direction.
crate.bindings.typescript.src.dynamics.soft_body uses crate.dynamics.soft_body.soft_body_set.soft_body_set, so a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can break crate.bindings.typescript.src.dynamics.soft_body, while a change to crate.bindings.typescript.src.dynamics.soft_body can't break crate.dynamics.soft_body.soft_body_set.soft_body_set.
Position
Below the diagonal: crate.bindings.typescript.src.dynamics.soft_body uses a module listed above it, which is the healthy direction.
crate.bindings.typescript.src.dynamics.soft_body uses crate.bindings.bevy_rapier.src.dynamics.soft_body, so a change to crate.bindings.bevy_rapier.src.dynamics.soft_body can break crate.bindings.typescript.src.dynamics.soft_body, while a change to crate.bindings.typescript.src.dynamics.soft_body can't break crate.bindings.bevy_rapier.src.dynamics.soft_body.
Position
Below the diagonal: crate.bindings.typescript.src.dynamics.soft_body uses a module listed above it, which is the healthy direction.
crate.bindings.typescript.src.dynamics.soft_body uses crate.bindings.typescript.src.geometry.collider_set, so a change to crate.bindings.typescript.src.geometry.collider_set can break crate.bindings.typescript.src.dynamics.soft_body, while a change to crate.bindings.typescript.src.dynamics.soft_body can't break crate.bindings.typescript.src.geometry.collider_set.
Position
Below the diagonal: crate.bindings.typescript.src.dynamics.soft_body uses a module listed above it, which is the healthy direction.
26→28 crate.bindings.typescript.src.dynamics.soft_body uses crate.bindings.typescript.src.dynamics.rigid_body_setpart of a loop✕
Connections
1 pair of types, where a type in crate.bindings.typescript.src.dynamics.soft_body uses a type in crate.bindings.typescript.src.dynamics.rigid_body_set.
crate.bindings.typescript.src.dynamics.soft_body uses crate.bindings.typescript.src.dynamics.rigid_body_set, so a change to crate.bindings.typescript.src.dynamics.rigid_body_set can break crate.bindings.typescript.src.dynamics.soft_body, while a change to crate.bindings.typescript.src.dynamics.soft_body can't break crate.bindings.typescript.src.dynamics.rigid_body_set.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
crate.dynamics.soft_body.collision_mesh.collision_mesh uses crate.dynamics.soft_body.soft_body_handle, so a change to crate.dynamics.soft_body.soft_body_handle can break crate.dynamics.soft_body.collision_mesh.collision_mesh, while a change to crate.dynamics.soft_body.collision_mesh.collision_mesh can't break crate.dynamics.soft_body.soft_body_handle.
Position
Below the diagonal: crate.dynamics.soft_body.collision_mesh.collision_mesh uses a module listed above it, which is the healthy direction.
crate.dynamics.soft_body.collision_mesh.collision_mesh uses crate.geometry.collider_handle, so a change to crate.geometry.collider_handle can break crate.dynamics.soft_body.collision_mesh.collision_mesh, while a change to crate.dynamics.soft_body.collision_mesh.collision_mesh can't break crate.geometry.collider_handle.
Position
Below the diagonal: crate.dynamics.soft_body.collision_mesh.collision_mesh uses a module listed above it, which is the healthy direction.
crate.dynamics.soft_body.collision_mesh.collision_mesh uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.dynamics.soft_body.collision_mesh.collision_mesh, while a change to crate.dynamics.soft_body.collision_mesh.collision_mesh can't break crate.geometry.collider_set.
Position
Below the diagonal: crate.dynamics.soft_body.collision_mesh.collision_mesh uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.dynamics.soft_body.collision_mesh.collision_mesh uses a type in crate.bindings.bevy_rapier.src.dynamics.soft_body.
crate.dynamics.soft_body.collision_mesh.collision_mesh uses crate.bindings.bevy_rapier.src.dynamics.soft_body, so a change to crate.bindings.bevy_rapier.src.dynamics.soft_body can break crate.dynamics.soft_body.collision_mesh.collision_mesh, while a change to crate.dynamics.soft_body.collision_mesh.collision_mesh can't break crate.bindings.bevy_rapier.src.dynamics.soft_body.
Position
Below the diagonal: crate.dynamics.soft_body.collision_mesh.collision_mesh uses a module listed above it, which is the healthy direction.
crate.bindings.typescript.src.dynamics.rigid_body_set uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.bindings.typescript.src.dynamics.rigid_body_set, while a change to crate.bindings.typescript.src.dynamics.rigid_body_set can't break crate.dynamics.rigid_body_set.
Position
Below the diagonal: crate.bindings.typescript.src.dynamics.rigid_body_set uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.bindings.typescript.src.dynamics.rigid_body_set uses a type in crate.bindings.typescript.src.geometry.collider_set.
crate.bindings.typescript.src.dynamics.rigid_body_set uses crate.bindings.typescript.src.geometry.collider_set, so a change to crate.bindings.typescript.src.geometry.collider_set can break crate.bindings.typescript.src.dynamics.rigid_body_set, while a change to crate.bindings.typescript.src.dynamics.rigid_body_set can't break crate.bindings.typescript.src.geometry.collider_set.
Position
Below the diagonal: crate.bindings.typescript.src.dynamics.rigid_body_set uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.bindings.typescript.src.dynamics.rigid_body_set uses a type in crate.bindings.typescript.src.dynamics.soft_body.
crate.bindings.typescript.src.dynamics.rigid_body_set uses crate.bindings.typescript.src.dynamics.soft_body, so a change to crate.bindings.typescript.src.dynamics.soft_body can break crate.bindings.typescript.src.dynamics.rigid_body_set, while a change to crate.bindings.typescript.src.dynamics.rigid_body_set can't break crate.bindings.typescript.src.dynamics.soft_body.
Position
Below the diagonal: crate.bindings.typescript.src.dynamics.rigid_body_set uses a module listed above it, which is the healthy direction.
28→30 crate.bindings.typescript.src.dynamics.rigid_body_set uses crate.dynamics.rigid_body_componentspart of a loop✕
Connections
1 pair of types, where a type in crate.bindings.typescript.src.dynamics.rigid_body_set uses a type in crate.dynamics.rigid_body_components.
crate.bindings.typescript.src.dynamics.rigid_body_set uses crate.dynamics.rigid_body_components, so a change to crate.dynamics.rigid_body_components can break crate.bindings.typescript.src.dynamics.rigid_body_set, while a change to crate.bindings.typescript.src.dynamics.rigid_body_set can't break crate.dynamics.rigid_body_components.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
crate.bindings.typescript.src.pipeline.serialization_pipeline uses crate.dynamics.integration_parameters, so a change to crate.dynamics.integration_parameters can break crate.bindings.typescript.src.pipeline.serialization_pipeline, while a change to crate.bindings.typescript.src.pipeline.serialization_pipeline can't break crate.dynamics.integration_parameters.
Position
Below the diagonal: crate.bindings.typescript.src.pipeline.serialization_pipeline uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in crate.bindings.typescript.src.pipeline.serialization_pipeline uses a type in crate.dynamics.joint.multibody_joint.multibody_joint_set.
crate.bindings.typescript.src.pipeline.serialization_pipeline uses crate.dynamics.joint.multibody_joint.multibody_joint_set, so a change to crate.dynamics.joint.multibody_joint.multibody_joint_set can break crate.bindings.typescript.src.pipeline.serialization_pipeline, while a change to crate.bindings.typescript.src.pipeline.serialization_pipeline can't break crate.dynamics.joint.multibody_joint.multibody_joint_set.
Position
Below the diagonal: crate.bindings.typescript.src.pipeline.serialization_pipeline uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in crate.bindings.typescript.src.pipeline.serialization_pipeline uses a type in crate.dynamics.soft_body.soft_body_set.soft_body_set.
crate.bindings.typescript.src.pipeline.serialization_pipeline uses crate.dynamics.soft_body.soft_body_set.soft_body_set, so a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can break crate.bindings.typescript.src.pipeline.serialization_pipeline, while a change to crate.bindings.typescript.src.pipeline.serialization_pipeline can't break crate.dynamics.soft_body.soft_body_set.soft_body_set.
Position
Below the diagonal: crate.bindings.typescript.src.pipeline.serialization_pipeline uses a module listed above it, which is the healthy direction.
crate.bindings.typescript.src.pipeline.serialization_pipeline uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.bindings.typescript.src.pipeline.serialization_pipeline, while a change to crate.bindings.typescript.src.pipeline.serialization_pipeline can't break crate.dynamics.rigid_body_set.
Position
Below the diagonal: crate.bindings.typescript.src.pipeline.serialization_pipeline uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in crate.bindings.typescript.src.pipeline.serialization_pipeline uses a type in crate.dynamics.joint.impulse_joint.impulse_joint_set.
crate.bindings.typescript.src.pipeline.serialization_pipeline uses crate.dynamics.joint.impulse_joint.impulse_joint_set, so a change to crate.dynamics.joint.impulse_joint.impulse_joint_set can break crate.bindings.typescript.src.pipeline.serialization_pipeline, while a change to crate.bindings.typescript.src.pipeline.serialization_pipeline can't break crate.dynamics.joint.impulse_joint.impulse_joint_set.
Position
Below the diagonal: crate.bindings.typescript.src.pipeline.serialization_pipeline uses a module listed above it, which is the healthy direction.
crate.bindings.typescript.src.pipeline.serialization_pipeline uses crate.geometry.narrow_phase, so a change to crate.geometry.narrow_phase can break crate.bindings.typescript.src.pipeline.serialization_pipeline, while a change to crate.bindings.typescript.src.pipeline.serialization_pipeline can't break crate.geometry.narrow_phase.
Position
Below the diagonal: crate.bindings.typescript.src.pipeline.serialization_pipeline uses a module listed above it, which is the healthy direction.
crate.bindings.typescript.src.pipeline.serialization_pipeline uses crate.dynamics.island_manager.manager, so a change to crate.dynamics.island_manager.manager can break crate.bindings.typescript.src.pipeline.serialization_pipeline, while a change to crate.bindings.typescript.src.pipeline.serialization_pipeline can't break crate.dynamics.island_manager.manager.
Position
Below the diagonal: crate.bindings.typescript.src.pipeline.serialization_pipeline uses a module listed above it, which is the healthy direction.
crate.bindings.typescript.src.pipeline.serialization_pipeline uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.bindings.typescript.src.pipeline.serialization_pipeline, while a change to crate.bindings.typescript.src.pipeline.serialization_pipeline can't break crate.geometry.collider_set.
Position
Below the diagonal: crate.bindings.typescript.src.pipeline.serialization_pipeline uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in crate.bindings.typescript.src.pipeline.serialization_pipeline uses a type in crate.bindings.typescript.src.geometry.collider_set.
crate.bindings.typescript.src.pipeline.serialization_pipeline uses crate.bindings.typescript.src.geometry.collider_set, so a change to crate.bindings.typescript.src.geometry.collider_set can break crate.bindings.typescript.src.pipeline.serialization_pipeline, while a change to crate.bindings.typescript.src.pipeline.serialization_pipeline can't break crate.bindings.typescript.src.geometry.collider_set.
Position
Below the diagonal: crate.bindings.typescript.src.pipeline.serialization_pipeline uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in crate.bindings.typescript.src.pipeline.serialization_pipeline uses a type in crate.bindings.typescript.src.dynamics.soft_body.
crate.bindings.typescript.src.pipeline.serialization_pipeline uses crate.bindings.typescript.src.dynamics.soft_body, so a change to crate.bindings.typescript.src.dynamics.soft_body can break crate.bindings.typescript.src.pipeline.serialization_pipeline, while a change to crate.bindings.typescript.src.pipeline.serialization_pipeline can't break crate.bindings.typescript.src.dynamics.soft_body.
Position
Below the diagonal: crate.bindings.typescript.src.pipeline.serialization_pipeline uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in crate.bindings.typescript.src.pipeline.serialization_pipeline uses a type in crate.bindings.typescript.src.dynamics.rigid_body_set.
crate.bindings.typescript.src.pipeline.serialization_pipeline uses crate.bindings.typescript.src.dynamics.rigid_body_set, so a change to crate.bindings.typescript.src.dynamics.rigid_body_set can break crate.bindings.typescript.src.pipeline.serialization_pipeline, while a change to crate.bindings.typescript.src.pipeline.serialization_pipeline can't break crate.bindings.typescript.src.dynamics.rigid_body_set.
Position
Below the diagonal: crate.bindings.typescript.src.pipeline.serialization_pipeline uses a module listed above it, which is the healthy direction.
crate.dynamics.rigid_body_components uses crate.geometry.collider_handle, so a change to crate.geometry.collider_handle can break crate.dynamics.rigid_body_components, while a change to crate.dynamics.rigid_body_components can't break crate.geometry.collider_handle.
Position
Below the diagonal: crate.dynamics.rigid_body_components uses a module listed above it, which is the healthy direction.
crate.dynamics.rigid_body_components uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.dynamics.rigid_body_components, while a change to crate.dynamics.rigid_body_components can't break crate.geometry.collider_set.
Position
Below the diagonal: crate.dynamics.rigid_body_components uses a module listed above it, which is the healthy direction.
crate.dynamics.rigid_body_components uses crate.bindings.typescript.src.dynamics.rigid_body_set, so a change to crate.bindings.typescript.src.dynamics.rigid_body_set can break crate.dynamics.rigid_body_components, while a change to crate.dynamics.rigid_body_components can't break crate.bindings.typescript.src.dynamics.rigid_body_set.
Position
Below the diagonal: crate.dynamics.rigid_body_components uses a module listed above it, which is the healthy direction.
30→31 crate.dynamics.rigid_body_components uses crate.bindings.bevy_rapier.src.dynamics.rigid_bodypart of a loop✕
Connections
3 pairs of types, where a type in crate.dynamics.rigid_body_components uses a type in crate.bindings.bevy_rapier.src.dynamics.rigid_body.
crate.dynamics.rigid_body_components uses crate.bindings.bevy_rapier.src.dynamics.rigid_body, so a change to crate.bindings.bevy_rapier.src.dynamics.rigid_body can break crate.dynamics.rigid_body_components, while a change to crate.dynamics.rigid_body_components can't break crate.bindings.bevy_rapier.src.dynamics.rigid_body.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
crate.bindings.bevy_rapier.src.dynamics.rigid_body uses crate.dynamics.rigid_body_handle, so a change to crate.dynamics.rigid_body_handle can break crate.bindings.bevy_rapier.src.dynamics.rigid_body, while a change to crate.bindings.bevy_rapier.src.dynamics.rigid_body can't break crate.dynamics.rigid_body_handle.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.dynamics.rigid_body uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.dynamics.rigid_body uses crate.dynamics.rigid_body_components, so a change to crate.dynamics.rigid_body_components can break crate.bindings.bevy_rapier.src.dynamics.rigid_body, while a change to crate.bindings.bevy_rapier.src.dynamics.rigid_body can't break crate.dynamics.rigid_body_components.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.dynamics.rigid_body uses a module listed above it, which is the healthy direction.
crate.dynamics.joint.generic_joint uses crate.dynamics.integration_parameters, so a change to crate.dynamics.integration_parameters can break crate.dynamics.joint.generic_joint, while a change to crate.dynamics.joint.generic_joint can't break crate.dynamics.integration_parameters.
Position
Below the diagonal: crate.dynamics.joint.generic_joint uses a module listed above it, which is the healthy direction.
crate.dynamics.joint.generic_joint uses crate.dynamics.joint.motor_model, so a change to crate.dynamics.joint.motor_model can break crate.dynamics.joint.generic_joint, while a change to crate.dynamics.joint.generic_joint can't break crate.dynamics.joint.motor_model.
Position
Below the diagonal: crate.dynamics.joint.generic_joint uses a module listed above it, which is the healthy direction.
crate.dynamics.joint.generic_joint uses crate.bindings.bevy_rapier.src.dynamics.rigid_body, so a change to crate.bindings.bevy_rapier.src.dynamics.rigid_body can break crate.dynamics.joint.generic_joint, while a change to crate.dynamics.joint.generic_joint can't break crate.bindings.bevy_rapier.src.dynamics.rigid_body.
Position
Below the diagonal: crate.dynamics.joint.generic_joint uses a module listed above it, which is the healthy direction.
32→34 crate.dynamics.joint.generic_joint uses crate.bindings.bevy_rapier.src.dynamics.generic_jointpart of a loop✕
Connections
3 pairs of types, where a type in crate.dynamics.joint.generic_joint uses a type in crate.bindings.bevy_rapier.src.dynamics.generic_joint.
crate.dynamics.joint.generic_joint uses crate.bindings.bevy_rapier.src.dynamics.generic_joint, so a change to crate.bindings.bevy_rapier.src.dynamics.generic_joint can break crate.dynamics.joint.generic_joint, while a change to crate.dynamics.joint.generic_joint can't break crate.bindings.bevy_rapier.src.dynamics.generic_joint.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
crate.dynamics.solver.solver_body uses crate.bindings.bevy_rapier.src.dynamics.rigid_body, so a change to crate.bindings.bevy_rapier.src.dynamics.rigid_body can break crate.dynamics.solver.solver_body, while a change to crate.dynamics.solver.solver_body can't break crate.bindings.bevy_rapier.src.dynamics.rigid_body.
Position
Below the diagonal: crate.dynamics.solver.solver_body uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.dynamics.generic_joint uses crate.dynamics.integration_parameters, so a change to crate.dynamics.integration_parameters can break crate.bindings.bevy_rapier.src.dynamics.generic_joint, while a change to crate.bindings.bevy_rapier.src.dynamics.generic_joint can't break crate.dynamics.integration_parameters.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.dynamics.generic_joint uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.dynamics.generic_joint uses crate.dynamics.joint.motor_model, so a change to crate.dynamics.joint.motor_model can break crate.bindings.bevy_rapier.src.dynamics.generic_joint, while a change to crate.bindings.bevy_rapier.src.dynamics.generic_joint can't break crate.dynamics.joint.motor_model.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.dynamics.generic_joint uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.dynamics.generic_joint uses crate.dynamics.joint.generic_joint, so a change to crate.dynamics.joint.generic_joint can break crate.bindings.bevy_rapier.src.dynamics.generic_joint, while a change to crate.bindings.bevy_rapier.src.dynamics.generic_joint can't break crate.dynamics.joint.generic_joint.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.dynamics.generic_joint uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a type in crate.dynamics.integration_parameters.
crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses crate.dynamics.integration_parameters, so a change to crate.dynamics.integration_parameters can break crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set, while a change to crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set can't break crate.dynamics.integration_parameters.
Position
Below the diagonal: crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a type in crate.dynamics.soft_body.soft_body_handle.
crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses crate.dynamics.soft_body.soft_body_handle, so a change to crate.dynamics.soft_body.soft_body_handle can break crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set, while a change to crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set can't break crate.dynamics.soft_body.soft_body_handle.
Position
Below the diagonal: crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a type in crate.geometry.collider_handle.
crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses crate.geometry.collider_handle, so a change to crate.geometry.collider_handle can break crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set, while a change to crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set can't break crate.geometry.collider_handle.
Position
Below the diagonal: crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a type in crate.dynamics.soft_body.soft_body_set.soft_body_set.
crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses crate.dynamics.soft_body.soft_body_set.soft_body_set, so a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can break crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set, while a change to crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set can't break crate.dynamics.soft_body.soft_body_set.soft_body_set.
Position
Below the diagonal: crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a type in crate.dynamics.rigid_body_set.
crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set, while a change to crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set can't break crate.dynamics.rigid_body_set.
Position
Below the diagonal: crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a type in crate.geometry.narrow_phase.soft_contacts.soft_contacts_types.
crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses crate.geometry.narrow_phase.soft_contacts.soft_contacts_types, so a change to crate.geometry.narrow_phase.soft_contacts.soft_contacts_types can break crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set, while a change to crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set can't break crate.geometry.narrow_phase.soft_contacts.soft_contacts_types.
Position
Below the diagonal: crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a type in crate.geometry.narrow_phase.
crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses crate.geometry.narrow_phase, so a change to crate.geometry.narrow_phase can break crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set, while a change to crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set can't break crate.geometry.narrow_phase.
Position
Below the diagonal: crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a type in crate.geometry.collider_set.
crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set, while a change to crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set can't break crate.geometry.collider_set.
Position
Below the diagonal: crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a type in crate.bindings.bevy_rapier.src.dynamics.soft_body.
crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses crate.bindings.bevy_rapier.src.dynamics.soft_body, so a change to crate.bindings.bevy_rapier.src.dynamics.soft_body can break crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set, while a change to crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set can't break crate.bindings.bevy_rapier.src.dynamics.soft_body.
Position
Below the diagonal: crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a type in crate.dynamics.soft_body.collision_mesh.collision_mesh.
crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses crate.dynamics.soft_body.collision_mesh.collision_mesh, so a change to crate.dynamics.soft_body.collision_mesh.collision_mesh can break crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set, while a change to crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set can't break crate.dynamics.soft_body.collision_mesh.collision_mesh.
Position
Below the diagonal: crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a type in crate.dynamics.solver.solver_body.
crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses crate.dynamics.solver.solver_body, so a change to crate.dynamics.solver.solver_body can break crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set, while a change to crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set can't break crate.dynamics.solver.solver_body.
Position
Below the diagonal: crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set uses a module listed above it, which is the healthy direction.
crate.dynamics.solver.staged_island_solver uses crate.dynamics.integration_parameters, so a change to crate.dynamics.integration_parameters can break crate.dynamics.solver.staged_island_solver, while a change to crate.dynamics.solver.staged_island_solver can't break crate.dynamics.integration_parameters.
Position
Below the diagonal: crate.dynamics.solver.staged_island_solver uses a module listed above it, which is the healthy direction.
crate.dynamics.solver.staged_island_solver uses crate.dynamics.joint.multibody_joint.multibody_joint_set, so a change to crate.dynamics.joint.multibody_joint.multibody_joint_set can break crate.dynamics.solver.staged_island_solver, while a change to crate.dynamics.solver.staged_island_solver can't break crate.dynamics.joint.multibody_joint.multibody_joint_set.
Position
Below the diagonal: crate.dynamics.solver.staged_island_solver uses a module listed above it, which is the healthy direction.
crate.dynamics.solver.staged_island_solver uses crate.dynamics.soft_body.soft_body_set.soft_body_set, so a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can break crate.dynamics.solver.staged_island_solver, while a change to crate.dynamics.solver.staged_island_solver can't break crate.dynamics.soft_body.soft_body_set.soft_body_set.
Position
Below the diagonal: crate.dynamics.solver.staged_island_solver uses a module listed above it, which is the healthy direction.
crate.dynamics.solver.staged_island_solver uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.dynamics.solver.staged_island_solver, while a change to crate.dynamics.solver.staged_island_solver can't break crate.dynamics.rigid_body_set.
Position
Below the diagonal: crate.dynamics.solver.staged_island_solver uses a module listed above it, which is the healthy direction.
crate.dynamics.solver.staged_island_solver uses crate.geometry.narrow_phase, so a change to crate.geometry.narrow_phase can break crate.dynamics.solver.staged_island_solver, while a change to crate.dynamics.solver.staged_island_solver can't break crate.geometry.narrow_phase.
Position
Below the diagonal: crate.dynamics.solver.staged_island_solver uses a module listed above it, which is the healthy direction.
crate.dynamics.solver.staged_island_solver uses crate.dynamics.island_manager.manager, so a change to crate.dynamics.island_manager.manager can break crate.dynamics.solver.staged_island_solver, while a change to crate.dynamics.solver.staged_island_solver can't break crate.dynamics.island_manager.manager.
Position
Below the diagonal: crate.dynamics.solver.staged_island_solver uses a module listed above it, which is the healthy direction.
crate.dynamics.solver.staged_island_solver uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.dynamics.solver.staged_island_solver, while a change to crate.dynamics.solver.staged_island_solver can't break crate.geometry.collider_set.
Position
Below the diagonal: crate.dynamics.solver.staged_island_solver uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.dynamics.solver.staged_island_solver uses a type in crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set.
crate.dynamics.solver.staged_island_solver uses crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set, so a change to crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set can break crate.dynamics.solver.staged_island_solver, while a change to crate.dynamics.solver.staged_island_solver can't break crate.dynamics.solver.soft_constraint.soft_constraints_set.soft_constraints_set.
Position
Below the diagonal: crate.dynamics.solver.staged_island_solver uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_pipeline uses crate.dynamics.integration_parameters, so a change to crate.dynamics.integration_parameters can break crate.pipeline.physics_pipeline, while a change to crate.pipeline.physics_pipeline can't break crate.dynamics.integration_parameters.
Position
Below the diagonal: crate.pipeline.physics_pipeline uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_pipeline uses crate.dynamics.rigid_body_handle, so a change to crate.dynamics.rigid_body_handle can break crate.pipeline.physics_pipeline, while a change to crate.pipeline.physics_pipeline can't break crate.dynamics.rigid_body_handle.
Position
Below the diagonal: crate.pipeline.physics_pipeline uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_pipeline uses crate.geometry.collider_handle, so a change to crate.geometry.collider_handle can break crate.pipeline.physics_pipeline, while a change to crate.pipeline.physics_pipeline can't break crate.geometry.collider_handle.
Position
Below the diagonal: crate.pipeline.physics_pipeline uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_pipeline uses crate.dynamics.joint.multibody_joint.multibody_joint_set, so a change to crate.dynamics.joint.multibody_joint.multibody_joint_set can break crate.pipeline.physics_pipeline, while a change to crate.pipeline.physics_pipeline can't break crate.dynamics.joint.multibody_joint.multibody_joint_set.
Position
Below the diagonal: crate.pipeline.physics_pipeline uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_pipeline uses crate.dynamics.soft_body.soft_body_set.soft_body_set, so a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can break crate.pipeline.physics_pipeline, while a change to crate.pipeline.physics_pipeline can't break crate.dynamics.soft_body.soft_body_set.soft_body_set.
Position
Below the diagonal: crate.pipeline.physics_pipeline uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_pipeline uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.pipeline.physics_pipeline, while a change to crate.pipeline.physics_pipeline can't break crate.dynamics.rigid_body_set.
Position
Below the diagonal: crate.pipeline.physics_pipeline uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_pipeline uses crate.dynamics.joint.impulse_joint.impulse_joint_set, so a change to crate.dynamics.joint.impulse_joint.impulse_joint_set can break crate.pipeline.physics_pipeline, while a change to crate.pipeline.physics_pipeline can't break crate.dynamics.joint.impulse_joint.impulse_joint_set.
Position
Below the diagonal: crate.pipeline.physics_pipeline uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_pipeline uses crate.geometry.narrow_phase, so a change to crate.geometry.narrow_phase can break crate.pipeline.physics_pipeline, while a change to crate.pipeline.physics_pipeline can't break crate.geometry.narrow_phase.
Position
Below the diagonal: crate.pipeline.physics_pipeline uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_pipeline uses crate.dynamics.island_manager.manager, so a change to crate.dynamics.island_manager.manager can break crate.pipeline.physics_pipeline, while a change to crate.pipeline.physics_pipeline can't break crate.dynamics.island_manager.manager.
Position
Below the diagonal: crate.pipeline.physics_pipeline uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_pipeline uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.pipeline.physics_pipeline, while a change to crate.pipeline.physics_pipeline can't break crate.geometry.collider_set.
Position
Below the diagonal: crate.pipeline.physics_pipeline uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_pipeline uses crate.geometry.broad_phase_bvh, so a change to crate.geometry.broad_phase_bvh can break crate.pipeline.physics_pipeline, while a change to crate.pipeline.physics_pipeline can't break crate.geometry.broad_phase_bvh.
Position
Below the diagonal: crate.pipeline.physics_pipeline uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_pipeline uses crate.dynamics.solver.staged_island_solver, so a change to crate.dynamics.solver.staged_island_solver can break crate.pipeline.physics_pipeline, while a change to crate.pipeline.physics_pipeline can't break crate.dynamics.solver.staged_island_solver.
Position
Below the diagonal: crate.pipeline.physics_pipeline uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.plugin.context uses crate.dynamics.integration_parameters, so a change to crate.dynamics.integration_parameters can break crate.bindings.bevy_rapier.src.plugin.context, while a change to crate.bindings.bevy_rapier.src.plugin.context can't break crate.dynamics.integration_parameters.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.plugin.context uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.plugin.context uses crate.dynamics.rigid_body_handle, so a change to crate.dynamics.rigid_body_handle can break crate.bindings.bevy_rapier.src.plugin.context, while a change to crate.bindings.bevy_rapier.src.plugin.context can't break crate.dynamics.rigid_body_handle.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.plugin.context uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.plugin.context uses crate.dynamics.soft_body.soft_body_handle, so a change to crate.dynamics.soft_body.soft_body_handle can break crate.bindings.bevy_rapier.src.plugin.context, while a change to crate.bindings.bevy_rapier.src.plugin.context can't break crate.dynamics.soft_body.soft_body_handle.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.plugin.context uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.plugin.context uses crate.geometry.collider_handle, so a change to crate.geometry.collider_handle can break crate.bindings.bevy_rapier.src.plugin.context, while a change to crate.bindings.bevy_rapier.src.plugin.context can't break crate.geometry.collider_handle.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.plugin.context uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.plugin.context uses crate.bindings.bevy_rapier.src.dynamics.joint, so a change to crate.bindings.bevy_rapier.src.dynamics.joint can break crate.bindings.bevy_rapier.src.plugin.context, while a change to crate.bindings.bevy_rapier.src.plugin.context can't break crate.bindings.bevy_rapier.src.dynamics.joint.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.plugin.context uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.plugin.context uses crate.bindings.bevy_rapier.src.geometry.collider, so a change to crate.bindings.bevy_rapier.src.geometry.collider can break crate.bindings.bevy_rapier.src.plugin.context, while a change to crate.bindings.bevy_rapier.src.plugin.context can't break crate.bindings.bevy_rapier.src.geometry.collider.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.plugin.context uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in crate.bindings.bevy_rapier.src.plugin.context uses a type in crate.dynamics.joint.multibody_joint.multibody_joint_set.
crate.bindings.bevy_rapier.src.plugin.context uses crate.dynamics.joint.multibody_joint.multibody_joint_set, so a change to crate.dynamics.joint.multibody_joint.multibody_joint_set can break crate.bindings.bevy_rapier.src.plugin.context, while a change to crate.bindings.bevy_rapier.src.plugin.context can't break crate.dynamics.joint.multibody_joint.multibody_joint_set.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.plugin.context uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.plugin.context uses crate.dynamics.soft_body.soft_body_set.soft_body_set, so a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can break crate.bindings.bevy_rapier.src.plugin.context, while a change to crate.bindings.bevy_rapier.src.plugin.context can't break crate.dynamics.soft_body.soft_body_set.soft_body_set.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.plugin.context uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.plugin.context uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.bindings.bevy_rapier.src.plugin.context, while a change to crate.bindings.bevy_rapier.src.plugin.context can't break crate.dynamics.rigid_body_set.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.plugin.context uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.plugin.context uses crate.dynamics.joint.impulse_joint.impulse_joint_set, so a change to crate.dynamics.joint.impulse_joint.impulse_joint_set can break crate.bindings.bevy_rapier.src.plugin.context, while a change to crate.bindings.bevy_rapier.src.plugin.context can't break crate.dynamics.joint.impulse_joint.impulse_joint_set.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.plugin.context uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.plugin.context uses crate.geometry.narrow_phase, so a change to crate.geometry.narrow_phase can break crate.bindings.bevy_rapier.src.plugin.context, while a change to crate.bindings.bevy_rapier.src.plugin.context can't break crate.geometry.narrow_phase.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.plugin.context uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.plugin.context uses crate.dynamics.island_manager.manager, so a change to crate.dynamics.island_manager.manager can break crate.bindings.bevy_rapier.src.plugin.context, while a change to crate.bindings.bevy_rapier.src.plugin.context can't break crate.dynamics.island_manager.manager.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.plugin.context uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.plugin.context uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.bindings.bevy_rapier.src.plugin.context, while a change to crate.bindings.bevy_rapier.src.plugin.context can't break crate.geometry.collider_set.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.plugin.context uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.plugin.context uses crate.bindings.bevy_rapier.src.dynamics.rigid_body, so a change to crate.bindings.bevy_rapier.src.dynamics.rigid_body can break crate.bindings.bevy_rapier.src.plugin.context, while a change to crate.bindings.bevy_rapier.src.plugin.context can't break crate.bindings.bevy_rapier.src.dynamics.rigid_body.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.plugin.context uses a module listed above it, which is the healthy direction.
crate.bindings.bevy_rapier.src.plugin.context uses crate.pipeline.physics_pipeline, so a change to crate.pipeline.physics_pipeline can break crate.bindings.bevy_rapier.src.plugin.context, while a change to crate.bindings.bevy_rapier.src.plugin.context can't break crate.pipeline.physics_pipeline.
Position
Below the diagonal: crate.bindings.bevy_rapier.src.plugin.context uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.dynamics.integration_parameters, so a change to crate.dynamics.integration_parameters can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.dynamics.integration_parameters.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.dynamics.rigid_body_handle, so a change to crate.dynamics.rigid_body_handle can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.dynamics.rigid_body_handle.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.dynamics.soft_body.soft_body_handle, so a change to crate.dynamics.soft_body.soft_body_handle can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.dynamics.soft_body.soft_body_handle.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.geometry.collider_handle, so a change to crate.geometry.collider_handle can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.geometry.collider_handle.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.bindings.bevy_rapier.src.geometry.collider, so a change to crate.bindings.bevy_rapier.src.geometry.collider can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.bindings.bevy_rapier.src.geometry.collider.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.dynamics.joint.multibody_joint.multibody_joint_set, so a change to crate.dynamics.joint.multibody_joint.multibody_joint_set can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.dynamics.joint.multibody_joint.multibody_joint_set.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.dynamics.soft_body.soft_body_set.soft_body_set, so a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.dynamics.soft_body.soft_body_set.soft_body_set.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.dynamics.rigid_body_set.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.dynamics.joint.impulse_joint.impulse_joint_set, so a change to crate.dynamics.joint.impulse_joint.impulse_joint_set can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.dynamics.joint.impulse_joint.impulse_joint_set.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.geometry.contact_pair, so a change to crate.geometry.contact_pair can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.geometry.contact_pair.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.geometry.narrow_phase, so a change to crate.geometry.narrow_phase can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.geometry.narrow_phase.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.dynamics.island_manager.manager, so a change to crate.dynamics.island_manager.manager can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.dynamics.island_manager.manager.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.geometry.collider_set.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.bindings.bevy_rapier.src.dynamics.soft_body, so a change to crate.bindings.bevy_rapier.src.dynamics.soft_body can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.bindings.bevy_rapier.src.dynamics.soft_body.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.geometry.broad_phase_bvh, so a change to crate.geometry.broad_phase_bvh can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.geometry.broad_phase_bvh.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.bindings.bevy_rapier.src.dynamics.rigid_body, so a change to crate.bindings.bevy_rapier.src.dynamics.rigid_body can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.bindings.bevy_rapier.src.dynamics.rigid_body.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.bindings.bevy_rapier.src.dynamics.generic_joint, so a change to crate.bindings.bevy_rapier.src.dynamics.generic_joint can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.bindings.bevy_rapier.src.dynamics.generic_joint.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.pipeline.physics_world uses crate.pipeline.physics_pipeline, so a change to crate.pipeline.physics_pipeline can break crate.pipeline.physics_world, while a change to crate.pipeline.physics_world can't break crate.pipeline.physics_pipeline.
Position
Below the diagonal: crate.pipeline.physics_world uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.dynamics.integration_parameters, so a change to crate.dynamics.integration_parameters can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.dynamics.integration_parameters.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.bindings.bevy_rapier.src.geometry.collider, so a change to crate.bindings.bevy_rapier.src.geometry.collider can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.bindings.bevy_rapier.src.geometry.collider.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.bindings.c.src.types, so a change to crate.bindings.c.src.types can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.bindings.c.src.types.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.dynamics.joint.multibody_joint.multibody_joint_set, so a change to crate.dynamics.joint.multibody_joint.multibody_joint_set can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.dynamics.joint.multibody_joint.multibody_joint_set.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.dynamics.soft_body.soft_body_set.soft_body_set, so a change to crate.dynamics.soft_body.soft_body_set.soft_body_set can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.dynamics.soft_body.soft_body_set.soft_body_set.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.dynamics.rigid_body_set, so a change to crate.dynamics.rigid_body_set can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.dynamics.rigid_body_set.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.dynamics.joint.impulse_joint.impulse_joint_set, so a change to crate.dynamics.joint.impulse_joint.impulse_joint_set can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.dynamics.joint.impulse_joint.impulse_joint_set.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.geometry.narrow_phase, so a change to crate.geometry.narrow_phase can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.geometry.narrow_phase.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.dynamics.island_manager.manager, so a change to crate.dynamics.island_manager.manager can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.dynamics.island_manager.manager.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.geometry.collider_set, so a change to crate.geometry.collider_set can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.geometry.collider_set.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.bindings.bevy_rapier.src.dynamics.soft_body, so a change to crate.bindings.bevy_rapier.src.dynamics.soft_body can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.bindings.bevy_rapier.src.dynamics.soft_body.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.geometry.broad_phase_bvh, so a change to crate.geometry.broad_phase_bvh can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.geometry.broad_phase_bvh.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.bindings.bevy_rapier.src.dynamics.rigid_body, so a change to crate.bindings.bevy_rapier.src.dynamics.rigid_body can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.bindings.bevy_rapier.src.dynamics.rigid_body.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.bindings.bevy_rapier.src.dynamics.generic_joint, so a change to crate.bindings.bevy_rapier.src.dynamics.generic_joint can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.bindings.bevy_rapier.src.dynamics.generic_joint.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.pipeline.physics_pipeline, so a change to crate.pipeline.physics_pipeline can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.pipeline.physics_pipeline.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
crate.bindings.c.src.objects uses crate.pipeline.physics_world, so a change to crate.pipeline.physics_world can break crate.bindings.c.src.objects, while a change to crate.bindings.c.src.objects can't break crate.pipeline.physics_world.
Position
Below the diagonal: crate.bindings.c.src.objects uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 48% · Weak · gated by R10, R3, X5 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
97
High / Critical
A03:2025 — Software Supply Chain Failures
10
High / Critical
Roadmap
Top priorities: Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml; Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them; Reconcile the README with reality: crates/rapier3d-meshloader/README.md links to `CODE_OF_CONDUCT.md`, but `crates/rapier3d-meshloader/CODE_OF_CONDUCT.md` does not exist; crates/rapier3d-meshloader/README.md links to `CONTRIBUTING.md`, but `crates/rapier3d-meshloader/CONTRIBUTING.md` does not exist; crates/rapier3d-urdf/README.md links to `CODE_OF_CONDUCT.md`, but `crates/rapier3d-urdf/CODE_OF_CONDUCT.md` does not exist; crates/rapier3d-urdf/README.md links to `CONTRIBUTING.md`, but `crates/rapier3d-urdf/CONTRIBUTING.md` does not exist.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml.
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Reconcile the README with reality: crates/rapier3d-meshloader/README.md links to `CODE_OF_CONDUCT.md`, but `crates/rapier3d-meshloader/CODE_OF_CONDUCT.md` does not exist; crates/rapier3d-meshloader/README.md links to `CONTRIBUTING.md`, but `crates/rapier3d-meshloader/CONTRIBUTING.md` does not exist; crates/rapier3d-urdf/README.md links to `CODE_OF_CONDUCT.md`, but `crates/rapier3d-urdf/CODE_OF_CONDUCT.md` does not exist; crates/rapier3d-urdf/README.md links to `CONTRIBUTING.md`, but `crates/rapier3d-urdf/CONTRIBUTING.md` does not exist.
Put every file in a nullable-enabled context — `#nullable enable` at its top, or commit a project file with <Nullable>enable</Nullable> — and resolve warnings rather than suppressing with `!`.
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 96
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 1700
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 56
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 13
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 53 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 53 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1837 of 1852 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 6 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 260 test source file(s) (.rs, .py) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability not scored — the JavaScript/TypeScript suite (jest via `npm ci --ignore-scripts` in bindings/typescript/rapier-compat/ (0 tests)) ran but surfaced no test cases to the runner, so flakiness couldn't be exercised.
D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 52 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, and no committed Cargo.lock resolves them to versions, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (start). the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 10 further occurrence(s) are not listed individually; the score already reflects all 50.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's C# was parsed (it ships no .sln or .csproj, so it was read as syntax-only projects), but this check proves its findings from resolved symbols and a reference-free parse resolves none. It abstained rather than report a clean bill it could not earn. That is a gap in this analyzer's reach into build-less repositories — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations: 15 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
108 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was crate::dynamics::solver::staged_island_solver::worker::run_worker at 110. A further 22 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being RprShapeMesh::append at 29 — they are counted neither in the figure above nor in this dimension's score. 10 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: bindings/c/src/render.rs (RprShapeMesh::append at 29), bindings/python/rapier-py-3d/src/soft_body.rs (SoftBodyBuilder::apply_kwarg at 29), bindings/typescript/src.ts/geometry/shape.ts (Shape.fromRawShape at 26), bindings/python/rapier-py-3d/src/dynamics.rs (RigidBodyBuilder::apply_kwarg at 25), bindings/bevy_rapier/src/geometry/to_bevy_mesh.rs (crate::bindings::bevy_rapier::src::geometry::to_bevy_mesh::typed_shape_to_mesh at 24), and 5 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 35 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 4 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with crate::dynamics::solver::staged_island_solver::worker::run_worker (cyclomatic 110), crate::geometry::narrow_phase::pair_update::process_pair (cyclomatic 100), SoftConstraintsSet::assemble_body_contacts (cyclomatic 97). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 4 together lifts Cyclomatic Complexity from 5.9 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
255 method(s) exceeded the cognitive complexity threshold of 15; the worst was crate::dynamics::solver::staged_island_solver::worker::run_worker at 373.
+ 65 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 240 down to 240 or less in Cognitive Complexity — start with crate::dynamics::solver::staged_island_solver::worker::run_worker (cognitive 373), SoftConstraintsSet::assemble_body_contacts (cognitive 369). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cognitive Complexity from 4.6 to about 5.1/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes6.9 / 10Adequate✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 61 FileTooLong finding(s) in God Classes — start with soft_body.rs (4), geometry.rs (2), pipeline.rs (2). — One of this dimension's main actionable groups (61 warning-level).
Resolve the 58 TooManyMethods finding(s) in God Classes — start with soft_body.rs (10), collider.rs (3), dynamics.rs (3). — One of this dimension's main actionable groups (58 warning-level).
Resolve the 57 MethodTooLong finding(s) in God Classes — start with soft_element_constraint_assembly.rs (2), joints.rs (2), soft_body_set_split.rs (2). — One of this dimension's main actionable groups (57 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
564 duplicated block group(s) detected. 10.6 % of the production lines (24,245 of 229,527) are in a reported copy. A further 317 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 42 of the 881 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 307 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 52 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with dynamics.rs (7), scoped_access.rs (4), soft_body.rs (4). — One of this dimension's main actionable groups (52 warning-level).
Resolve the 32 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with extra.rs (2), dynamics.rs (2), debug_render_pipeline.rs (2). — One of this dimension's main actionable groups (32 warning-level).
Resolve the 31 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with soft_body.rs (2), collider_view.rs (2), collider.rs. — One of this dimension's main actionable groups (31 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.5 / 10Stronggated by 2 serious findings✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
32 production modules (Cargo+npm+Python+CMake), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 2 module(s) off the main sequence, with abstractness counted on 14 of the 32 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: mjcf-rs · ×2
What to do
Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with soft_body.rs, solver_body.rs, generic_joint.rs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 6 tests. Measured on the JavaScript/TypeScript suite only — at least 260 test source file(s) (.rs, .py) went unread, so its test quality is unmeasured and is not in these counts.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 806 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository commits no Cargo.lock, so its graph was resolved here: its manifests' `[dependencies]` and `[build-dependencies]` closed over the crates.io index, each crate at the newest release its requirement admits (what a fresh `cargo generate-lockfile` picks, not a graph the repository has pinned). Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: src/geometry/narrow_phase/pair_update.rs (4×100=400); src/dynamics/solver/staged_island_solver/worker.rs (2×110=220); src/dynamics/solver/contact_constraint/generic_contact_constraint.rs (7×31=217) Repeated repair below the complexity floor: src/control/character_controller.rs (5 of 7 changes were fixes); src/dynamics/solver/joint_constraint/joint_constraint_builder.rs (4 of 7 changes were fixes); src/dynamics/joint/generic_joint.rs (4 of 6 changes were fixes)
Resolve the 12 Hotspot finding(s) in Churn × Complexity Hotspots — start with pair_update.rs, worker.rs, generic_contact_constraint.rs. — One of this dimension's main actionable groups (12 warning-level).
Resolve the 3 Repeated repair finding(s) in Churn × Complexity Hotspots — start with character_controller.rs, joint_constraint_builder.rs, generic_joint.rs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor8.7 / 10Strong✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
74 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is bindings/python/rapier-py-3d/src/geometry.rs. Counted over 556 of the 841 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
What to do
Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
131 deducted task-comment markers across 229527 LoC (0.1/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
TodoComment · ×117src/lib.rs:17
FixmeComment · ×14src/pipeline/user_changes.rs:51
What to do
Resolve the 117 TodoComment finding(s) in Explicit Debt — start with multibody.rs (14), rigid_body.rs (8), ray_cast_vehicle_controller.rs (8). — One of this dimension's main actionable groups (117 warning-level).
Resolve the 14 FixmeComment finding(s) in Explicit Debt — start with to_bevy_mesh.rs (4), user_changes.rs (2), multibody_link.rs (2). — One of this dimension's main actionable groups (14 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
2 of 2 documentation facets pass in full. 30 document(s) read across 5 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
2 naming inconsistencies among 33 declarations measured against a convention their peers follow.
`RawCCDSolver` spells `CCD` where 12 names in the project spell it `Ccd`bindings/typescript/src/dynamics/ccd_solver.rs:5
`rawCCDSolver` spells `CCD` where 19 names in the project spell it `Ccd`bindings/typescript/src.ts/pipeline/world.ts:152
What to do
Resolve the 1 `RawCCDSolver` spells `CCD` where 12 names in the project spell it `Ccd` finding(s) in Naming Consistency — start with ccd_solver.rs. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `rawCCDSolver` spells `CCD` where 19 names in the project spell it `Ccd` finding(s) in Naming Consistency — start with world.ts. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
97 finding(s): 0 critical, 94 high, 3 medium, 0 low. 92 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 10 file(s) — `bindings/bevy_rapier/src/plugin/context/mod.rs` (line 911, line 1050, line 1086, …), `bindings/c/include/rapier.h`, `bindings/c/testbed/grab.c`, `bindings/c/testbed/graphics.c` (line 12, line 21, line 56, …), `bindings/c/testbed/gui.c`, … (+5 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 4 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 92 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (92 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
3 of 556 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/dynamics/joint/pin_slot_joint.rs. Counted over 556 of the 841 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 5 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 3 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
crates/rapier3d-meshloader/README.md links to `CODE_OF_CONDUCT.md`, but `crates/rapier3d-meshloader/CODE_OF_CONDUCT.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — crates/rapier3d-meshloader/README.md:20
crates/rapier3d-meshloader/README.md links to `CONTRIBUTING.md`, but `crates/rapier3d-meshloader/CONTRIBUTING.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — crates/rapier3d-meshloader/README.md:21
crates/rapier3d-urdf/README.md links to `CODE_OF_CONDUCT.md`, but `crates/rapier3d-urdf/CODE_OF_CONDUCT.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — crates/rapier3d-urdf/README.md:37
crates/rapier3d-urdf/README.md links to `CONTRIBUTING.md`, but `crates/rapier3d-urdf/CONTRIBUTING.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — crates/rapier3d-urdf/README.md:38
What to do
Reconcile the README with reality: crates/rapier3d-meshloader/README.md links to `CODE_OF_CONDUCT.md`, but `crates/rapier3d-meshloader/CODE_OF_CONDUCT.md` does not exist; crates/rapier3d-meshloader/README.md links to `CONTRIBUTING.md`, but `crates/rapier3d-meshloader/CONTRIBUTING.md` does not exist; crates/rapier3d-urdf/README.md links to `CODE_OF_CONDUCT.md`, but `crates/rapier3d-urdf/CODE_OF_CONDUCT.md` does not exist; crates/rapier3d-urdf/README.md links to `CONTRIBUTING.md`, but `crates/rapier3d-urdf/CONTRIBUTING.md` does not exist.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability5.2 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 5/12 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `bindings/bevy_rapier/bevy_rapier_benches3d`, `bindings/python/rapier-testbed`, `bindings/typescript/builds/prepare_builds`, `examples2d` and 2 more.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
`bindings/typescript/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — bindings/typescript/package.json:5
What to do
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
What to do
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Do you agree with this assessment?
R1 · Type Safety10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
Do you agree with this assessment?
R10 · Code Duplication3.2 / 10Weak✓ Tool-verified
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
15 duplicated blocks under bindings/typescript/src.ts/ have copies in at least two of the sibling directories control, dynamics, geometry, pipeline — 7 of them are reported below, and 8 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 15 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 15 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 15 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — bindings/typescript/src.ts/dynamics/rigid_body.ts:1412
7 duplicated blocks under bindings/typescript/ have copies in at least two of the sibling directories testbed2d, testbed3d — 5 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — bindings/typescript/testbed2d/src/Testbed.ts:1
bindings/typescript/testbed2d/src/Testbed.ts:1 · bindings/typescript/testbed3d/src/Testbed.ts:1 — these 2 files are line-for-line copies of one another — 133 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — bindings/typescript/testbed2d/src/Testbed.ts:1
bindings/typescript/testbed2d/src/Gui.ts:6 · bindings/typescript/testbed3d/src/Gui.ts:23 — the two spans are one implementation copied and then locally edited — 649 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — bindings/typescript/testbed2d/src/Gui.ts:6
bindings/typescript/src.ts/geometry/shape.ts:81 · bindings/typescript/src.ts/geometry/shape.ts:279 — the two spans are one implementation copied and then locally edited — 397 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — bindings/typescript/src.ts/geometry/shape.ts:81
bindings/typescript/testbed2d/webpack.config.js:5 · bindings/typescript/testbed3d/webpack.config.js:5 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — bindings/typescript/testbed2d/webpack.config.js:5
bindings/typescript/src.ts/geometry/collider_set.ts:89 · bindings/typescript/src.ts/geometry/collider_set.ts:174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — bindings/typescript/src.ts/geometry/collider_set.ts:89
bindings/typescript/src.ts/geometry/point.ts:43 · bindings/typescript/src.ts/geometry/ray.ts:100 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/geometry/point.ts:43
bindings/typescript/src.ts/dynamics/rigid_body_set.ts:182 · bindings/typescript/src.ts/dynamics/soft_body_set.ts:256 — the two spans are one implementation copied and then locally edited — 155 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — bindings/typescript/src.ts/dynamics/rigid_body_set.ts:182
bindings/typescript/src.ts/geometry/broad_phase.ts:267 · bindings/typescript/src.ts/geometry/broad_phase.ts:310 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/geometry/broad_phase.ts:267
bindings/typescript/src.ts/pipeline/world.ts:984 · bindings/typescript/src.ts/pipeline/world.ts:1205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — bindings/typescript/src.ts/pipeline/world.ts:984
bindings/typescript/src.ts/dynamics/impulse_joint.ts:595 · bindings/typescript/src.ts/dynamics/impulse_joint.ts:675 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/dynamics/impulse_joint.ts:595
bindings/typescript/src.ts/geometry/shape.ts:669 · bindings/typescript/src.ts/geometry/shape.ts:699 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/geometry/shape.ts:669
bindings/typescript/src.ts/dynamics/impulse_joint_set.ts:110 · bindings/typescript/src.ts/dynamics/multibody_joint_set.ts:90 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/dynamics/impulse_joint_set.ts:110
bindings/typescript/src.ts/geometry/shape.ts:1891 · bindings/typescript/src.ts/geometry/shape.ts:1966 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/geometry/shape.ts:1891
bindings/typescript/src.ts/geometry/toi.ts:66 · bindings/typescript/src.ts/geometry/toi.ts:146 — all 2 copies are in the same file, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — bindings/typescript/src.ts/geometry/toi.ts:66
bindings/typescript/src.ts/dynamics/rigid_body.ts:1412 · bindings/typescript/src.ts/geometry/collider.ts:1945 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — bindings/typescript/src.ts/dynamics/rigid_body.ts:1412
bindings/typescript/src.ts/dynamics/rigid_body.ts:142 · bindings/typescript/src.ts/dynamics/rigid_body.ts:185 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/dynamics/rigid_body.ts:142
bindings/typescript/src.ts/pipeline/physics_pipeline.ts:25 · bindings/typescript/src.ts/pipeline/serialization_pipeline.ts:26 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — bindings/typescript/src.ts/pipeline/physics_pipeline.ts:25
bindings/typescript/src.ts/pipeline/world.ts:937 · bindings/typescript/src.ts/pipeline/world.ts:974 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/pipeline/world.ts:937
bindings/typescript/src.ts/dynamics/impulse_joint.ts:543 · bindings/typescript/src.ts/dynamics/impulse_joint.ts:642 · bindings/typescript/src.ts/dynamics/impulse_joint.ts:745 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/dynamics/impulse_joint.ts:543
bindings/typescript/src.ts/geometry/broad_phase.ts:441 · bindings/typescript/src.ts/geometry/collider.ts:1223 — the two spans are one implementation copied and then locally edited — 66 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — bindings/typescript/src.ts/geometry/broad_phase.ts:441
bindings/typescript/src.ts/geometry/shape.ts:1124 · bindings/typescript/src.ts/geometry/shape.ts:1871 · bindings/typescript/src.ts/geometry/shape.ts:1946 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — bindings/typescript/src.ts/geometry/shape.ts:1124
bindings/typescript/src.ts/dynamics/rigid_body_set.ts:69 · bindings/typescript/src.ts/geometry/collider_set.ts:89 · bindings/typescript/src.ts/geometry/collider_set.ts:174 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — bindings/typescript/src.ts/dynamics/rigid_body_set.ts:69
bindings/typescript/testbed3d/src/Graphics.ts:542 · bindings/typescript/testbed3d/src/Graphics.ts:556 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/testbed3d/src/Graphics.ts:542
bindings/typescript/src.ts/geometry/broad_phase.ts:30 · bindings/typescript/src.ts/pipeline/debug_render_pipeline.ts:58 · bindings/typescript/src.ts/pipeline/physics_pipeline.ts:29 · bindings/typescript/src.ts/pipeline/serialization_pipeline.ts:30 — the 4 copies are spread across 4 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/geometry/broad_phase.ts:30
bindings/typescript/src.ts/geometry/contact.ts:61 · bindings/typescript/src.ts/geometry/toi.ts:58 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — bindings/typescript/src.ts/geometry/contact.ts:61
bindings/typescript/src.ts/geometry/ray.ts:97 · bindings/typescript/src.ts/geometry/ray.ts:167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — bindings/typescript/src.ts/geometry/ray.ts:97
bindings/typescript/testbed2d/src/Graphics.ts:120 · bindings/typescript/testbed3d/src/Graphics.ts:278 — the two spans are one implementation copied and then locally edited — 94 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — bindings/typescript/testbed2d/src/Graphics.ts:120
bindings/typescript/src.ts/math.ts:34 · bindings/typescript/src.ts/math.ts:122 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/math.ts:34
bindings/typescript/src.ts/dynamics/impulse_joint.ts:289 · bindings/typescript/src.ts/dynamics/multibody_joint.ts:60 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/dynamics/impulse_joint.ts:289
bindings/typescript/src.ts/dynamics/island_manager.ts:16 · bindings/typescript/src.ts/geometry/broad_phase.ts:26 · bindings/typescript/src.ts/pipeline/physics_pipeline.ts:25 · bindings/typescript/src.ts/pipeline/serialization_pipeline.ts:26 — the 4 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 4 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — bindings/typescript/src.ts/dynamics/island_manager.ts:16
bindings/typescript/src.ts/dynamics/rigid_body.ts:1300 · bindings/typescript/src.ts/dynamics/rigid_body.ts:1322 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/dynamics/rigid_body.ts:1300
bindings/typescript/src.ts/dynamics/soft_body.ts:1629 · bindings/typescript/src.ts/dynamics/soft_body.ts:1789 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/dynamics/soft_body.ts:1629
bindings/typescript/testbed3d/src/Graphics.ts:200 · bindings/typescript/testbed3d/src/Graphics.ts:211 · bindings/typescript/testbed3d/src/Graphics.ts:222 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. — bindings/typescript/testbed3d/src/Graphics.ts:200
bindings/typescript/testbed3d/src/Graphics.ts:216 · bindings/typescript/testbed3d/src/Graphics.ts:227 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/testbed3d/src/Graphics.ts:216
bindings/typescript/src.ts/control/ray_cast_vehicle_controller.ts:469 · bindings/typescript/src.ts/geometry/narrow_phase.ts:176 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — bindings/typescript/src.ts/control/ray_cast_vehicle_controller.ts:469
bindings/typescript/src.ts/geometry/shape.ts:193 · bindings/typescript/src.ts/geometry/shape.ts:205 · bindings/typescript/src.ts/geometry/shape.ts:214 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/geometry/shape.ts:193
bindings/typescript/src.ts/geometry/shape.ts:414 · bindings/typescript/src.ts/geometry/shape.ts:423 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/geometry/shape.ts:414
bindings/typescript/src.ts/dynamics/rigid_body.ts:429 · bindings/typescript/src.ts/dynamics/rigid_body.ts:483 · bindings/typescript/src.ts/dynamics/soft_body.ts:709 · bindings/typescript/src.ts/dynamics/soft_body.ts:727 · +2 more site(s) not listed — the 6 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bindings/typescript/src.ts/dynamics/rigid_body.ts:429
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
addCollider has cyclomatic complexity 19 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — bindings/typescript/testbed3d/src/Graphics.ts:495
addCollider has cyclomatic complexity 14 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — bindings/typescript/testbed2d/src/Graphics.ts:200
convexDecomposition has cyclomatic complexity 12 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — bindings/typescript/src.ts/geometry/collider.ts:1889
intoRaw has cyclomatic complexity 12 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — bindings/typescript/src.ts/dynamics/soft_body.ts:2168
initWorld has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — bindings/typescript/testbed3d/src/demos/softTearing.ts:5
Do you agree with this assessment?
R3 · Large Files3.5 / 10Weak✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
bindings/typescript/src.ts/dynamics/soft_body.ts has 2237 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bindings/typescript/src.ts/dynamics/soft_body.ts:1
bindings/typescript/src.ts/geometry/collider.ts has 2039 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bindings/typescript/src.ts/geometry/collider.ts:1
bindings/typescript/src.ts/geometry/shape.ts has 1769 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bindings/typescript/src.ts/geometry/shape.ts:1
bindings/typescript/src.ts/dynamics/rigid_body.ts has 1657 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bindings/typescript/src.ts/dynamics/rigid_body.ts:1
bindings/typescript/src.ts/pipeline/world.ts has 1422 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bindings/typescript/src.ts/pipeline/world.ts:1
bindings/typescript/src.ts/dynamics/impulse_joint.ts has 823 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bindings/typescript/src.ts/dynamics/impulse_joint.ts:1
bindings/typescript/testbed3d/src/Graphics.ts has 573 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bindings/typescript/testbed3d/src/Graphics.ts:1
bindings/typescript/src.ts/geometry/broad_phase.ts has 510 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bindings/typescript/src.ts/geometry/broad_phase.ts:1
bindings/typescript/src.ts/control/ray_cast_vehicle_controller.ts has 461 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bindings/typescript/src.ts/control/ray_cast_vehicle_controller.ts:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code9.9 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
43 file(s) (~16308 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — bindings/typescript
Unreachable from the 3 application, 3 tooling and 4 test entry point(s) detected in this repo. Gate removals on `npm run build-js` — an undetected custom entry would make these reachable.
no import path from any entry point (3 application, 3 tooling, 4 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×4) — bindings/typescript/rapier-compat/src2d/init.ts, bindings/typescript/rapier-compat/src3d/init.ts, bindings/typescript/rapier-compat/src2d/raw.ts, …
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Declared in bindings/typescript/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3)
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
bindings/typescript/src.ts/dynamics/index.ts → bindings/typescript/src.ts/dynamics/impulse_joint.ts → bindings/typescript/src.ts/dynamics/rigid_body.ts → bindings/typescript/src.ts/geometry/index.ts → bindings/typescript/src.ts/geometry/broad_phase.ts → bindings/typescript/src.ts/dynamics/index.ts (one verified cycle inside a mutually-dependent group of 31 files) — bindings/typescript/src.ts/dynamics/index.ts:4
What to do
Break each cycle by extracting the shared piece into a module both sides can import.
Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
0/1 C# file(s) are in a nullable-enabled context. This repository commits no project file, so nothing sets <Nullable>enable</Nullable> for it: a file is enabled only by its own `#nullable enable`, by a Unity `csc.rsp` with `-nullable:enable` for its assembly, or as a file-based app (`#:` directives) whose `#:property Nullable` does not turn it off. NRTs catch a whole class of null-deref bugs at compile time.
What to do
Put every file in a nullable-enabled context — `#nullable enable` at its top, or commit a project file with <Nullable>enable</Nullable> — and resolve warnings rather than suppressing with `!`.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 2 of 55 WCAG 2.2 Level A/AA success criteria (4%; ≈4% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 53 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 30 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 6 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 74 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
AC2 Forms & labels — No form control/button found in the parsed markup — AC2 not applicable here.
AC3 Page structure — No structural check found in the parsed markup — AC3 not applicable here.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
AX1 Captive dependencies — no DI registrations detected
AX2 Stateful singletons — no singleton implementations detected
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — AX6 reached only 7% of this repository's production lines — rust (202,165 lines), c (40,020 lines), python (7,967 lines), cpp (104 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D11 Test Reliability — No tests discovered
D12 Dependency Hygiene — Not scored — 52 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, and no committed Cargo.lock resolves them to versions, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Python, Rust surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Aggregate roots were found in only one source directory (bevy_rapier), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the jest suite in bindings/typescript/rapier-compat/ ran and not one test passed (FAIL tests/World3d.test.ts), so the coverage would describe the failed run, not the code. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
DM1 Domain Modelling — applicable but not scored (3 signals for this style, 3 needed — the count is met but a required primary signal is absent): 1 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 221 value object(s); 2 domain event(s); its domain events are published by services or handlers — no domain entity raises one; no aggregate is declared and no domain structure surrounds the state-guarding types: not claimed as DDD
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable (this repository commits no MSBuild project, so its C# was read as syntax-only projects — a handler marked ONLY by an interface from a package is not visible without a build)
ES1 Fold determinism — not applicable — the code was read and holds no event-replay fold, so there is nothing for this check to judge
IC1 Incompleteness & stubs — IC1 reached only 0% of this repository's production lines — rust (202,165 lines), c (40,020 lines), typescript (19,306 lines), python (7,967 lines), cpp (104 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python, Rust source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R4 Test Coverage — 4 test file(s) reach none of 80 production file(s) via imports — exercised outside the JS import graph (integration/bundled), not import-reachable
S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X12 Unreachable branch — X12 reached only 0% of this repository's production lines — rust (202,165 lines), c (40,020 lines), typescript (19,306 lines), python (7,967 lines), cpp (104 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — X16 reached only 0% of this repository's production lines — rust (202,165 lines), c (40,020 lines), typescript (19,306 lines), python (7,967 lines), cpp (104 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no async method does work a token could cancel
X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — X24 reached only 7% of this repository's production lines — rust (202,165 lines), c (40,020 lines), python (7,967 lines), cpp (104 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — This check needs a compiled C# program and this repository commits no project file to compile, so only its syntax could be read. That is a limit of the analyzer, not a finding about your code.
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X3 Exception handling — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X4 Structured logging — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
TodoComment src/lib.rs:17— // TODO: remove this? I find that in the math code using indices adds clarity. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/utils/rotation_ops.rs:76— // TODO: this can probably be optimized a lot by unrolling the ops. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/utils/rotation_ops.rs:130— // TODO: this can probably be optimized a lot by unrolling the ops. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/pipeline/query_pipeline.rs:299— // TODO: add this to CompositeShapeRef? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/pipeline/query_pipeline.rs:556— // TODO: add this to CompositeShapeRef? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/pipeline/query_pipeline.rs:388— // TODO: add to CompositeShapeRef? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/pipeline/query_pipeline.rs:429— // TODO: add to ColliderRef? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/pipeline/physics_pipeline/substep.rs:291— // TODO: what is the best place for this? It should at least be — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/pipeline/physics_pipeline/substep.rs:296— // TODO PERF: only iterate on kinematic position-based bodies — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/pipeline/physics_pipeline/substep.rs:436— // TODO: do this only on user-change. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/pipeline/physics_pipeline/substep.rs:437— // TODO: do we want some kind of automatic inverse kinematics? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/pipeline/physics_pipeline/substep.rs:675— // TODO: avoid updating the world mass properties twice (here, and — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/geometry/collider.rs:618— // TODO: we have a lot of different AABB computation functions — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/geometry/contact_pair.rs:25— // TODO: add a COMPUTE_SOFT_IMPULSES flag too? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/geometry/contact_pair.rs:873— // TODO PERF: double-check that the compiler is using simd loads and — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/geometry/narrow_phase/intersections.rs:83— // TODO: avoid lookup into bodies. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/geometry/narrow_phase/pair_management.rs:33— // TODO: avoid these hash-maps. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/geometry/narrow_phase/pair_management.rs:399— // TODO: could we just unwrap here? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/geometry/narrow_phase/pair_management.rs:618— // TODO: refactor both pieces of code somehow? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/geometry/narrow_phase/pair_update.rs:381— // TODO(perf): would it be worth it to check if the aabb overlaps the leaves of composite shapes? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/geometry/broad_phase_bvh/mod.rs:105— // TODO: would be interesting to try out: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/geometry/broad_phase_bvh/update.rs:128— // TODO(PERF): avoid the systematic Vec<Vec<_>> allocation? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/geometry/broad_phase_bvh/update.rs:404— // TODO(perf): avoid systematic `Vec` allocation. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/geometry/broad_phase_bvh/update.rs:442— // TODO(refactor): looks more complex than it could be. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/geometry/broad_phase_bvh/update.rs:550— // TODO(perf): avoid these Vec allocations? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FileTooLong: src/geometry.rs bindings/python/rapier-py-3d/src/geometry.rs— FileTooLong — 2922 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 2422 over it, 5.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/joints.rs bindings/python/rapier-py-3d/src/joints.rs— FileTooLong — 2603 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 2103 over it, 5.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/scoped_access.rs bindings/c/src/scoped_access.rs— FileTooLong — 2417 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 169 free functions. The bar is 500 significant lines; this is 1917 over it, 4.83× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/soft_body.rs bindings/python/rapier-py-3d/src/soft_body.rs— FileTooLong — 2281 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1781 over it, 4.56× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/pipeline.rs bindings/python/rapier-py-3d/src/pipeline.rs— FileTooLong — 2163 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1663 over it, 4.33× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/dynamics.rs bindings/python/rapier-py-3d/src/dynamics.rs— FileTooLong — 1553 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1053 over it, 3.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/pipeline.rs bindings/c/src/pipeline.rs— FileTooLong — 1526 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 98 free functions. The bar is 500 significant lines; this is 1026 over it, 3.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: context/mod.rs bindings/bevy_rapier/src/plugin/context/mod.rs— FileTooLong — 1476 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 976 over it, 2.95× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/loaders.rs bindings/python/rapier-py-3d/src/loaders.rs— FileTooLong — 1270 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 770 over it, 2.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/controllers.rs bindings/python/rapier-py-3d/src/controllers.rs— FileTooLong — 1188 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 688 over it, 2.38× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/handle_access.rs bindings/c/src/handle_access.rs— FileTooLong — 1180 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 82 free functions. The bar is 500 significant lines; this is 680 over it, 2.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: dynamics/soft_body.rs bindings/typescript/src/dynamics/soft_body.rs— FileTooLong — 1160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 660 over it, 2.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: multibody_joint/multibody.rs src/dynamics/joint/multibody_joint/multibody.rs— FileTooLong — 1068 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 87% of them inside a single declaration: Multibody (3 blocks, 96-1725). The bar is 500 significant lines; this is 568 over it, 2.14× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: systems/soft_body.rs bindings/bevy_rapier/src/plugin/systems/soft_body.rs— FileTooLong — 1061 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 561 over it, 2.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/serde_glue.rs bindings/python/rapier-py-3d/src/serde_glue.rs— FileTooLong — 1052 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 552 over it, 2.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: dynamics/soft_body.ts bindings/typescript/src.ts/dynamics/soft_body.ts— FileTooLong — 1039 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 539 over it, 2.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/soft_body.rs bindings/c/src/soft_body.rs— FileTooLong — 993 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 70 free functions. The bar is 500 significant lines; this is 493 over it, 1.99× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: geometry/shape.ts bindings/typescript/src.ts/geometry/shape.ts— FileTooLong — 954 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 454 over it, 1.91× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/read_access.rs bindings/c/src/read_access.rs— FileTooLong — 951 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 75 free functions. The bar is 500 significant lines; this is 451 over it, 1.90× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src_testbed/graphics.rs src_testbed/graphics.rs— FileTooLong — 946 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 85% of them inside a single declaration: GraphicsManager (3 blocks, 189-1529). The bar is 500 significant lines; this is 446 over it, 1.89× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: dynamics/rigid_body.rs src/dynamics/rigid_body.rs— FileTooLong — 915 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 71% of them inside a single declaration: RigidBody (7 blocks, 48-2179). The bar is 500 significant lines; this is 415 over it, 1.83× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src_testbed/ui.rs src_testbed/ui.rs— FileTooLong — 871 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 371 over it, 1.74× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: geometry/collider.ts bindings/typescript/src.ts/geometry/collider.ts— FileTooLong — 849 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 349 over it, 1.70× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/robotics.rs bindings/c/src/robotics.rs— FileTooLong — 840 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 52 free functions. The bar is 500 significant lines; this is 340 over it, 1.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: geometry/shape.rs bindings/typescript/src/geometry/shape.rs— FileTooLong — 832 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 71% of them inside a single declaration: RawShape (304-1106). The bar is 500 significant lines; this is 332 over it, 1.66× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
crate::dynamics::solver::staged_island_solver::worker::run_worker (cognitive 373) src/dynamics/solver/staged_island_solver/worker.rs:32— crate::dynamics::solver::staged_island_solver::worker::run_worker has cognitive complexity 373 (threshold 15). Drivers by points: if/else 62 (218 pts), loops 44 (143 pts), boolean chains 6, match/switch 1 (6 pts) (nesting depth added 260). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::geometry::narrow_phase::pair_update::process_pair (cognitive 197) src/geometry/narrow_phase/pair_update.rs:70— crate::geometry::narrow_phase::pair_update::process_pair has cognitive complexity 197 (threshold 15). Drivers by points: if/else 62 (135 pts), boolean chains 27, loops 9 (22 pts), match/switch 6 (13 pts) (nesting depth added 93). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
crate::geometry::narrow_phase::soft_contacts::soft_contacts_vertex_pass::detect_vertex_pass (cognitive 142) src/geometry/narrow_phase/soft_contacts/soft_contacts_vertex_pass.rs:96— crate::geometry::narrow_phase::soft_contacts::soft_contacts_vertex_pass::detect_vertex_pass has cognitive complexity 142 (threshold 15). Drivers by points: if/else 28 (77 pts), loops 17 (51 pts), boolean chains 13, match/switch 1 (nesting depth added 83). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::dynamics::solver::staged_island_solver::solve::solve_pass (cognitive 109) src/dynamics/solver/staged_island_solver/solve.rs:14— crate::dynamics::solver::staged_island_solver::solve::solve_pass has cognitive complexity 109 (threshold 15). Drivers by points: if/else 28 (52 pts), loops 19 (46 pts), boolean chains 11 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::bindings::bevy_rapier::src::plugin::systems::soft_body::handle_soft_body_tears (cognitive 107) bindings/bevy_rapier/src/plugin/systems/soft_body.rs:1214— crate::bindings::bevy_rapier::src::plugin::systems::soft_body::handle_soft_body_tears has cognitive complexity 107 (threshold 15). Drivers by points: if/else 22 (81 pts), loops 7 (20 pts), match/switch 1 (5 pts), boolean chains 1 (nesting depth added 76). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::bindings::bevy_rapier::src::plugin::systems::rigid_body::apply_rigid_body_user_changes (cognitive 93) bindings/bevy_rapier/src/plugin/systems/rigid_body.rs:51— crate::bindings::bevy_rapier::src::plugin::systems::rigid_body::apply_rigid_body_user_changes has cognitive complexity 93 (threshold 15). Drivers by points: if/else 31 (67 pts), loops 18, match/switch 2 (6 pts), boolean chains 2 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::pipeline::user_changes::handle_user_changes_to_rigid_bodies (cognitive 82) src/pipeline/user_changes.rs:46— crate::pipeline::user_changes::handle_user_changes_to_rigid_bodies has cognitive complexity 82 (threshold 15). Drivers by points: if/else 22 (55 pts), loops 5 (15 pts), boolean chains 8, match/switch 1 (4 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::bindings::bevy_rapier::src::loaders::mjcf::spawn_mjcf_model (cognitive 81) bindings/bevy_rapier/src/loaders/mjcf.rs:391— crate::bindings::bevy_rapier::src::loaders::mjcf::spawn_mjcf_model has cognitive complexity 81 (threshold 15). Drivers by points: if/else 28 (52 pts), loops 13 (22 pts), boolean chains 6, match/switch 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::bindings::bevy_rapier::src::plugin::systems::collider::apply_collider_user_changes (cognitive 74) bindings/bevy_rapier/src/plugin/systems/collider.rs:90— crate::bindings::bevy_rapier::src::plugin::systems::collider::apply_collider_user_changes has cognitive complexity 74 (threshold 15). Drivers by points: if/else 24 (57 pts), loops 14, match/switch 1 (3 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::geometry::narrow_phase::soft_contacts::soft_self_contacts::detect_self_regions (cognitive 66) src/geometry/narrow_phase/soft_contacts/soft_self_contacts.rs:397— crate::geometry::narrow_phase::soft_contacts::soft_self_contacts::detect_self_regions has cognitive complexity 66 (threshold 15). Drivers by points: if/else 17 (42 pts), loops 12 (19 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 33). Of this number, 65 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::bindings::bevy_rapier::src::plugin::systems::rigid_body::writeback_rigid_bodies (cognitive 63) bindings/bevy_rapier/src/plugin/systems/rigid_body.rs:487— crate::bindings::bevy_rapier::src::plugin::systems::rigid_body::writeback_rigid_bodies has cognitive complexity 63 (threshold 15). Drivers by points: if/else 17 (60 pts), boolean chains 2, loops 1 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
crate::geometry::narrow_phase::soft_contacts::soft_contacts_volume::volume_bins (cognitive 63) src/geometry/narrow_phase/soft_contacts/soft_contacts_volume.rs:414— crate::geometry::narrow_phase::soft_contacts::soft_contacts_volume::volume_bins has cognitive complexity 63 (threshold 15). Drivers by points: if/else 20 (36 pts), loops 10 (22 pts), boolean chains 5 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::bindings::bevy_rapier::src::plugin::systems::remove::sync_removals (cognitive 59) bindings/bevy_rapier/src/plugin/systems/remove.rs:32— crate::bindings::bevy_rapier::src::plugin::systems::remove::sync_removals has cognitive complexity 59 (threshold 15). Drivers by points: if/else 17 (41 pts), loops 14 (18 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::src_testbed::ui::example_settings_ui (cognitive 57) src_testbed/ui.rs:1158— crate::src_testbed::ui::example_settings_ui has cognitive complexity 57 (threshold 15). Drivers by points: if/else 12 (37 pts), loops 3 (9 pts), boolean chains 6, match/switch 2 (5 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::geometry::narrow_phase::soft_contacts::soft_contacts_classify::classify_skin (cognitive 55) src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:49— crate::geometry::narrow_phase::soft_contacts::soft_contacts_classify::classify_skin has cognitive complexity 55 (threshold 15). Drivers by points: if/else 20 (39 pts), loops 7 (10 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 24). Of this number, 54 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::dynamics::solver::soft_constraint::soft_contact_assembly::soft_contact_assembly_volume_constraints::emit_volume_bins (cognitive 53) src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_volume_constraints.rs:47— crate::dynamics::solver::soft_constraint::soft_contact_assembly::soft_contact_assembly_volume_constraints::emit_volume_bins has cognitive complexity 53 (threshold 15). Drivers by points: if/else 22 (37 pts), loops 5 (13 pts), boolean chains 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::bindings::bevy_rapier::src::plugin::systems::soft_body::apply_soft_body_user_changes (cognitive 42) bindings/bevy_rapier/src/plugin/systems/soft_body.rs:375— crate::bindings::bevy_rapier::src::plugin::systems::soft_body::apply_soft_body_user_changes has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 14 (18 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::dynamics::ccd::sweeps::sweep_fast_body (cognitive 40) src/dynamics/ccd/sweeps.rs:542— crate::dynamics::ccd::sweeps::sweep_fast_body has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 3 (7 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::bindings::bevy_rapier::src::plugin::systems::collider::init_colliders (cognitive 38) bindings/bevy_rapier/src/plugin/systems/collider.rs:397— crate::bindings::bevy_rapier::src::plugin::systems::collider::init_colliders has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (31 pts), match/switch 2 (6 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::bindings::bevy_rapier::src::plugin::systems::soft_body::reset_removed_soft_body_cluster_components (cognitive 33) bindings/bevy_rapier/src/plugin/systems/soft_body.rs:833— crate::bindings::bevy_rapier::src::plugin::systems::soft_body::reset_removed_soft_body_cluster_components has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 5 (10 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::geometry::narrow_phase::soft_contacts::soft_contacts_edge_pass::detect_edges (cognitive 33) src/geometry/narrow_phase/soft_contacts/soft_contacts_edge_pass.rs:24— crate::geometry::narrow_phase::soft_contacts::soft_contacts_edge_pass::detect_edges has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 6 (13 pts), boolean chains 5 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::dynamics::solver::staged_island_solver::solve::solve_soft_constraints (cognitive 32) src/dynamics/solver/staged_island_solver/solve.rs:394— crate::dynamics::solver::staged_island_solver::solve::solve_soft_constraints has cognitive complexity 32 (threshold 15). Drivers by points: loops 9 (23 pts), if/else 5 (7 pts), boolean chains 2 (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
crate::bindings::bevy_rapier::src::loaders::urdf::spawn_urdf_robot (cognitive 31) bindings/bevy_rapier/src/loaders/urdf.rs:207— crate::bindings::bevy_rapier::src::loaders::urdf::spawn_urdf_robot has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 4 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::bindings::bevy_rapier::src::plugin::systems::rigid_body::init_rigid_bodies (cognitive 31) bindings/bevy_rapier/src/plugin/systems/rigid_body.rs:666— crate::bindings::bevy_rapier::src::plugin::systems::rigid_body::init_rigid_bodies has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (27 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crate::geometry::narrow_phase::soft_contacts::soft_self_contacts::detect_self_tangles (cognitive 31) src/geometry/narrow_phase/soft_contacts/soft_self_contacts.rs:66— crate::geometry::narrow_phase::soft_contacts::soft_self_contacts::detect_self_tangles has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 11). Of this number, 29 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyMethods: Collider bindings/bevy_rapier/src/geometry/collider.rs:106— TooManyMethods — 108 methods, declared across 2 files: geometry/collider_impl.rs (107), loaders/meshloader.rs (1). The bar is 30 methods; this is 78 over it, 3.60× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RawSoftBodySet bindings/typescript/src/dynamics/soft_body.rs:1113— TooManyMethods — 108 methods. The bar is 30 methods; this is 78 over it, 3.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SoftBody src/dynamics/soft_body/soft_body.rs:28— TooManyMethods — 107 methods, declared across 8 files: soft_body/soft_body_accessors.rs (43), soft_body/soft_body_cluster.rs (21), soft_body/soft_body_meshes.rs (16), soft_body/soft_body_motion.rs (11), +4 more file(s). The bar is 30 methods; this is 77 over it, 3.57× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RawColliderSet bindings/typescript/src/geometry/collider_set.rs:17— TooManyMethods — 106 methods, declared across 2 files: geometry/collider.rs (90), geometry/collider_set.rs (16). The bar is 30 methods; this is 76 over it, 3.53× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SoftBody bindings/python/rapier-py-3d/src/soft_body.rs:2458— TooManyMethods — 102 methods. The bar is 30 methods; this is 72 over it, 3.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RawRigidBodySet bindings/typescript/src/dynamics/rigid_body_set.rs:43— TooManyMethods — 101 methods, declared across 2 files: dynamics/rigid_body.rs (91), dynamics/rigid_body_set.rs (10). The bar is 30 methods; this is 71 over it, 3.37× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RigidBody src/dynamics/rigid_body.rs:48— TooManyMethods — 101 methods. The bar is 30 methods; this is 71 over it, 3.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RigidBody bindings/python/rapier-py-3d/src/dynamics.rs:1580— TooManyMethods — 97 methods, declared across 2 files: src/dynamics.rs (94), src/serde_glue.rs (3). The bar is 30 methods; this is 67 over it, 3.23× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SoftBody bindings/typescript/src.ts/dynamics/soft_body.ts:587— TooManyMethods — 96 methods. The bar is 30 methods; this is 66 over it, 3.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RigidBody bindings/typescript/src.ts/dynamics/rigid_body.ts:55— TooManyMethods — 93 methods. The bar is 30 methods; this is 63 over it, 3.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Collider bindings/python/rapier-py-3d/src/geometry.rs:3486— TooManyMethods — 92 methods, declared across 2 files: src/geometry.rs (89), src/serde_glue.rs (3). The bar is 30 methods; this is 62 over it, 3.07× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Collider bindings/typescript/src.ts/geometry/collider.ts:166— TooManyMethods — 82 methods. The bar is 30 methods; this is 52 over it, 2.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: World bindings/typescript/src.ts/pipeline/world.ts:81— TooManyMethods — 70 methods. The bar is 30 methods; this is 40 over it, 2.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ColliderBuilder src/geometry/collider.rs:695— TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SoftBodyBuilder src/dynamics/soft_body/soft_body_builder/soft_body_builder.rs:50— TooManyMethods — 64 methods, declared across 3 files: soft_body_builder/soft_body_builder_settings.rs (46), soft_body_builder/soft_body_builder_shapes.rs (16), soft_body_builder/soft_body_build.rs (2). The bar is 30 methods; this is 34 over it, 2.13× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SoftBody bindings/bevy_rapier/src/dynamics/soft_body.rs:92— TooManyMethods — 63 methods, declared across 8 files: tearing/tearing_particle_split.rs (18), dynamics/soft_body.rs (16), tearing/tearing.rs (7), tearing/tearing_crack.rs (7), +4 more file(s). The bar is 30 methods; this is 33 over it, 2.10× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Collider src/geometry/collider.rs:51— TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RapierContextMut bindings/bevy_rapier/src/plugin/context/systemparams/rapier_context_systemparam.rs:123— TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RawShape bindings/typescript/src/geometry/shape.rs:301— TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SoftRecoverySettings bindings/python/rapier-py-3d/src/soft_body.rs:893— TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DebugRenderStyle bindings/python/rapier-py-3d/src/debug_render.rs:472— TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PhysicsWorld src/pipeline/physics_world.rs:64— TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: IntegrationParameters bindings/python/rapier-py-3d/src/dynamics.rs:1251— TooManyMethods — 57 methods, declared across 2 files: src/dynamics.rs (54), src/serde_glue.rs (3). The bar is 30 methods; this is 27 over it, 1.90× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Multibody src/dynamics/joint/multibody_joint/multibody.rs:96— TooManyMethods — 57 methods, declared across 2 files: multibody_joint/multibody.rs (54), multibody_joint/multibody_ik.rs (3). The bar is 30 methods; this is 27 over it, 1.90× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SoftBodyBuilder bindings/python/rapier-py-3d/src/soft_body.rs:1402— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
MethodTooLong: SoftConstraintsSet.assemble_body_contacts src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_body_contacts.rs:26— MethodTooLong — assemble_body_contacts runs 571 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 471 over it, 5.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StagedIslandSolver.init_and_solve src/dynamics/solver/staged_island_solver/init.rs:30— MethodTooLong — init_and_solve runs 440 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 340 over it, 4.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SoftConstraintsSet.assemble_vertex_contacts src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_vertex_contacts.rs:59— MethodTooLong — assemble_vertex_contacts runs 330 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 230 over it, 3.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BroadPhaseBvh.update src/geometry/broad_phase_bvh/update.rs:35— MethodTooLong — update runs 302 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 202 over it, 3.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PhysicsPipeline.step_inner src/pipeline/physics_pipeline/substep.rs:309— MethodTooLong — step_inner runs 268 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 168 over it, 2.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RprSoftBodyDesc.raw_piece bindings/c/src/soft_desc.rs:335— MethodTooLong — raw_piece runs 263 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 163 over it, 2.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GenericContactConstraintBuilder.generate src/dynamics/solver/contact_constraint/generic_contact_constraint.rs:35— MethodTooLong — generate runs 243 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 143 over it, 2.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SoftConstraintsSet.assemble src/dynamics/solver/soft_constraint/soft_element_constraint_assembly.rs:107— MethodTooLong — assemble runs 233 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 133 over it, 2.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ContactWithTwistFrictionBuilder.generate src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:58— MethodTooLong — generate runs 227 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 127 over it, 2.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SoftConstraintsSet.fill_body_constraints src/dynamics/solver/soft_constraint/soft_element_constraint_assembly.rs:589— MethodTooLong — fill_body_constraints runs 227 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 127 over it, 2.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: VertexScan.scan_vertex src/geometry/narrow_phase/soft_contacts/soft_contacts_vertex_pass.rs:445— MethodTooLong — scan_vertex runs 223 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 123 over it, 2.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StagedIslandSolver.init_joints src/dynamics/solver/staged_island_solver/joints.rs:28— MethodTooLong — init_joints runs 199 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 99 over it, 1.99× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: NarrowPhase.compute_contacts src/geometry/narrow_phase/contacts.rs:26— MethodTooLong — compute_contacts runs 194 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 94 over it, 1.94× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SoftConstraintsSet.assemble_edge_contacts src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_edge_contacts.rs:24— MethodTooLong — assemble_edge_contacts runs 184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SoftBodyBuilder.build src/dynamics/soft_body/soft_body_builder/soft_body_build.rs:31— MethodTooLong — build runs 178 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ContactWithCoulombFrictionBuilder.generate src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:52— MethodTooLong — generate runs 176 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SoftConstraintsSet.prepare_awake_body src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_prepare.rs:18— MethodTooLong — prepare_awake_body runs 174 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PhysicsPipeline.build_islands_and_solve_velocity_constraints src/pipeline/physics_pipeline/solve.rs:163— MethodTooLong — build_islands_and_solve_velocity_constraints runs 174 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SoftConstraintsSet.chunk_contacts src/dynamics/solver/soft_constraint/soft_contact_chunks.rs:122— MethodTooLong — chunk_contacts runs 167 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PersistentIslands.split_island_now src/dynamics/island_manager/global_split.rs:66— MethodTooLong — split_island_now runs 166 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: JointConstraint.update src/dynamics/solver/joint_constraint/joint_velocity_constraint.rs:147— MethodTooLong — update runs 158 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: NarrowPhase.maintain_solver_contact_graph src/geometry/narrow_phase/solver_graph.rs:129— MethodTooLong — maintain_solver_contact_graph runs 156 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Multibody.update_mass_matrix src/dynamics/joint/multibody_joint/multibody.rs:819— MethodTooLong — update_mass_matrix runs 155 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SoftBodySet.split_cluster src/dynamics/soft_body/soft_body_set/soft_body_set_split.rs:122— MethodTooLong — split_cluster runs 149 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Shape.fromRawShape bindings/typescript/src.ts/geometry/shape.ts:231— MethodTooLong — fromRawShape runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (6 lines × 2) bindings/bevy_rapier/src/plugin/systems/rigid_body.rs:209— bindings/bevy_rapier/src/plugin/systems/rigid_body.rs:209-214 | bindings/bevy_rapier/src/plugin/systems/rigid_body.rs:396-401 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/bevy_rapier/src/plugin/systems/rigid_body.rs:209` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bindings/c/src/handle_access.rs:126— bindings/c/src/handle_access.rs:126-131 | bindings/c/src/scoped_access.rs:1706-1711 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/handle_access.rs:126` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bindings/c/src/handle_access.rs:228— bindings/c/src/handle_access.rs:228-233 | bindings/c/src/scoped_access.rs:3171-3176 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/handle_access.rs:228` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `handle` to `RprRigidBodyHandle` in one and `RprColliderHandle` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) bindings/c/src/handle_access.rs:1359— bindings/c/src/handle_access.rs:1359-1364 | bindings/c/src/joint_extras.rs:128-133 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/handle_access.rs:1359` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bindings/c/src/joints.rs:275— bindings/c/src/joints.rs:275-280 | bindings/c/src/objects.rs:316-321 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/joints.rs:275` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bindings/c/src/read_access.rs:16— bindings/c/src/read_access.rs:16-21 | bindings/c/src/read_access.rs:48-53 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/read_access.rs:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bindings/c/src/robotics.rs:216— bindings/c/src/robotics.rs:216-221 | bindings/c/src/robotics.rs:478-483 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/robotics.rs:216` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bindings/c/src/scoped_access.rs:65— bindings/c/src/scoped_access.rs:65-70 | bindings/c/src/soft_extras.rs:60-65 — before extracting anything, compare `bindings/c/src/scoped_access.rs` and `bindings/c/src/soft_extras.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/scoped_access.rs:65` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `out` to `*mut usize` in one and `*mut u32` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) bindings/c/src/scoped_access.rs:197— bindings/c/src/scoped_access.rs:197-202 | bindings/c/src/scoped_access.rs:726-731 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/scoped_access.rs:197` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bindings/c/src/scoped_access.rs:1572— bindings/c/src/scoped_access.rs:1572-1577 | bindings/c/src/scoped_access.rs:3068-3073 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/scoped_access.rs:1572` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bindings/c/src/scoped_access.rs:3103— bindings/c/src/scoped_access.rs:3103-3108 | bindings/c/src/scoped_access.rs:3138-3143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/scoped_access.rs:3103` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `out` to `*mut RprRotation` in one and `*mut RprInteractionGroups` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) bindings/c/src/soft_body.rs:699— bindings/c/src/soft_body.rs:699-704 | bindings/c/src/soft_body.rs:1220-1225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/soft_body.rs:699` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bindings/c/src/soft_body.rs:870— bindings/c/src/soft_body.rs:870-875 | bindings/c/src/soft_body.rs:900-905 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/soft_body.rs:870` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bindings/c/src/soft_body.rs:915— bindings/c/src/soft_body.rs:915-920 | bindings/c/src/soft_body.rs:930-935 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/soft_body.rs:915` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bindings/c/src/soft_body.rs:1025— bindings/c/src/soft_body.rs:1025-1030 | bindings/c/src/soft_body.rs:1082-1087 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/soft_body.rs:1025` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bindings/python/rapier-py-3d/src/math.rs:235— bindings/python/rapier-py-3d/src/math.rs:235-240 | bindings/python/rapier-py-3d/src/math.rs:432-437 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/math.rs:235` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bindings/python/rapier-py-3d/src/math.rs:267— bindings/python/rapier-py-3d/src/math.rs:267-272 | bindings/python/rapier-py-3d/src/math.rs:464-469 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/math.rs:267` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `PyVector` in one and `PyPoint` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) bindings/python/rapier-py-3d/src/pipeline.rs:3209— bindings/python/rapier-py-3d/src/pipeline.rs:3209-3214 | bindings/python/rapier-py-3d/src/pipeline.rs:3294-3299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/pipeline.rs:3209` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bindings/typescript/src/pipeline/event_queue.rs:122— bindings/typescript/src/pipeline/event_queue.rs:122-127 | bindings/typescript/src/pipeline/event_queue.rs:132-137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/typescript/src/pipeline/event_queue.rs:122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) examples2d/ccd2.rs:57— examples2d/ccd2.rs:57-65 | examples2d/platform2.rs:28-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/ccd2.rs:57` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) examples2d/soft_bodies2.rs:77— examples2d/soft_bodies2.rs:77-82 | examples3d/soft_bodies3.rs:80-85 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_bodies2.rs:77` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) examples2d/soft_cutting2.rs:68— examples2d/soft_cutting2.rs:68-73 | examples2d/soft_stress2.rs:39-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_cutting2.rs:68` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) examples2d/soft_joints2.rs:34— examples2d/soft_joints2.rs:34-39 | examples3d/soft_joints3.rs:37-43 — before extracting anything, compare `examples2d/soft_joints2.rs` and `examples3d/soft_joints3.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_joints2.rs:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) examples2d/soft_plasticity2.rs:40— examples2d/soft_plasticity2.rs:40-45 | examples3d/soft_plasticity3.rs:40-45 — before extracting anything, compare `examples2d/soft_plasticity2.rs` and `examples3d/soft_plasticity3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_plasticity2.rs:40` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) examples2d/soft_stress2.rs:77— examples2d/soft_stress2.rs:77-82 | examples2d/soft_stress2.rs:90-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_stress2.rs:77` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) bindings/bevy_rapier/bevy_rapier_benches3d/src/pyramids.rs:7— bindings/bevy_rapier/bevy_rapier_benches3d/src/pyramids.rs:7-14 | examples3d/stress_tests/many_pyramids3.rs:11-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/bevy_rapier/bevy_rapier_benches3d/src/pyramids.rs:7` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) bindings/c/src/extra.rs:319— bindings/c/src/extra.rs:319-326 | bindings/c/src/extra.rs:371-378 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/extra.rs:319` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) bindings/c/src/extra.rs:479— bindings/c/src/extra.rs:479-486 | bindings/c/src/joints.rs:392-399 — before extracting anything, compare `bindings/c/src/extra.rs` and `bindings/c/src/joints.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/extra.rs:479` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) bindings/c/src/robotics.rs:245— bindings/c/src/robotics.rs:245-252 | bindings/c/src/robotics.rs:505-512 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/robotics.rs:245` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) bindings/python/rapier-py-3d/src/dynamics.rs:2358— bindings/python/rapier-py-3d/src/dynamics.rs:2358-2365 | bindings/python/rapier-py-3d/src/geometry.rs:4477-4484 — before extracting anything, compare `bindings/python/rapier-py-3d/src/dynamics.rs` and `bindings/python/rapier-py-3d/src/geometry.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) bindings/python/rapier-py-3d/src/pipeline.rs:3200— bindings/python/rapier-py-3d/src/pipeline.rs:3200-3207 | bindings/python/rapier-py-3d/src/pipeline.rs:3285-3292 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/pipeline.rs:3200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) bindings/typescript/src/pipeline/physics_hooks.rs:23— bindings/typescript/src/pipeline/physics_hooks.rs:23-30 | bindings/typescript/src/pipeline/physics_hooks.rs:48-55 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/rapier3d-mjcf/src/loader/mass.rs:367— crates/rapier3d-mjcf/src/loader/mass.rs:367-377 | crates/rapier3d-mjcf/src/loader/mass.rs:451-458 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rapier3d-mjcf/src/loader/mass.rs:367` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) examples2d/inverse_kinematics2.rs:23— examples2d/inverse_kinematics2.rs:23-30 | examples3d/inverse_kinematics3.rs:23-30 — before extracting anything, compare `examples2d/inverse_kinematics2.rs` and `examples3d/inverse_kinematics3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/inverse_kinematics2.rs:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) examples2d/s2d_card_house.rs:10— examples2d/s2d_card_house.rs:10-17 | examples2d/s2d_high_mass_ratio_3.rs:11-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) examples2d/soft_cutting2.rs:44— examples2d/soft_cutting2.rs:44-51 | examples2d/soft_cutting2.rs:58-65 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_cutting2.rs:44` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) examples2d/soft_jelly2.rs:25— examples2d/soft_jelly2.rs:25-32 | examples2d/soft_pile2.rs:42-49 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) examples2d/soft_surface2.rs:34— examples2d/soft_surface2.rs:34-41 | examples3d/soft_surface3.rs:38-46 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_surface2.rs:34` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) examples3d/dynamic_trimesh3.rs:19— examples3d/dynamic_trimesh3.rs:19-35 | examples3d/soft_trimesh3.rs:118-125 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/dynamic_trimesh3.rs:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) examples3d/soft_cloth_stress3.rs:18— examples3d/soft_cloth_stress3.rs:18-25 | examples3d/soft_thin_features3.rs:37-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/soft_cloth_stress3.rs:18` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/dynamics/soft_body/soft_body_volume.rs:78— src/dynamics/soft_body/soft_body_volume.rs:78-85 | src/dynamics/soft_body/tearing/tearing_particle_split.rs:685-692 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) src/dynamics/solver/soft_fem/soft_fem_set.rs:267— src/dynamics/solver/soft_fem/soft_fem_set.rs:267-274 | src/dynamics/solver/soft_fem/soft_fem_set.rs:289-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/soft_fem/soft_fem_set.rs:267` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:299— src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:299-306 | src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:333-340 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:299` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:734— src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:734-741 | src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:853-860 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:734` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) src/pipeline/query_pipeline.rs:109— src/pipeline/query_pipeline.rs:109-116 | src/pipeline/query_pipeline.rs:123-130 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) bindings/c/src/queries_extras.rs:320— bindings/c/src/queries_extras.rs:320-327 | bindings/c/src/queries_extras.rs:381-388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/queries_extras.rs:320` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) examples3d/ccd3.rs:14— examples3d/ccd3.rs:14-21 | examples3d/stress_tests/stacks3.rs:41-48 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/ccd3.rs:14` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/dynamics/joint/multibody_joint/multibody_joint_set.rs:144— src/dynamics/joint/multibody_joint/multibody_joint_set.rs:144-151 | src/dynamics/joint/multibody_joint/multibody_joint_set.rs:153-160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) bindings/bevy_rapier/src/dynamics/rope_joint.rs:18— bindings/bevy_rapier/src/dynamics/rope_joint.rs:18-25 | src/dynamics/joint/rope_joint.rs:32-39 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) bindings/bevy_rapier/src/dynamics/spring_joint.rs:24— bindings/bevy_rapier/src/dynamics/spring_joint.rs:24-31 | src/dynamics/joint/spring_joint.rs:32-39 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
FunctionTooLong: crate::dynamics::solver::staged_island_solver::worker::run_worker src/dynamics/solver/staged_island_solver/worker.rs:32— FunctionTooLong — crate::dynamics::solver::staged_island_solver::worker::run_worker runs 613 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 513 over it, 6.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rapier_examples_3d::soft_joints3::run examples3d/soft_joints3.rs:8— FunctionTooLong — rapier_examples_3d::soft_joints3::run runs 258 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 158 over it, 2.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: crate::bindings::bevy_rapier::src::loaders::mjcf::spawn_mjcf_model bindings/bevy_rapier/src/loaders/mjcf.rs:391— FunctionTooLong — crate::bindings::bevy_rapier::src::loaders::mjcf::spawn_mjcf_model runs 249 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 149 over it, 2.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: crate::dynamics::solver::staged_island_solver::solve::solve_pass src/dynamics/solver/staged_island_solver/solve.rs:14— FunctionTooLong — crate::dynamics::solver::staged_island_solver::solve::solve_pass runs 227 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 127 over it, 2.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: crate::geometry::narrow_phase::soft_contacts::soft_contacts_vertex_pass::detect_vertex_pass src/geometry/narrow_phase/soft_contacts/soft_contacts_vertex_pass.rs:96— FunctionTooLong — crate::geometry::narrow_phase::soft_contacts::soft_contacts_vertex_pass::detect_vertex_pass runs 227 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 127 over it, 2.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rapier_examples_2d::soft_joints2::run examples2d/soft_joints2.rs:8— FunctionTooLong — rapier_examples_2d::soft_joints2::run runs 202 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 102 over it, 2.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rapier_examples_3d::voxels3::run examples3d/voxels3.rs:11— FunctionTooLong — rapier_examples_3d::voxels3::run runs 200 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: crate::bindings::bevy_rapier::src::plugin::systems::soft_body::handle_soft_body_tears bindings/bevy_rapier/src/plugin/systems/soft_body.rs:1214— FunctionTooLong — crate::bindings::bevy_rapier::src::plugin::systems::soft_body::handle_soft_body_tears runs 178 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: crate::src_testbed::ui::settings_tab src_testbed/ui.rs:307— FunctionTooLong — crate::src_testbed::ui::settings_tab runs 172 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rapier_examples_3d::debug_self_intersect3::run examples3d/debug_self_intersect3.rs:8— FunctionTooLong — rapier_examples_3d::debug_self_intersect3::run runs 156 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rapier_examples_2d::debug_self_intersect2::run examples2d/debug_self_intersect2.rs:8— FunctionTooLong — rapier_examples_2d::debug_self_intersect2::run runs 146 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: crate::bindings::bevy_rapier::src::plugin::systems::character_controller::update_character_controls bindings/bevy_rapier/src/plugin/systems/character_controller.rs:23— FunctionTooLong — crate::bindings::bevy_rapier::src::plugin::systems::character_controller::update_character_controls runs 142 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rapier_examples_3d::all_examples3::main examples3d/all_examples3.rs:123— FunctionTooLong — rapier_examples_3d::all_examples3::main runs 142 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: crate::src_testbed::ui::performance_tab src_testbed/ui.rs:923— FunctionTooLong — crate::src_testbed::ui::performance_tab runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rapier_examples_3d::vehicle_joints3::run examples3d/vehicle_joints3.rs:4— FunctionTooLong — rapier_examples_3d::vehicle_joints3::run runs 132 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: crate::src_testbed::ui::debug_render_tab src_testbed/ui.rs:731— FunctionTooLong — crate::src_testbed::ui::debug_render_tab runs 128 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rapier_examples_2d::soft_force_tearing2::run examples2d/soft_force_tearing2.rs:9— FunctionTooLong — rapier_examples_2d::soft_force_tearing2::run runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rapier_examples_3d::mujoco_menagerie3::run examples3d/mujoco_menagerie3.rs:17— FunctionTooLong — rapier_examples_3d::mujoco_menagerie3::run runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: crate::bindings::bevy_rapier::src::plugin::systems::collider::init_colliders bindings/bevy_rapier/src/plugin/systems/collider.rs:397— FunctionTooLong — crate::bindings::bevy_rapier::src::plugin::systems::collider::init_colliders runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: crate::geometry::narrow_phase::soft_contacts::soft_contacts_volume::volume_bins src/geometry/narrow_phase/soft_contacts/soft_contacts_volume.rs:414— FunctionTooLong — crate::geometry::narrow_phase::soft_contacts::soft_contacts_volume::volume_bins runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rapier_examples_3d::character_controller3::run examples3d/character_controller3.rs:9— FunctionTooLong — rapier_examples_3d::character_controller3::run runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: crate::dynamics::solver::soft_constraint::soft_contact_assembly::soft_contact_assembly_volume_constraints::emit_volume_bins src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_volume_constraints.rs:47— FunctionTooLong — crate::dynamics::solver::soft_constraint::soft_contact_assembly::soft_contact_assembly_volume_constraints::emit_volume_bins runs 118 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: crate::geometry::narrow_phase::soft_contacts::soft_self_contacts::detect_self_regions src/geometry/narrow_phase/soft_contacts/soft_self_contacts.rs:397— FunctionTooLong — crate::geometry::narrow_phase::soft_contacts::soft_self_contacts::detect_self_regions runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: crate::bindings::bevy_rapier::src::geometry::to_bevy_mesh::typed_shape_to_mesh bindings/bevy_rapier/src/geometry/to_bevy_mesh.rs:126— FunctionTooLong — crate::bindings::bevy_rapier::src::geometry::to_bevy_mesh::typed_shape_to_mesh runs 116 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rapier_examples_3d::soft_tearing3::run examples3d/soft_tearing3.rs:11— FunctionTooLong — rapier_examples_3d::soft_tearing3::run runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (7 lines × 2) bindings/bevy_rapier/src/geometry/collider.rs:535— bindings/bevy_rapier/src/geometry/collider.rs:535-541 | bindings/bevy_rapier/src/geometry/collider.rs:591-597 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) bindings/c/src/pipeline.rs:667— bindings/c/src/pipeline.rs:667-673 | bindings/c/src/pipeline.rs:707-713 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) bindings/c/src/soft_body.rs:1056— bindings/c/src/soft_body.rs:1056-1062 | bindings/c/src/soft_body.rs:1075-1081 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/soft_body.rs:1056` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) examples2d/joint_motor_position2.rs:23— examples2d/joint_motor_position2.rs:23-29 | examples2d/joint_motor_position2.rs:46-52 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/joint_motor_position2.rs:23` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples2d/joint_motor_position2.rs:45` calls `rotation` and `examples2d/joint_motor_position2.rs:22` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) examples2d/s2d_pyramid.rs:24— examples2d/s2d_pyramid.rs:24-30 | examples3d/b3d_large_pyramid.rs:20-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/s2d_pyramid.rs:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) examples2d/soft_force_tearing2.rs:68— examples2d/soft_force_tearing2.rs:68-74 | examples2d/soft_force_tearing2.rs:140-146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) examples2d/soft_joints2.rs:262— examples2d/soft_joints2.rs:262-268 | examples3d/soft_joints3.rs:327-333 — before extracting anything, compare `examples2d/soft_joints2.rs` and `examples3d/soft_joints3.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) examples2d/soft_stress2.rs:48— examples2d/soft_stress2.rs:48-54 | examples2d/soft_tearing2.rs:52-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_stress2.rs:48` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) examples3d/debug_balls3.rs:20— examples3d/debug_balls3.rs:20-26 | examples3d/stress_tests/many_kinematics3.rs:19-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_balls3.rs:20` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) examples3d/debug_chain_high_mass_ratio3.rs:40— examples3d/debug_chain_high_mass_ratio3.rs:40-46 | examples3d/debug_long_chain3.rs:31-37 — before extracting anything, compare `examples3d/debug_chain_high_mass_ratio3.rs` and `examples3d/debug_long_chain3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_chain_high_mass_ratio3.rs:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) examples3d/debug_shape_modification3.rs:77— examples3d/debug_shape_modification3.rs:77-83 | examples3d/primitives3.rs:39-45 — before extracting anything, compare `examples3d/debug_shape_modification3.rs` and `examples3d/primitives3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_shape_modification3.rs:77` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples3d/debug_shape_modification3.rs:84` calls `cuboid` and `examples3d/primitives3.rs:47` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) examples3d/soft_bodies3.rs:15— examples3d/soft_bodies3.rs:15-25 | examples3d/soft_cloth3.rs:26-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/soft_bodies3.rs:15` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 2) src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_rigid_coupling.rs:234— src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_rigid_coupling.rs:234-240 | src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_rigid_coupling.rs:250-256 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/geometry/narrow_phase/pair_update.rs:152— src/geometry/narrow_phase/pair_update.rs:152-158 | src/geometry/narrow_phase/pair_update.rs:761-767 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/rapier3d-mjcf/src/loader/conversion.rs:530— crates/rapier3d-mjcf/src/loader/conversion.rs:530-536 | crates/rapier3d-mjcf/src/loader/geom.rs:445-451 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rapier3d-mjcf/src/loader/conversion.rs:530` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/geometry/interaction_graph.rs:121— src/geometry/interaction_graph.rs:121-127 | src/geometry/interaction_graph.rs:139-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/geometry/interaction_graph.rs:121` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/dynamics/joint/multibody_joint/multibody.rs:626— src/dynamics/joint/multibody_joint/multibody.rs:626-632 | src/dynamics/joint/multibody_joint/multibody.rs:1042-1048 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/joint/multibody_joint/multibody.rs:626` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) bindings/bevy_rapier/src/dynamics/pin_slot_joint.rs:23— bindings/bevy_rapier/src/dynamics/pin_slot_joint.rs:23-29 | src/dynamics/joint/pin_slot_joint.rs:26-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `axis` to `Vect` in one and `Vector` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) bindings/bevy_rapier/src/dynamics/prismatic_joint.rs:20— bindings/bevy_rapier/src/dynamics/prismatic_joint.rs:20-26 | src/dynamics/joint/prismatic_joint.rs:34-40 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `axis` to `Vect` in one and `Vector` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) bindings/bevy_rapier/src/dynamics/revolute_joint.rs:42— bindings/bevy_rapier/src/dynamics/revolute_joint.rs:42-48 | src/dynamics/joint/revolute_joint.rs:44-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `axis` to `Vect` in one and `Vector` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) bindings/c/src/dynamics.rs:657— bindings/c/src/dynamics.rs:657-663 | bindings/c/src/soft_body.rs:314-320 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/dynamics.rs:657` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) bindings/c/src/joints.rs:76— bindings/c/src/joints.rs:76-82 | bindings/c/src/soft_body.rs:345-351 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/joints.rs:76` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) bindings/c/src/soft_body.rs:1157— bindings/c/src/soft_body.rs:1157-1163 | bindings/c/src/soft_extras.rs:9-15 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/soft_body.rs:1157` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:348— bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:348-354 | bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:374-380 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:270— bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:270-276 | bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:278-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
crate::dynamics::solver::staged_island_solver::worker::run_worker (cyclomatic 110) src/dynamics/solver/staged_island_solver/worker.rs:32— crate::dynamics::solver::staged_island_solver::worker::run_worker has cyclomatic complexity 110 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::geometry::narrow_phase::pair_update::process_pair (cyclomatic 100) src/geometry/narrow_phase/pair_update.rs:70— crate::geometry::narrow_phase::pair_update::process_pair has cyclomatic complexity 100 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::dynamics::solver::staged_island_solver::solve::solve_pass (cyclomatic 59) src/dynamics/solver/staged_island_solver/solve.rs:14— crate::dynamics::solver::staged_island_solver::solve::solve_pass has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::geometry::narrow_phase::soft_contacts::soft_contacts_vertex_pass::detect_vertex_pass (cyclomatic 57) src/geometry/narrow_phase/soft_contacts/soft_contacts_vertex_pass.rs:96— crate::geometry::narrow_phase::soft_contacts::soft_contacts_vertex_pass::detect_vertex_pass has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::bindings::bevy_rapier::src::plugin::systems::rigid_body::apply_rigid_body_user_changes (cyclomatic 53) bindings/bevy_rapier/src/plugin/systems/rigid_body.rs:51— crate::bindings::bevy_rapier::src::plugin::systems::rigid_body::apply_rigid_body_user_changes has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::bindings::bevy_rapier::src::loaders::mjcf::spawn_mjcf_model (cyclomatic 45) bindings/bevy_rapier/src/loaders/mjcf.rs:391— crate::bindings::bevy_rapier::src::loaders::mjcf::spawn_mjcf_model has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::bindings::bevy_rapier::src::plugin::systems::collider::apply_collider_user_changes (cyclomatic 41) bindings/bevy_rapier/src/plugin/systems/collider.rs:90— crate::bindings::bevy_rapier::src::plugin::systems::collider::apply_collider_user_changes has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::pipeline::user_changes::handle_user_changes_to_rigid_bodies (cyclomatic 35) src/pipeline/user_changes.rs:46— crate::pipeline::user_changes::handle_user_changes_to_rigid_bodies has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::geometry::narrow_phase::soft_contacts::soft_self_contacts::detect_self_regions (cyclomatic 33) src/geometry/narrow_phase/soft_contacts/soft_self_contacts.rs:397— crate::geometry::narrow_phase::soft_contacts::soft_self_contacts::detect_self_regions has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::bindings::bevy_rapier::src::plugin::systems::remove::sync_removals (cyclomatic 32) bindings/bevy_rapier/src/plugin/systems/remove.rs:32— crate::bindings::bevy_rapier::src::plugin::systems::remove::sync_removals has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::bindings::bevy_rapier::src::plugin::systems::soft_body::handle_soft_body_tears (cyclomatic 30) bindings/bevy_rapier/src/plugin/systems/soft_body.rs:1214— crate::bindings::bevy_rapier::src::plugin::systems::soft_body::handle_soft_body_tears has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::geometry::narrow_phase::soft_contacts::soft_contacts_volume::volume_bins (cyclomatic 29) src/geometry/narrow_phase/soft_contacts/soft_contacts_volume.rs:414— crate::geometry::narrow_phase::soft_contacts::soft_contacts_volume::volume_bins has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::geometry::narrow_phase::soft_contacts::soft_contacts_classify::classify_skin (cyclomatic 28) src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:49— crate::geometry::narrow_phase::soft_contacts::soft_contacts_classify::classify_skin has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::bindings::bevy_rapier::src::plugin::systems::soft_body::apply_soft_body_user_changes (cyclomatic 26) bindings/bevy_rapier/src/plugin/systems/soft_body.rs:375— crate::bindings::bevy_rapier::src::plugin::systems::soft_body::apply_soft_body_user_changes has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::src_testbed::ui::example_settings_ui (cyclomatic 26) src_testbed/ui.rs:1158— crate::src_testbed::ui::example_settings_ui has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::dynamics::solver::soft_constraint::soft_contact_assembly::soft_contact_assembly_volume_constraints::emit_volume_bins (cyclomatic 24) src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_volume_constraints.rs:47— crate::dynamics::solver::soft_constraint::soft_contact_assembly::soft_contact_assembly_volume_constraints::emit_volume_bins has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::bindings::bevy_rapier::src::plugin::systems::collider::init_colliders (cyclomatic 22) bindings/bevy_rapier/src/plugin/systems/collider.rs:397— crate::bindings::bevy_rapier::src::plugin::systems::collider::init_colliders has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::bindings::bevy_rapier::src::plugin::systems::rigid_body::init_rigid_bodies (cyclomatic 22) bindings/bevy_rapier/src/plugin/systems/rigid_body.rs:666— crate::bindings::bevy_rapier::src::plugin::systems::rigid_body::init_rigid_bodies has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::bindings::bevy_rapier::src::plugin::systems::rigid_body::writeback_rigid_bodies (cyclomatic 20) bindings/bevy_rapier/src/plugin/systems/rigid_body.rs:487— crate::bindings::bevy_rapier::src::plugin::systems::rigid_body::writeback_rigid_bodies has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::dynamics::ccd::sweeps::sweep_fast_body (cyclomatic 20) src/dynamics/ccd/sweeps.rs:542— crate::dynamics::ccd::sweeps::sweep_fast_body has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::dynamics::soft_body::soft_body_set::soft_body_set_proxies::sync_soft_body (cyclomatic 20) src/dynamics/soft_body/soft_body_set/soft_body_set_proxies.rs:213— crate::dynamics::soft_body::soft_body_set::soft_body_set_proxies::sync_soft_body has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
crate::geometry::narrow_phase::soft_contacts::soft_contacts_edge_pass::detect_edges (cyclomatic 20) src/geometry/narrow_phase/soft_contacts/soft_contacts_edge_pass.rs:24— crate::geometry::narrow_phase::soft_contacts::soft_contacts_edge_pass::detect_edges has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::geometry::narrow_phase::soft_contacts::soft_self_contacts::detect_self_tangles (cyclomatic 20) src/geometry/narrow_phase/soft_contacts/soft_self_contacts.rs:66— crate::geometry::narrow_phase::soft_contacts::soft_self_contacts::detect_self_tangles has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crate::src_testbed::ui::settings_tab (cyclomatic 20) src_testbed/ui.rs:307— crate::src_testbed::ui::settings_tab has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
crate::dynamics::solver::staged_island_solver::solve::solve_soft_constraints (cyclomatic 17) src/dynamics/solver/staged_island_solver/solve.rs:394— crate::dynamics::solver::staged_island_solver::solve::solve_soft_constraints has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
rapier_examples_3d::voxels3::run (cognitive 88) examples3d/voxels3.rs:11— rapier_examples_3d::voxels3::run has cognitive complexity 88 (threshold 15). Drivers by points: if/else 18 (53 pts), loops 10 (25 pts), match/switch 2 (8 pts), boolean chains 2 (nesting depth added 56). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
rapier_examples_3d::debug_sleeping_kinematic3::run (cognitive 34) examples3d/debug_sleeping_kinematic3.rs:4— rapier_examples_3d::debug_sleeping_kinematic3::run has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (32 pts), boolean chains 1, loops 1 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
rapier_examples_3d::vehicle_joints3::run (cognitive 31) examples3d/vehicle_joints3.rs:4— rapier_examples_3d::vehicle_joints3::run has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 5 (11 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::sensor3::run (cognitive 27) examples3d/sensor3.rs:5— rapier_examples_3d::sensor3::run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 5 (10 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::debug_chain_high_mass_ratio3::run (cognitive 23) examples3d/debug_chain_high_mass_ratio3.rs:4— rapier_examples_3d::debug_chain_high_mass_ratio3::run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::mujoco_menagerie3::run (cognitive 23) examples3d/mujoco_menagerie3.rs:17— rapier_examples_3d::mujoco_menagerie3::run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::mujoco_menagerie3::discover_scenes (cognitive 23) examples3d/mujoco_menagerie3.rs:538— rapier_examples_3d::mujoco_menagerie3::discover_scenes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::soft_tearing3::run (cognitive 23) examples3d/soft_tearing3.rs:11— rapier_examples_3d::soft_tearing3::run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (11 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::ccd3::run (cognitive 22) examples3d/ccd3.rs:39— rapier_examples_3d::ccd3::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::debug_shape_modification3::run (cognitive 22) examples3d/debug_shape_modification3.rs:4— rapier_examples_3d::debug_shape_modification3::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (7 pts), match/switch 1 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::joints3::create_fixed_joints (cognitive 21) examples3d/joints3.rs:249— rapier_examples_3d::joints3::create_fixed_joints has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::soft_trimesh3::run (cognitive 21) examples3d/soft_trimesh3.rs:50— rapier_examples_3d::soft_trimesh3::run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::debug_balls3::run (cognitive 20) examples3d/debug_balls3.rs:4— rapier_examples_3d::debug_balls3::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::dynamic_trimesh3::run_impl (cognitive 20) examples3d/dynamic_trimesh3.rs:12— rapier_examples_3d::dynamic_trimesh3::run_impl has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 4 (8 pts), match/switch 1 (3 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
rapier_examples_3d::inverse_kinematics3::run (cognitive 20) examples3d/inverse_kinematics3.rs:4— rapier_examples_3d::inverse_kinematics3::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::joints3::create_spherical_joints (cognitive 20) examples3d/joints3.rs:308— rapier_examples_3d::joints3::create_spherical_joints has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::platform3::run (cognitive 20) examples3d/platform3.rs:4— rapier_examples_3d::platform3::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (7 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::keva3::build_block (cognitive 18) examples3d/keva3.rs:4— rapier_examples_3d::keva3::build_block has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (9 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::soft_pile3::run (cognitive 18) examples3d/soft_pile3.rs:8— rapier_examples_3d::soft_pile3::run has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 3 (5 pts), match/switch 1 (4 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
rapier_examples_3d::debug_long_chain3::run (cognitive 17) examples3d/debug_long_chain3.rs:4— rapier_examples_3d::debug_long_chain3::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::debug_self_intersect3::run (cognitive 17) examples3d/debug_self_intersect3.rs:8— rapier_examples_3d::debug_self_intersect3::run has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (8 pts), if/else 4 (7 pts), boolean chains 2 (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
rapier_examples_3d::joints3::create_actuated_revolute_joints (cognitive 17) examples3d/joints3.rs:401— rapier_examples_3d::joints3::create_actuated_revolute_joints has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::b3d_joint_grid::run (cognitive 16) examples3d/b3d_joint_grid.rs:9— rapier_examples_3d::b3d_joint_grid::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::heightfield3::run (cognitive 16) examples3d/heightfield3.rs:5— rapier_examples_3d::heightfield3::run has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (7 pts), if/else 3 (4 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d::soft_plasticity3::run (cognitive 16) examples3d/soft_plasticity3.rs:8— rapier_examples_3d::soft_plasticity3::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (7 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (9 lines × 2) bindings/c/src/control.rs:436— bindings/c/src/control.rs:436-444 | bindings/c/src/control.rs:689-697 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) bindings/c/src/descriptors.rs:634— bindings/c/src/descriptors.rs:634-642 | bindings/c/src/soft_desc.rs:689-697 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/descriptors.rs:634` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) bindings/c/src/robotics.rs:171— bindings/c/src/robotics.rs:171-179 | bindings/c/src/robotics.rs:206-214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/robotics.rs:171` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) bindings/python/rapier-py-3d/src/conv.rs:57— bindings/python/rapier-py-3d/src/conv.rs:57-65 | bindings/python/rapier-py-3d/src/conv.rs:70-78 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/conv.rs:57` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) examples2d/collision_groups2.rs:19— examples2d/collision_groups2.rs:19-27 | examples3d/collision_groups3.rs:19-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) examples2d/debug_angular_limits2.rs:49— examples2d/debug_angular_limits2.rs:49-57 | examples3d/debug_angular_limits3.rs:51-62 — before extracting anything, compare `examples2d/debug_angular_limits2.rs` and `examples3d/debug_angular_limits3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/debug_angular_limits2.rs:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) examples2d/one_way_platforms2.rs:91— examples2d/one_way_platforms2.rs:91-101 | examples3d/one_way_platforms3.rs:91-99 — before extracting anything, compare `examples2d/one_way_platforms2.rs` and `examples3d/one_way_platforms3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/one_way_platforms2.rs:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) examples2d/one_way_platforms2.rs:105— examples2d/one_way_platforms2.rs:105-113 | examples3d/one_way_platforms3.rs:103-111 — before extracting anything, compare `examples2d/one_way_platforms2.rs` and `examples3d/one_way_platforms3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/one_way_platforms2.rs:105` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) examples2d/soft_bodies2.rs:49— examples2d/soft_bodies2.rs:49-57 | examples2d/soft_bodies2.rs:59-67 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_bodies2.rs:49` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) examples2d/soft_tearing2.rs:144— examples2d/soft_tearing2.rs:144-152 | examples3d/soft_tearing3.rs:165-173 — before extracting anything, compare `examples2d/soft_tearing2.rs` and `examples3d/soft_tearing3.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_tearing2.rs:144` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) examples3d/compound3.rs:28— examples3d/compound3.rs:28-36 | examples3d/stress_tests/ccd3.rs:30-38 — before extracting anything, compare `examples3d/compound3.rs` and `examples3d/stress_tests/ccd3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/compound3.rs:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) examples3d/debug_self_intersect3.rs:83— examples3d/debug_self_intersect3.rs:83-91 | examples3d/debug_self_intersect3.rs:118-126 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) examples3d/debug_shape_modification3.rs:83— examples3d/debug_shape_modification3.rs:83-91 | examples3d/stress_tests/ccd3.rs:49-57 — before extracting anything, compare `examples3d/debug_shape_modification3.rs` and `examples3d/stress_tests/ccd3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) src/dynamics/soft_body/soft_body_set/soft_body_set_proxies.rs:124— src/dynamics/soft_body/soft_body_set/soft_body_set_proxies.rs:124-134 | src/dynamics/soft_body/soft_body_set/soft_body_set_proxies.rs:155-163 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/soft_body/soft_body_set/soft_body_set_proxies.rs:124` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/dynamics/soft_body/soft_body_set/soft_body_set_proxies.rs:154` calls `set_enabled` and `src/dynamics/soft_body/soft_body_set/soft_body_set_proxies.rs:123` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:395— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:395-403 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:462-470 — before extracting anything, compare `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs` and `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:541— src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:541-549 | src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:766-774 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:541` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/dynamics/solver/staged_island_solver/worker.rs:219— src/dynamics/solver/staged_island_solver/worker.rs:219-227 | src/dynamics/solver/staged_island_solver/worker.rs:927-935 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/staged_island_solver/worker.rs:219` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/geometry/narrow_phase/pair_update.rs:495— src/geometry/narrow_phase/pair_update.rs:495-503 | src/geometry/narrow_phase/pair_update.rs:526-534 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/geometry/narrow_phase/soft_contacts/soft_contacts_types.rs:346— src/geometry/narrow_phase/soft_contacts/soft_contacts_types.rs:346-354 | src/geometry/narrow_phase/soft_contacts/soft_contacts_types.rs:356-364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/geometry/narrow_phase/soft_contacts/soft_contacts_types.rs:346` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) bindings/c/src/control.rs:987— bindings/c/src/control.rs:987-995 | bindings/c/src/control.rs:1050-1058 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/control.rs:987` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) bindings/c/src/joint_extras.rs:197— bindings/c/src/joint_extras.rs:197-205 | bindings/c/src/joints.rs:335-343 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/joint_extras.rs:197` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) bindings/python/rapier-py-3d/src/math.rs:754— bindings/python/rapier-py-3d/src/math.rs:754-762 | bindings/python/rapier-py-3d/src/math.rs:972-980 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/math.rs:754` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) bindings/python/rapier-py-3d/src/loaders.rs:389— bindings/python/rapier-py-3d/src/loaders.rs:389-397 | bindings/python/rapier-py-3d/src/loaders.rs:1235-1243 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `bindings/python/rapier-py-3d/src/loaders.rs:1246` calls `to_rapier` and `bindings/python/rapier-py-3d/src/loaders.rs:399` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) crates/mjcf-rs/src/loader/parse_utils.rs:281— crates/mjcf-rs/src/loader/parse_utils.rs:281-289 | crates/rapier3d-mjcf/src/loader/joint.rs:184-196 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) examples2d/b2d_rain.rs:56— examples2d/b2d_rain.rs:56-64 | examples3d/b3d_rain.rs:64-72 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/b2d_rain.rs:56` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
ClassTooLong: Multibody src/dynamics/joint/multibody_joint/multibody.rs:96— ClassTooLong — 934 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 57 methods, 3 blocks, lines 96-1725. The bar is 400 significant lines; this is 534 over it, 2.34× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GraphicsManager src_testbed/graphics.rs:189— ClassTooLong — 806 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 37 methods, 3 blocks, lines 189-1529. The bar is 400 significant lines; this is 406 over it, 2.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RigidBody src/dynamics/rigid_body.rs:48— ClassTooLong — 646 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 101 methods, 7 blocks, lines 48-2179. The bar is 400 significant lines; this is 246 over it, 1.62× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: World bindings/typescript/src.ts/pipeline/world.ts:81— ClassTooLong — 641 significant lines (blank, comment-only and punctuation-only lines excluded), 70 methods. The bar is 400 significant lines; this is 241 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: QueryPipeline bindings/python/rapier-py-3d/src/pipeline.rs:1075— ClassTooLong — 638 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 14 methods, 2 blocks, lines 1075-2145. The bar is 400 significant lines; this is 238 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RawShape bindings/typescript/src/geometry/shape.rs:301— ClassTooLong — 594 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 60 methods. The bar is 400 significant lines; this is 194 over it, 1.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DebugRenderPipeline src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:70— ClassTooLong — 581 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 12 methods, 3 blocks, lines 70-929. The bar is 400 significant lines; this is 181 over it, 1.45× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SoftBody bindings/python/rapier-py-3d/src/soft_body.rs:2458— ClassTooLong — 577 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 102 methods, 3 blocks, lines 2458-3379. The bar is 400 significant lines; this is 177 over it, 1.44× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Conversion crates/rapier3d-mjcf/src/loader/conversion.rs:31— ClassTooLong — 575 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 39 methods, 2 blocks, lines 31-950. The bar is 400 significant lines; this is 175 over it, 1.44× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Collider bindings/python/rapier-py-3d/src/geometry.rs:3486— ClassTooLong — 559 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 92 methods, 5 blocks, lines 3486-4408. The bar is 400 significant lines; this is 159 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PhysicsWorld bindings/python/rapier-py-3d/src/pipeline.rs:2857— ClassTooLong — 540 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 53 methods, 3 blocks, lines 2857-3751. The bar is 400 significant lines; this is 140 over it, 1.35× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: JointConstraintHelper src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:76— ClassTooLong — 533 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 20 methods, 3 blocks, lines 76-790. The bar is 400 significant lines; this is 133 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: KinematicCharacterController src/control/character_controller.rs:173— ClassTooLong — 521 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 14 methods, 3 blocks, lines 173-981. The bar is 400 significant lines; this is 121 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Shape bindings/typescript/src.ts/geometry/shape.ts:9— ClassTooLong — 500 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 100 over it, 1.25× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RapierContextSimulation bindings/bevy_rapier/src/plugin/context/mod.rs:1841— ClassTooLong — 483 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 26 methods, 3 blocks, lines 1841-2615. The bar is 400 significant lines; this is 83 over it, 1.21× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RawColliderSet bindings/typescript/src/geometry/collider_set.rs:17— ClassTooLong — 480 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 106 methods, 3 blocks, lines 19-566. The bar is 400 significant lines; this is 80 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PersistentIslands src/dynamics/island_manager/persistent.rs:152— ClassTooLong — 457 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 33 methods, 2 blocks, lines 152-878. The bar is 400 significant lines; this is 57 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RprSoftBodyDesc bindings/c/src/soft_desc.rs:88— ClassTooLong — 455 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 3 methods, 3 blocks, lines 88-674. The bar is 400 significant lines; this is 55 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PhysicsWorld src/pipeline/physics_world.rs:64— ClassTooLong — 452 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 58 methods, 4 blocks, lines 64-1007. The bar is 400 significant lines; this is 52 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Collider bindings/typescript/src.ts/geometry/collider.ts:166— ClassTooLong — 449 significant lines (blank, comment-only and punctuation-only lines excluded), 82 methods. The bar is 400 significant lines; this is 49 over it, 1.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SoftBodyDesc bindings/typescript/src.ts/dynamics/soft_body.ts:1416— ClassTooLong — 435 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 400 significant lines; this is 35 over it, 1.09× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RawSoftBodySet bindings/typescript/src/dynamics/soft_body.rs:1113— ClassTooLong — 430 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 108 methods, 3 blocks, lines 1115-1858. The bar is 400 significant lines; this is 30 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TestbedViewer src_testbed/viewer.rs:57— ClassTooLong — 418 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 47 methods, 2 blocks, lines 57-792. The bar is 400 significant lines; this is 18 over it, 1.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RigidBody bindings/python/rapier-py-3d/src/dynamics.rs:1580— ClassTooLong — 404 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 97 methods, 5 blocks, lines 1580-2794. The bar is 400 significant lines; this is 4 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (11 lines × 2) bindings/c/src/extra.rs:383— bindings/c/src/extra.rs:383-393 | bindings/c/src/queries_extras.rs:466-476 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/extra.rs:383` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) bindings/c/src/queries_extras.rs:421— bindings/c/src/queries_extras.rs:421-431 | bindings/c/src/queries_extras.rs:453-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/queries_extras.rs:421` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) bindings/python/rapier-py-3d/src/joints.rs:1086— bindings/python/rapier-py-3d/src/joints.rs:1086-1096 | bindings/python/rapier-py-3d/src/joints.rs:1268-1278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) bindings/typescript/src/dynamics/joint.rs:223— bindings/typescript/src/dynamics/joint.rs:223-233 | bindings/typescript/src/dynamics/joint.rs:250-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) crates/rapier3d-mjcf/src/loader/mass.rs:216— crates/rapier3d-mjcf/src/loader/mass.rs:216-226 | crates/rapier3d-mjcf/src/loader/mass.rs:260-270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rapier3d-mjcf/src/loader/mass.rs:216` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) examples2d/collision_groups2.rs:9— examples2d/collision_groups2.rs:9-19 | examples2d/sensor2.rs:9-19 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) examples2d/inverse_kinematics2.rs:59— examples2d/inverse_kinematics2.rs:59-69 | examples3d/inverse_kinematics3.rs:59-69 — before extracting anything, compare `examples2d/inverse_kinematics2.rs` and `examples3d/inverse_kinematics3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/inverse_kinematics2.rs:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) examples2d/joints2.rs:20— examples2d/joints2.rs:20-30 | examples2d/stress_tests/joint_ball2.rs:14-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/joints2.rs:20` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples2d/joints2.rs:13` calls `example_settings_mut`, `get_or_set_bool` and `examples2d/stress_tests/joint_ball2.rs:8` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) examples2d/soft_pile2.rs:28— examples2d/soft_pile2.rs:28-38 | examples2d/stress_tests/soft_jellies2.rs:23-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_pile2.rs:28` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) examples2d/soft_tearing2.rs:89— examples2d/soft_tearing2.rs:89-99 | examples3d/soft_tearing3.rs:107-117 — before extracting anything, compare `examples2d/soft_tearing2.rs` and `examples3d/soft_tearing3.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_tearing2.rs:89` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) examples2d/stress_tests/joint_fixed2.rs:26— examples2d/stress_tests/joint_fixed2.rs:26-37 | examples3d/debug_articulations3.rs:10-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/stress_tests/joint_fixed2.rs:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) examples3d/mjcf3.rs:26— examples3d/mjcf3.rs:26-36 | examples3d/urdf3.rs:28-38 — before extracting anything, compare `examples3d/mjcf3.rs` and `examples3d/urdf3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/mjcf3.rs:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/dynamics/joint/multibody_joint/multibody.rs:1638— src/dynamics/joint/multibody_joint/multibody.rs:1638-1648 | src/dynamics/joint/multibody_joint/multibody.rs:1711-1721 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:391— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:391-401 | src/dynamics/solver/contact_constraint/generic_contact_constraint.rs:444-454 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:435— src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:435-445 | src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:650-660 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:435` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:661` calls `default` and `src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:446` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) src/dynamics/solver/staged_island_solver/worker.rs:49— src/dynamics/solver/staged_island_solver/worker.rs:49-59 | src/dynamics/solver/staged_island_solver/worker.rs:952-962 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/staged_island_solver/worker.rs:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src_testbed/graphics.rs:1074— src_testbed/graphics.rs:1074-1084 | src_testbed/graphics.rs:1174-1184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src_testbed/graphics.rs:1074` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src_testbed/graphics.rs:1247— src_testbed/graphics.rs:1247-1257 | src_testbed/graphics.rs:1418-1428 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src_testbed/graphics.rs:1247` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src_testbed/graphics.rs:1244` calls `contains` and `src_testbed/graphics.rs:1416` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) examples2d/utils/character.rs:215— examples2d/utils/character.rs:215-225 | examples3d/utils/character.rs:231-241 — before extracting anything, compare `examples2d/utils/character.rs` and `examples3d/utils/character.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:313— bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:313-323 | bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:334-346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:313` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:131— bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:131-141 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/joint_revolute3.py:32-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/joint_revolute3.py:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) examples2d/stress_tests/soft_cloth_keva2.rs:51— examples2d/stress_tests/soft_cloth_keva2.rs:51-61 | examples2d/stress_tests/soft_strips2.rs:43-53 — before extracting anything, compare `examples2d/stress_tests/soft_cloth_keva2.rs` and `examples2d/stress_tests/soft_strips2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/stress_tests/soft_cloth_keva2.rs:51` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) bindings/bevy_rapier/src/plugin/systems/collider.rs:283— bindings/bevy_rapier/src/plugin/systems/collider.rs:283-287 | bindings/bevy_rapier/src/plugin/systems/collider.rs:292-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/bevy_rapier/src/plugin/systems/collider.rs:283` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) bindings/c/src/objects.rs:154— bindings/c/src/objects.rs:154-158 | bindings/c/src/objects.rs:248-252 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) examples2d/b2d_washer.rs:54— examples2d/b2d_washer.rs:54-58 | examples3d/b3d_washer.rs:87-91 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/b2d_washer.rs:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) examples2d/ccd2.rs:86— examples2d/ccd2.rs:86-90 | examples2d/soft_tearing2.rs:99-104 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) examples2d/soft_blobs2.rs:51— examples2d/soft_blobs2.rs:51-55 | examples2d/stress_tests/soft_blobs2.rs:46-52 — before extracting anything, compare `examples2d/soft_blobs2.rs` and `examples2d/stress_tests/soft_blobs2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) examples2d/soft_joints2.rs:62— examples2d/soft_joints2.rs:62-66 | examples3d/soft_joints3.rs:90-94 — before extracting anything, compare `examples2d/soft_joints2.rs` and `examples3d/soft_joints3.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_joints2.rs:62` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) examples3d/dynamic_trimesh3.rs:70— examples3d/dynamic_trimesh3.rs:70-74 | examples3d/soft_trimesh3.rs:232-236 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/dynamic_trimesh3.rs:70` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) examples3d/soft_pile3.rs:40— examples3d/soft_pile3.rs:40-44 | examples3d/stress_tests/soft_jellies3.rs:35-45 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/soft_pile3.rs:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) examples3d/vehicle_controller3.rs:106— examples3d/vehicle_controller3.rs:106-110 | examples3d/vehicle_joints3.rs:17-21 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/vehicle_controller3.rs:106` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:481— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:481-485 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:545-549 — before extracting anything, compare `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs` and `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:558— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:558-562 | src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:605-609 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/dynamics/solver/joint_constraint/generic_joint_constraint.rs:314— src/dynamics/solver/joint_constraint/generic_joint_constraint.rs:314-319 | src/dynamics/solver/joint_constraint/joint_velocity_constraint.rs:384-388 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/joint_constraint/generic_joint_constraint.rs:314` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/dynamics/solver/joint_constraint/generic_joint_constraint_builder.rs:560— src/dynamics/solver/joint_constraint/generic_joint_constraint_builder.rs:560-564 | src/dynamics/solver/joint_constraint/generic_joint_constraint_builder.rs:719-723 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) bindings/python/rapier-py-3d/src/joints.rs:2211— bindings/python/rapier-py-3d/src/joints.rs:2211-2215 | bindings/python/rapier-py-3d/src/joints.rs:2832-2836 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) bindings/python/rapier-py-3d/src/joints.rs:2236— bindings/python/rapier-py-3d/src/joints.rs:2236-2240 | bindings/python/rapier-py-3d/src/joints.rs:2848-2852 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) bindings/c/src/robotics.rs:1081— bindings/c/src/robotics.rs:1081-1085 | bindings/c/src/robotics.rs:1100-1104 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) bindings/typescript/src/geometry/shape.rs:849— bindings/typescript/src/geometry/shape.rs:849-853 | bindings/typescript/src/geometry/shape.rs:863-867 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/compound3.py:43— bindings/python/rapier-testbed/rapier_testbed/examples3/compound3.py:43-47 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/compound3.py:34-38 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) bindings/python/rapier-testbed/rapier_testbed/_meshes.py:559— bindings/python/rapier-testbed/rapier_testbed/_meshes.py:559-563 | bindings/python/rapier-testbed/rapier_testbed/_meshes.py:616-620 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) examples3d/stress_tests/joint_prismatic3.rs:17— examples3d/stress_tests/joint_prismatic3.rs:17-21 | examples3d/stress_tests/joint_revolute3.rs:14-18 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/stress_tests/joint_prismatic3.rs:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) bindings/python/examples/joints/pendulum.py:24— bindings/python/examples/joints/pendulum.py:24-28 | bindings/python/examples/joints/six_dof_motor.py:21-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/examples/joints/pendulum.py:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/rapier3d-mjcf/src/loader/conversion.rs:741— crates/rapier3d-mjcf/src/loader/conversion.rs:741-750 | crates/rapier3d-mjcf/src/loader/conversion.rs:785-794 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rapier3d-mjcf/src/loader/conversion.rs:741` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) examples2d/b2d_joint_grid.rs:64— examples2d/b2d_joint_grid.rs:64-73 | examples2d/stress_tests/ropes2.rs:53-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/b2d_joint_grid.rs:64` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) examples2d/b2d_rain.rs:124— examples2d/b2d_rain.rs:124-133 | examples3d/b3d_rain.rs:149-158 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/b2d_rain.rs:124` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) examples2d/drum2.rs:13— examples2d/drum2.rs:13-22 | examples3d/sensor3.rs:24-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/drum2.rs:13` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) examples2d/joints2.rs:21— examples2d/joints2.rs:21-30 | examples3d/stress_tests/joint_ball3.rs:10-19 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/joints2.rs:21` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples2d/joints2.rs:13` calls `example_settings_mut`, `get_or_set_bool` and `examples3d/stress_tests/joint_ball3.rs:8` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) examples2d/s2d_ball_and_chain.rs:36— examples2d/s2d_ball_and_chain.rs:36-45 | examples2d/s2d_bridge.rs:33-42 — before extracting anything, compare `examples2d/s2d_ball_and_chain.rs` and `examples2d/s2d_bridge.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/s2d_ball_and_chain.rs:36` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) examples2d/soft_joints2.rs:206— examples2d/soft_joints2.rs:206-215 | examples2d/soft_joints2.rs:221-230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_joints2.rs:206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) examples2d/soft_joints2.rs:277— examples2d/soft_joints2.rs:277-286 | examples3d/soft_joints3.rs:350-359 — before extracting anything, compare `examples2d/soft_joints2.rs` and `examples3d/soft_joints3.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_joints2.rs:277` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) examples2d/soft_thin_features2.rs:121— examples2d/soft_thin_features2.rs:121-130 | examples3d/soft_cloth_stress3.rs:122-131 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_thin_features2.rs:121` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) examples3d/mjcf3.rs:39— examples3d/mjcf3.rs:39-48 | examples3d/urdf3.rs:40-49 — before extracting anything, compare `examples3d/mjcf3.rs` and `examples3d/urdf3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/mjcf3.rs:39` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) examples3d/primitives3.rs:17— examples3d/primitives3.rs:17-26 | examples3d/stress_tests/capsules3.rs:17-26 — before extracting anything, compare `examples3d/primitives3.rs` and `examples3d/stress_tests/capsules3.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) examples3d/soft_cloth3.rs:7— examples3d/soft_cloth3.rs:7-20 | examples3d/soft_plasticity3.rs:9-18 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/soft_cloth3.rs:7` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) examples3d/soft_joints3.rs:260— examples3d/soft_joints3.rs:260-269 | examples3d/soft_joints3.rs:275-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/soft_joints3.rs:260` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) examples3d/soft_pile3.rs:48— examples3d/soft_pile3.rs:48-57 | examples3d/soft_pile3.rs:58-67 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) examples3d/soft_surface3.rs:76— examples3d/soft_surface3.rs:76-85 | examples3d/soft_surface3.rs:129-138 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/soft_surface3.rs:76` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:263— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:263-272 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:348-357 — before extracting anything, compare `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs` and `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:713— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:713-722 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:806-815 — before extracting anything, compare `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs` and `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:713` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/joint_motor_position3.py:27— bindings/python/rapier-testbed/rapier_testbed/examples3/joint_motor_position3.py:27-36 | bindings/python/rapier-testbed/rapier_testbed/examples3/joint_motor_position3.py:49-58 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-testbed/rapier_testbed/examples3/joint_motor_position3.py:27` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bindings/python/rapier-testbed/rapier_testbed/examples3/joint_motor_position3.py:48` calls `rotation` and `bindings/python/rapier-testbed/rapier_testbed/examples3/joint_motor_position3.py:26` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/compound3.py:53— bindings/python/rapier-testbed/rapier_testbed/examples3/compound3.py:53-62 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/compound3.py:41-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) examples2d/stress_tests/large_pyramids2.rs:56— examples2d/stress_tests/large_pyramids2.rs:56-65 | examples2d/stress_tests/many_pyramids2.rs:69-78 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/stress_tests/large_pyramids2.rs:56` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
SoftConstraintsSet::assemble_body_contacts (cognitive 369) src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_body_contacts.rs:26— SoftConstraintsSet::assemble_body_contacts has cognitive complexity 369 (threshold 15). Drivers by points: if/else 81 (289 pts), loops 11 (37 pts), match/switch 8 (30 pts), boolean chains 13 (nesting depth added 256). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftConstraintsSet::assemble_vertex_contacts (cognitive 122) src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_vertex_contacts.rs:59— SoftConstraintsSet::assemble_vertex_contacts has cognitive complexity 122 (threshold 15). Drivers by points: if/else 43 (79 pts), boolean chains 22, match/switch 4 (12 pts), loops 5 (9 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftConstraintsSet::prepare_awake_body (cognitive 101) src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_prepare.rs:18— SoftConstraintsSet::prepare_awake_body has cognitive complexity 101 (threshold 15). Drivers by points: if/else 23 (62 pts), loops 12 (37 pts), boolean chains 2 (nesting depth added 64). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftConstraintsSet::chunk_contacts (cognitive 101) src/dynamics/solver/soft_constraint/soft_contact_chunks.rs:122— SoftConstraintsSet::chunk_contacts has cognitive complexity 101 (threshold 15). Drivers by points: loops 22 (55 pts), if/else 11 (40 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 64). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SoftConstraintsSet::writeback_contacts (cognitive 86) src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_writeback.rs:55— SoftConstraintsSet::writeback_contacts has cognitive complexity 86 (threshold 15). Drivers by points: if/else 22 (55 pts), loops 9 (25 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftConstraintsSet::fill_body_constraints (cognitive 54) src/dynamics/solver/soft_constraint/soft_element_constraint_assembly.rs:589— SoftConstraintsSet::fill_body_constraints has cognitive complexity 54 (threshold 15). Drivers by points: if/else 18 (39 pts), loops 6 (10 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftConstraintsSet::writeback_constraints (cognitive 51) src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_writeback.rs:21— SoftConstraintsSet::writeback_constraints has cognitive complexity 51 (threshold 15). Drivers by points: if/else 14 (43 pts), loops 2 (4 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftConstraintsSet::assemble (cognitive 49) src/dynamics/solver/soft_constraint/soft_element_constraint_assembly.rs:107— SoftConstraintsSet::assemble has cognitive complexity 49 (threshold 15). Drivers by points: loops 12 (24 pts), if/else 9 (19 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 23). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SoftConstraintsSet::assemble_contacts (cognitive 48) src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly.rs:19— SoftConstraintsSet::assemble_contacts has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 10 (17 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftConstraintsSet::assemble_edge_contacts (cognitive 36) src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_edge_contacts.rs:24— SoftConstraintsSet::assemble_edge_contacts has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (29 pts), boolean chains 4, loops 2, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftConstraintsSet::solve_overlap_constraint (cognitive 31) src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_solve.rs:161— SoftConstraintsSet::solve_overlap_constraint has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 7 (9 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftConstraintsSet::warmstart_overlap_constraint (cognitive 25) src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_solve.rs:100— SoftConstraintsSet::warmstart_overlap_constraint has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 6 (12 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftConstraintsSet::assemble_clusters (cognitive 24) src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_rigid_coupling.rs:18— SoftConstraintsSet::assemble_clusters has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftConstraintsSet::writeback_bodies (cognitive 24) src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_writeback.rs:157— SoftConstraintsSet::writeback_bodies has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (10 pts), match/switch 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftConstraintsSet::assemble_attachments (cognitive 23) src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_rigid_coupling.rs:151— SoftConstraintsSet::assemble_attachments has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftConstraintsSet::solve_volume_constraint (cognitive 21) src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_solve.rs:15— SoftConstraintsSet::solve_volume_constraint has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (7 pts), match/switch 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftConstraintsSet::assemble_rigid_overlap (cognitive 17) src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_volume_constraints.rs:298— SoftConstraintsSet::assemble_rigid_overlap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (12 lines × 2) bindings/bevy_rapier/src/plugin/systems/joint.rs:259— bindings/bevy_rapier/src/plugin/systems/joint.rs:259-270 | bindings/bevy_rapier/src/plugin/systems/joint.rs:289-300 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/bevy_rapier/src/plugin/systems/joint.rs:259` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) examples2d/soft_blobs2.rs:13— examples2d/soft_blobs2.rs:13-24 | examples2d/soft_bodies2.rs:13-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (12 lines × 2) examples2d/soft_fem2.rs:79— examples2d/soft_fem2.rs:79-90 | examples3d/soft_fem3.rs:86-97 — before extracting anything, compare `examples2d/soft_fem2.rs` and `examples3d/soft_fem3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_fem2.rs:79` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) examples2d/utils/character.rs:163— examples2d/utils/character.rs:163-174 | examples3d/utils/character.rs:179-190 — before extracting anything, compare `examples2d/utils/character.rs` and `examples3d/utils/character.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/utils/character.rs:163` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) examples3d/b3d_washer.rs:52— examples3d/b3d_washer.rs:52-63 | examples3d/b3d_washer.rs:66-77 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/b3d_washer.rs:52` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) examples3d/debug_disabled3.rs:5— examples3d/debug_disabled3.rs:5-16 | examples3d/fountain3.rs:7-18 — before extracting anything, compare `examples3d/debug_disabled3.rs` and `examples3d/fountain3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) examples3d/heightfield3.rs:9— examples3d/heightfield3.rs:9-20 | examples3d/trimesh3.rs:9-20 — before extracting anything, compare `examples3d/heightfield3.rs` and `examples3d/trimesh3.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/heightfield3.rs:9` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/data/arena.rs:839— src/data/arena.rs:839-850 | src/data/arena.rs:862-873 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/data/arena.rs:839` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/data/arena.rs:852` calls `size_hint`, `Some` and `src/data/arena.rs:874` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) src/dynamics/rigid_body_components.rs:400— src/dynamics/rigid_body_components.rs:400-411 | src/dynamics/rigid_body_components.rs:417-428 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) src/dynamics/solver/joint_constraint/generic_joint_constraint_builder.rs:436— src/dynamics/solver/joint_constraint/generic_joint_constraint_builder.rs:436-447 | src/dynamics/solver/joint_constraint/generic_joint_constraint_builder.rs:449-460 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) src/dynamics/solver/staged_island_solver/joints.rs:111— src/dynamics/solver/staged_island_solver/joints.rs:111-122 | src/dynamics/solver/staged_island_solver/joints.rs:334-345 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) src/dynamics/solver/staged_island_solver/joints.rs:279— src/dynamics/solver/staged_island_solver/joints.rs:279-290 | src/dynamics/solver/staged_island_solver/joints.rs:480-491 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/staged_island_solver/joints.rs:279` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/geometry/narrow_phase/soft_contacts/soft_contacts_vertex_pass.rs:251— src/geometry/narrow_phase/soft_contacts/soft_contacts_vertex_pass.rs:251-262 | src/geometry/narrow_phase/soft_contacts/soft_contacts_vertex_pass.rs:323-334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/geometry/narrow_phase/soft_contacts/soft_contacts_vertex_pass.rs:251` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) bindings/c/src/extra.rs:345— bindings/c/src/extra.rs:345-356 | bindings/c/src/extra.rs:453-464 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/extra.rs:345` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/dynamics/solver/contact_constraint/contact_constraint_element.rs:252— src/dynamics/solver/contact_constraint/contact_constraint_element.rs:252-263 | src/dynamics/solver/contact_constraint/contact_constraint_element.rs:491-502 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
FixmeComment src/pipeline/user_changes.rs:51— // FIXME: propagate disabled state to multibodies — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment src/pipeline/user_changes.rs:165— // FIXME: Propagate the rigid-body’s enabled/disable status to its attached multibody joints. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment src/dynamics/solver/joint_constraint/generic_joint_constraint_builder.rs:594— // // FIXME: check that this also works for cases — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:244— // FIXME: handle min limit too. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment src/dynamics/joint/multibody_joint/multibody_link.rs:14— // FIXME: make all those private. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment src/dynamics/joint/multibody_joint/multibody_link.rs:120— // FIXME: keep this even if we already have the Index2 traits? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment bindings/typescript/src.ts/math.ts:46— // FIXME: type ram: RawVector? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment bindings/typescript/src.ts/math.ts:135— // FIXME: type ram: RawVector? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment bindings/bevy_rapier/src/plugin/systems/multiple_rapier_contexts.rs:218— // FIXME: We need to wait 1 frame when creating a context. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment bindings/bevy_rapier/src/geometry/to_bevy_mesh.rs:130— // FIXME: bevy 0.16 will expose a builder for cuboids: https://github.com/bevyengine/bevy/pull/17454
FixmeComment bindings/bevy_rapier/src/geometry/to_bevy_mesh.rs:145— // FIXME: bevy 0.16 will expose a builder for triangles: https://github.com/bevyengine/bevy/pull/17454
FixmeComment bindings/bevy_rapier/src/geometry/to_bevy_mesh.rs:213— // FIXME: we could use TriMesh::From(height_field), but that would clone, we should fix that in parry. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment bindings/bevy_rapier/src/geometry/to_bevy_mesh.rs:319— // FIXME: Error is simply "peeked" and ignored. Handle it properly by returning a Result from this function. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment bindings/bevy_rapier/src/dynamics/rigid_body.rs:583— // FIXME: rename this to `group` (no `s`). — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
rapier_examples_2d::soft_force_tearing2::run (cognitive 25) examples2d/soft_force_tearing2.rs:9— rapier_examples_2d::soft_force_tearing2::run has cognitive complexity 25 (threshold 15). Drivers by points: loops 9 (18 pts), if/else 2 (5 pts), boolean chains 2 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
rapier_examples_2d::ccd2::run (cognitive 24) examples2d/ccd2.rs:5— rapier_examples_2d::ccd2::run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_2d::sensor2::run (cognitive 22) examples2d/sensor2.rs:5— rapier_examples_2d::sensor2::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_2d::soft_tearing2::run (cognitive 22) examples2d/soft_tearing2.rs:11— rapier_examples_2d::soft_tearing2::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (11 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_2d::joints2::run (cognitive 21) examples2d/joints2.rs:4— rapier_examples_2d::joints2::run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_2d::debug_self_intersect2::run (cognitive 19) examples2d/debug_self_intersect2.rs:8— rapier_examples_2d::debug_self_intersect2::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_2d::s2d_high_mass_ratio_1::run (cognitive 19) examples2d/s2d_high_mass_ratio_1.rs:4— rapier_examples_2d::s2d_high_mass_ratio_1::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_2d::soft_cutting2::run (cognitive 18) examples2d/soft_cutting2.rs:9— rapier_examples_2d::soft_cutting2::run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_2d::b2d_joint_grid::run (cognitive 17) examples2d/b2d_joint_grid.rs:9— rapier_examples_2d::b2d_joint_grid::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_2d::s2d_joint_grid::run (cognitive 17) examples2d/s2d_joint_grid.rs:4— rapier_examples_2d::s2d_joint_grid::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_2d::inverse_kinematics2::run (cognitive 16) examples2d/inverse_kinematics2.rs:4— rapier_examples_2d::inverse_kinematics2::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_2d::soft_plasticity2::run (cognitive 16) examples2d/soft_plasticity2.rs:8— rapier_examples_2d::soft_plasticity2::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (7 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_2d::voxels2::run (cognitive 16) examples2d/voxels2.rs:7— rapier_examples_2d::voxels2::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×13
Edited copy of a member (8 corresponding lines) bindings/c/src/soft_body.rs:1007— bindings/c/src/soft_body.rs:1007-1014 | bindings/c/src/soft_body.rs:1055-1066 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) bindings/python/rapier-py-3d/src/pipeline.rs:1127— bindings/python/rapier-py-3d/src/pipeline.rs:1127-1135 | bindings/python/rapier-py-3d/src/pipeline.rs:3354-3361 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) bindings/bevy_rapier/src/render/mod.rs:378— bindings/bevy_rapier/src/render/mod.rs:378-385 | bindings/bevy_rapier/src/render/mod.rs:388-395 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) bindings/python/rapier-py-3d/src/soft_body.rs:450— bindings/python/rapier-py-3d/src/soft_body.rs:450-457 | bindings/python/rapier-py-3d/src/soft_body.rs:462-471 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) bindings/python/rapier-py-3d/src/soft_body.rs:867— bindings/python/rapier-py-3d/src/soft_body.rs:867-874 | bindings/python/rapier-py-3d/src/soft_body.rs:876-883 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) bindings/python/rapier-py-3d/src/soft_body.rs:1293— bindings/python/rapier-py-3d/src/soft_body.rs:1293-1300 | bindings/python/rapier-py-3d/src/soft_body.rs:1305-1312 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) bindings/bevy_rapier/src/geometry/collider.rs:534— bindings/bevy_rapier/src/geometry/collider.rs:534-541 | bindings/bevy_rapier/src/geometry/collider.rs:590-597 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) bindings/python/rapier-py-3d/src/joints.rs:3133— bindings/python/rapier-py-3d/src/joints.rs:3133-3140 | bindings/python/rapier-py-3d/src/joints.rs:4153-4160 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) bindings/c/src/control.rs:113— bindings/c/src/control.rs:113-120 | bindings/c/src/joints.rs:141-148 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) bindings/c/src/control.rs:824— bindings/c/src/control.rs:824-834 | bindings/c/src/pipeline.rs:1076-1083 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) bindings/c/src/extra.rs:59— bindings/c/src/extra.rs:59-66 | bindings/c/src/soft_body.rs:291-298 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:29— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:29-37 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:29-36 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:796— bindings/python/rapier-py-3d/src/dynamics.rs:796-803 | bindings/python/rapier-py-3d/src/geometry.rs:2319-2326 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Hotspot: src/geometry/narrow_phase/pair_update.rs src/geometry/narrow_phase/pair_update.rs:70— src/geometry/narrow_phase/pair_update.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 100 in crate::geometry::narrow_phase::pair_update::process_pair at line 70. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-12 14:08:56 +02:00' --until='2026-10-10 14:08:56 +02:00' --full-history --no-merges -- src/geometry/narrow_phase/pair_update.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/dynamics/solver/staged_island_solver/worker.rs src/dynamics/solver/staged_island_solver/worker.rs:32— src/dynamics/solver/staged_island_solver/worker.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 110 in crate::dynamics::solver::staged_island_solver::worker::run_worker at line 32. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-12 14:08:56 +02:00' --until='2026-10-10 14:08:56 +02:00' --full-history --no-merges -- src/dynamics/solver/staged_island_solver/worker.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/dynamics/solver/contact_constraint/generic_contact_constraint.rs src/dynamics/solver/contact_constraint/generic_contact_constraint.rs:35— src/dynamics/solver/contact_constraint/generic_contact_constraint.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in GenericContactConstraintBuilder::generate at line 35. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-12 14:08:56 +02:00' --until='2026-10-10 14:08:56 +02:00' --full-history --no-merges -- src/dynamics/solver/contact_constraint/generic_contact_constraint.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/geometry/broad_phase_bvh/update.rs src/geometry/broad_phase_bvh/update.rs:35— src/geometry/broad_phase_bvh/update.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in BroadPhaseBvh::update at line 35. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-12 14:08:56 +02:00' --until='2026-10-10 14:08:56 +02:00' --full-history --no-merges -- src/geometry/broad_phase_bvh/update.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/dynamics/solver/staged_island_solver/init.rs src/dynamics/solver/staged_island_solver/init.rs:30— src/dynamics/solver/staged_island_solver/init.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in StagedIslandSolver::init_and_solve at line 30. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-12 14:08:56 +02:00' --until='2026-10-10 14:08:56 +02:00' --full-history --no-merges -- src/dynamics/solver/staged_island_solver/init.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/pipeline/physics_pipeline/substep.rs src/pipeline/physics_pipeline/substep.rs:309— src/pipeline/physics_pipeline/substep.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in PhysicsPipeline::step_inner at line 309. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-12 14:08:56 +02:00' --until='2026-10-10 14:08:56 +02:00' --full-history --no-merges -- src/pipeline/physics_pipeline/substep.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/dynamics/joint/multibody_joint/multibody.rs src/dynamics/joint/multibody_joint/multibody.rs:187— src/dynamics/joint/multibody_joint/multibody.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in Multibody::remove_link at line 187. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-12 14:08:56 +02:00' --until='2026-10-10 14:08:56 +02:00' --full-history --no-merges -- src/dynamics/joint/multibody_joint/multibody.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: bindings/c/src/descriptors.rs bindings/c/src/descriptors.rs:290— bindings/c/src/descriptors.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in RprShapeDesc::raw_depth at line 290. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-12 14:08:56 +02:00' --until='2026-10-10 14:08:56 +02:00' --full-history --no-merges -- bindings/c/src/descriptors.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/pipeline/user_changes.rs src/pipeline/user_changes.rs:46— src/pipeline/user_changes.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in crate::pipeline::user_changes::handle_user_changes_to_rigid_bodies at line 46. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-12 14:08:56 +02:00' --until='2026-10-10 14:08:56 +02:00' --full-history --no-merges -- src/pipeline/user_changes.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src_testbed/graphics.rs src_testbed/graphics.rs:1236— src_testbed/graphics.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in GraphicsManager::draw at line 1236. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-12 14:08:56 +02:00' --until='2026-10-10 14:08:56 +02:00' --full-history --no-merges -- src_testbed/graphics.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/pipeline/physics_pipeline/solve.rs src/pipeline/physics_pipeline/solve.rs:163— src/pipeline/physics_pipeline/solve.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in PhysicsPipeline::build_islands_and_solve_velocity_constraints at line 163. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-12 14:08:56 +02:00' --until='2026-10-10 14:08:56 +02:00' --full-history --no-merges -- src/pipeline/physics_pipeline/solve.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src_testbed/ui.rs src_testbed/ui.rs:307— src_testbed/ui.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in crate::src_testbed::ui::settings_tab at line 307. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-12 14:08:56 +02:00' --until='2026-10-10 14:08:56 +02:00' --full-history --no-merges -- src_testbed/ui.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
SoftBody::validate_topology (cognitive 110) src/dynamics/soft_body/tearing/tearing_validate.rs:19— SoftBody::validate_topology has cognitive complexity 110 (threshold 15). Drivers by points: if/else 26 (68 pts), loops 22 (40 pts), boolean chains 2 (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBody::split_vertex (cognitive 78) src/dynamics/soft_body/tearing/tearing_particle_split.rs:478— SoftBody::split_vertex has cognitive complexity 78 (threshold 15). Drivers by points: if/else 21 (41 pts), loops 14 (21 pts), match/switch 4 (9 pts), boolean chains 7 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBody::fit_rest_positions (cognitive 50) src/dynamics/soft_body/soft_body_plasticity.rs:135— SoftBody::fit_rest_positions has cognitive complexity 50 (threshold 15). Drivers by points: loops 9 (24 pts), if/else 9 (23 pts), boolean chains 3 (nesting depth added 29). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SoftBody::remove_dead_particles (cognitive 40) src/dynamics/soft_body/soft_body_cluster.rs:414— SoftBody::remove_dead_particles has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 14 (20 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBody::insert_into_segment (cognitive 38) src/dynamics/soft_body/tearing/tearing_cut.rs:241— SoftBody::insert_into_segment has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 8, loops 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBody::seeded_components (cognitive 27) src/dynamics/soft_body/tearing/tearing_helpers.rs:62— SoftBody::seeded_components has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 9 (11 pts), boolean chains 1, match/switch 1 (nesting depth added 9). Of this number, 26 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBody::compute_volume_pieces (cognitive 26) src/dynamics/soft_body/soft_body_volume.rs:73— SoftBody::compute_volume_pieces has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 9 (10 pts) (nesting depth added 9). Of this number, 21 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBody::reachable_elements (cognitive 21) src/dynamics/soft_body/tearing/tearing_particle_split.rs:365— SoftBody::reachable_elements has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 5 (8 pts) (nesting depth added 11). Of this number, 13 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBody::inherit_cluster_membership (cognitive 21) src/dynamics/soft_body/soft_body_cluster.rs:373— SoftBody::inherit_cluster_membership has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBody::cluster_frame (cognitive 21) src/dynamics/soft_body/soft_body_cluster.rs:578— SoftBody::cluster_frame has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 5 (8 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBody::cut_segments (cognitive 19) src/dynamics/soft_body/tearing/tearing_cut.rs:179— SoftBody::cut_segments has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBody::current_pair (cognitive 16) src/dynamics/soft_body/tearing/tearing_crack.rs:157— SoftBody::current_pair has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×12
Members sharing a duplicated core (4 members, 50+ identical tokens) bindings/c/src/control.rs:755— bindings/c/src/control.rs:755-791 | bindings/c/src/soft_body.rs:433-447 | bindings/c/src/soft_body.rs:629-654 | bindings/c/src/soft_body.rs:663-686 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) bindings/c/src/control.rs:986— bindings/c/src/control.rs:986-1009 | bindings/c/src/control.rs:1049-1073 | bindings/c/src/read_access.rs:15-35 | bindings/c/src/read_access.rs:47-66 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) bindings/c/src/geometry.rs:191— bindings/c/src/geometry.rs:191-204 | bindings/c/src/geometry.rs:212-226 | bindings/c/src/geometry.rs:740-753 | bindings/c/src/geometry.rs:803-820 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) bindings/c/src/handle_access.rs:23— bindings/c/src/handle_access.rs:23-38 | bindings/c/src/handle_access.rs:738-753 | bindings/c/src/handle_access.rs:1549-1564 | bindings/c/src/scoped_access.rs:1538-1553 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) bindings/python/rapier-py-3d/src/dynamics.rs:3061— bindings/python/rapier-py-3d/src/dynamics.rs:3061-3075 | bindings/python/rapier-py-3d/src/geometry.rs:4944-4958 | bindings/python/rapier-py-3d/src/joints.rs:3175-3189 | bindings/python/rapier-py-3d/src/soft_body.rs:3650-3664 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) bindings/python/rapier-py-3d/src/geometry.rs:4747— bindings/python/rapier-py-3d/src/geometry.rs:4747-4762 | bindings/python/rapier-py-3d/src/geometry.rs:4842-4862 | bindings/python/rapier-py-3d/src/pipeline.rs:3464-3496 | bindings/python/rapier-py-3d/src/pipeline.rs:3512-3531 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) bindings/python/rapier-py-3d/src/pipeline.rs:3608— bindings/python/rapier-py-3d/src/pipeline.rs:3608-3626 | bindings/python/rapier-py-3d/src/pipeline.rs:3667-3683 | bindings/python/rapier-py-3d/src/pipeline.rs:3695-3712 | bindings/python/rapier-py-3d/src/pipeline.rs:3723-3739 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) examples2d/ccd2.rs:5— examples2d/ccd2.rs:5-130 | examples2d/sensor2.rs:5-100 | examples3d/ccd3.rs:39-152 | examples3d/sensor3.rs:5-109 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) examples2d/ccd2.rs:5— examples2d/ccd2.rs:5-130 | examples2d/soft_force_tearing2.rs:9-197 | examples2d/soft_tearing2.rs:11-152 | examples3d/soft_tearing3.rs:11-173 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/data/arena.rs:925— src/data/arena.rs:925-949 | src/data/arena.rs:958-982 | src/data/arena.rs:1034-1058 | src/data/arena.rs:1067-1091 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/dynamics/solver/contact_constraint/contact_constraint_element.rs:251— src/dynamics/solver/contact_constraint/contact_constraint_element.rs:251-265 | src/dynamics/solver/contact_constraint/contact_constraint_element.rs:283-299 | src/dynamics/solver/contact_constraint/contact_constraint_element.rs:490-504 | src/dynamics/solver/contact_constraint/contact_constraint_element.rs:518-534 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:57— src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:57-170 | src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:212-265 | src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:322-364 | src/geometry/narrow_phase/soft_contacts/soft_self_contacts.rs:403-559 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
SoftConstraintsSet::assemble_body_contacts (cyclomatic 97) src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_body_contacts.rs:26— SoftConstraintsSet::assemble_body_contacts has cyclomatic complexity 97 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftConstraintsSet::assemble_vertex_contacts (cyclomatic 60) src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_vertex_contacts.rs:59— SoftConstraintsSet::assemble_vertex_contacts has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftConstraintsSet::chunk_contacts (cyclomatic 38) src/dynamics/solver/soft_constraint/soft_contact_chunks.rs:122— SoftConstraintsSet::chunk_contacts has cyclomatic complexity 38 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SoftConstraintsSet::prepare_awake_body (cyclomatic 34) src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_prepare.rs:18— SoftConstraintsSet::prepare_awake_body has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftConstraintsSet::writeback_contacts (cyclomatic 34) src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_writeback.rs:55— SoftConstraintsSet::writeback_contacts has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftConstraintsSet::assemble (cyclomatic 27) src/dynamics/solver/soft_constraint/soft_element_constraint_assembly.rs:107— SoftConstraintsSet::assemble has cyclomatic complexity 27 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SoftConstraintsSet::assemble_edge_contacts (cyclomatic 23) src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_edge_contacts.rs:24— SoftConstraintsSet::assemble_edge_contacts has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftConstraintsSet::fill_body_constraints (cyclomatic 23) src/dynamics/solver/soft_constraint/soft_element_constraint_assembly.rs:589— SoftConstraintsSet::fill_body_constraints has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftConstraintsSet::solve_overlap_constraint (cyclomatic 22) src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_solve.rs:161— SoftConstraintsSet::solve_overlap_constraint has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftConstraintsSet::assemble_contacts (cyclomatic 22) src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly.rs:19— SoftConstraintsSet::assemble_contacts has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftConstraintsSet::writeback_constraints (cyclomatic 17) src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_writeback.rs:21— SoftConstraintsSet::writeback_constraints has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×11
Edited copy of a member (12 corresponding lines) src/dynamics/solver/soft_constraint/soft_element_constraint/soft_elastic_constraint.rs:41— src/dynamics/solver/soft_constraint/soft_element_constraint/soft_elastic_constraint.rs:41-59 | src/dynamics/solver/soft_constraint/soft_element_constraint/soft_elastic_constraint.rs:103-114 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) examples2d/b2d_many_pyramids.rs:14— examples2d/b2d_many_pyramids.rs:14-25 | examples3d/b3d_many_pyramids.rs:14-28 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) bindings/python/rapier-py-3d/src/soft_body.rs:3252— bindings/python/rapier-py-3d/src/soft_body.rs:3252-3263 | bindings/python/rapier-py-3d/src/soft_body.rs:3266-3279 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) bindings/typescript/src/geometry/narrow_phase.rs:284— bindings/typescript/src/geometry/narrow_phase.rs:284-295 | bindings/typescript/src/geometry/narrow_phase.rs:303-315 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) bindings/bevy_rapier/src/plugin/narrow_phase.rs:47— bindings/bevy_rapier/src/plugin/narrow_phase.rs:47-64 | bindings/bevy_rapier/src/plugin/narrow_phase.rs:141-152 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/mjcf-rs/src/loader/parse_utils.rs:14— crates/mjcf-rs/src/loader/parse_utils.rs:14-25 | crates/mjcf-rs/src/loader/parse_utils.rs:153-165 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) bindings/python/rapier-py-3d/src/math.rs:292— bindings/python/rapier-py-3d/src/math.rs:292-303 | bindings/python/rapier-py-3d/src/math.rs:489-500 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) bindings/c/src/joints.rs:183— bindings/c/src/joints.rs:183-195 | bindings/c/src/joints.rs:512-523 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:1038— bindings/python/rapier-py-3d/src/dynamics.rs:1038-1049 | bindings/python/rapier-py-3d/src/math.rs:843-854 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) bindings/python/rapier-py-3d/src/events_hooks.rs:858— bindings/python/rapier-py-3d/src/events_hooks.rs:858-869 | bindings/python/rapier-py-3d/src/events_hooks.rs:1153-1164 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) bindings/c/src/extra.rs:220— bindings/c/src/extra.rs:220-233 | bindings/c/src/geometry.rs:651-662 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×11
Edited copy of a member (9 corresponding lines) src/dynamics/solver/joint_constraint/generic_joint_constraint.rs:308— src/dynamics/solver/joint_constraint/generic_joint_constraint.rs:308-320 | src/dynamics/solver/joint_constraint/joint_velocity_constraint.rs:380-388 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/geometry/interaction_graph.rs:119— src/geometry/interaction_graph.rs:119-127 | src/geometry/interaction_graph.rs:137-145 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) bindings/python/rapier-py-3d/src/controllers.rs:1296— bindings/python/rapier-py-3d/src/controllers.rs:1296-1304 | bindings/python/rapier-py-3d/src/controllers.rs:1491-1499 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/dynamics/solver/joint_constraint/joint_velocity_constraint.rs:360— src/dynamics/solver/joint_constraint/joint_velocity_constraint.rs:360-368 | src/dynamics/solver/joint_constraint/joint_velocity_constraint.rs:370-378 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) bindings/c/src/soft_recipes.rs:230— bindings/c/src/soft_recipes.rs:230-238 | bindings/c/src/soft_recipes.rs:247-255 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/data/coarena.rs:88— src/data/coarena.rs:88-96 | src/data/coarena.rs:102-117 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/pipeline/physics_world.rs:860— src/pipeline/physics_world.rs:860-868 | src/pipeline/physics_world.rs:900-908 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/dynamics/solver/joint_constraint/joint_velocity_constraint.rs:509— src/dynamics/solver/joint_constraint/joint_velocity_constraint.rs:509-517 | src/dynamics/solver/joint_constraint/joint_velocity_constraint.rs:519-527 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/pipeline/query_pipeline.rs:108— src/pipeline/query_pipeline.rs:108-116 | src/pipeline/query_pipeline.rs:122-130 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) bindings/c/src/descriptors.rs:475— bindings/c/src/descriptors.rs:475-483 | bindings/c/src/objects.rs:81-89 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) bindings/python/rapier-py-3d/src/loaders.rs:801— bindings/python/rapier-py-3d/src/loaders.rs:801-809 | bindings/python/rapier-py-3d/src/loaders.rs:1902-1910 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
NarrowPhase::remove_pair (cognitive 138) src/geometry/narrow_phase/pair_management.rs:387— NarrowPhase::remove_pair has cognitive complexity 138 (threshold 15). Drivers by points: if/else 29 (122 pts), loops 2 (11 pts), boolean chains 5 (nesting depth added 102). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
NarrowPhase::handle_user_changes_on_colliders (cognitive 106) src/geometry/narrow_phase/pair_management.rs:203— NarrowPhase::handle_user_changes_on_colliders has cognitive complexity 106 (threshold 15). Drivers by points: if/else 17 (70 pts), loops 9 (35 pts), boolean chains 1 (nesting depth added 79). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
NarrowPhase::reconcile_pair (cognitive 40) src/geometry/narrow_phase/solver_graph.rs:578— NarrowPhase::reconcile_pair has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 7, match/switch 2 (5 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NarrowPhase::add_pair (cognitive 34) src/geometry/narrow_phase/pair_management.rs:577— NarrowPhase::add_pair has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (33 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NarrowPhase::maintain_solver_contact_graph (cognitive 32) src/geometry/narrow_phase/solver_graph.rs:129— NarrowPhase::maintain_solver_contact_graph has cognitive complexity 32 (threshold 15). Drivers by points: loops 8 (17 pts), if/else 7 (10 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NarrowPhase::remove_collider (cognitive 28) src/geometry/narrow_phase/pair_management.rs:78— NarrowPhase::remove_collider has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (23 pts), loops 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NarrowPhase::debug_validate_solver_graph (cognitive 28) src/geometry/narrow_phase/solver_graph.rs:718— NarrowPhase::debug_validate_solver_graph has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 6 (9 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NarrowPhase::compute_contacts (cognitive 22) src/geometry/narrow_phase/contacts.rs:26— NarrowPhase::compute_contacts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 3 (4 pts), match/switch 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NarrowPhase::compute_intersections (cognitive 22) src/geometry/narrow_phase/intersections.rs:17— NarrowPhase::compute_intersections has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 4, loops 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
NarrowPhase::for_each_desired_manifold (cognitive 16) src/geometry/narrow_phase/solver_graph.rs:517— NarrowPhase::for_each_desired_manifold has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (15 lines × 2) bindings/bevy_rapier/src/plugin/systems/remove.rs:145— bindings/bevy_rapier/src/plugin/systems/remove.rs:145-159 | bindings/bevy_rapier/src/plugin/systems/remove.rs:168-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/bevy_rapier/src/plugin/systems/remove.rs:145` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) bindings/python/rapier-py-3d/src/loaders.rs:862— bindings/python/rapier-py-3d/src/loaders.rs:862-876 | bindings/python/rapier-py-3d/src/loaders.rs:941-955 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/loaders.rs:862` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) crates/rapier3d-mjcf/src/loader/mass.rs:244— crates/rapier3d-mjcf/src/loader/mass.rs:244-258 | crates/rapier3d-mjcf/src/loader/mass.rs:293-307 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rapier3d-mjcf/src/loader/mass.rs:244` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) examples2d/debug_box_ball2.rs:25— examples2d/debug_box_ball2.rs:25-39 | examples2d/locked_rotations2.rs:40-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/debug_box_ball2.rs:25` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) examples3d/b3d_junkyard.rs:86— examples3d/b3d_junkyard.rs:86-100 | examples3d/b3d_trees.rs:173-187 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) examples3d/stress_tests/trimesh3.rs:22— examples3d/stress_tests/trimesh3.rs:22-36 | examples3d/trimesh3.rs:22-36 — before extracting anything, compare `examples3d/stress_tests/trimesh3.rs` and `examples3d/trimesh3.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/stress_tests/trimesh3.rs:22` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) src/dynamics/solver/contact_constraint/generic_contact_constraint.rs:604— src/dynamics/solver/contact_constraint/generic_contact_constraint.rs:604-618 | src/dynamics/solver/contact_constraint/generic_contact_constraint.rs:656-670 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) src/dynamics/solver/contact_constraint/generic_contact_constraint_element.rs:211— src/dynamics/solver/contact_constraint/generic_contact_constraint_element.rs:211-225 | src/dynamics/solver/contact_constraint/generic_contact_constraint_element.rs:255-269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) examples2d/soft_fem2.rs:56— examples2d/soft_fem2.rs:56-70 | examples3d/soft_fem3.rs:63-77 — before extracting anything, compare `examples2d/soft_fem2.rs` and `examples3d/soft_fem3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_fem2.rs:56` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/compound3.py:24— bindings/python/rapier-testbed/rapier_testbed/examples3/compound3.py:24-38 | bindings/python/rapier-testbed/rapier_testbed/examples3/convex_polyhedron3.py:30-44 — before extracting anything, compare `bindings/python/rapier-testbed/rapier_testbed/examples3/compound3.py` and `bindings/python/rapier-testbed/rapier_testbed/examples3/convex_polyhedron3.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-testbed/rapier_testbed/examples3/compound3.py:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×9
Edited copy of a member (16 corresponding lines) bindings/bevy_rapier/src/dynamics/joint.rs:165— bindings/bevy_rapier/src/dynamics/joint.rs:165-180 | bindings/c/src/joint_extras.rs:20-35 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) bindings/c/src/pipeline.rs:943— bindings/c/src/pipeline.rs:943-966 | bindings/c/src/pipeline.rs:967-982 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) bindings/c/src/handle_access.rs:125— bindings/c/src/handle_access.rs:125-140 | bindings/c/src/scoped_access.rs:1705-1720 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) bindings/c/src/scoped_access.rs:3102— bindings/c/src/scoped_access.rs:3102-3117 | bindings/c/src/scoped_access.rs:3137-3152 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) bindings/c/src/handle_access.rs:227— bindings/c/src/handle_access.rs:227-242 | bindings/c/src/scoped_access.rs:3170-3185 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) bindings/c/src/scoped_access.rs:1571— bindings/c/src/scoped_access.rs:1571-1586 | bindings/c/src/scoped_access.rs:3067-3082 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) bindings/c/src/scoped_access.rs:2035— bindings/c/src/scoped_access.rs:2035-2050 | bindings/c/src/soft_extras.rs:350-365 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/data/arena.rs:162— src/data/arena.rs:162-177 | src/data/arena.rs:646-663 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/rapier3d-mjcf/src/loader/options.rs:141— crates/rapier3d-mjcf/src/loader/options.rs:141-159 | crates/rapier3d-urdf/src/lib.rs:185-200 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×9
Edited copy of a member (10 corresponding lines) bindings/python/rapier-py-3d/src/geometry.rs:2527— bindings/python/rapier-py-3d/src/geometry.rs:2527-2536 | bindings/python/rapier-py-3d/src/geometry.rs:4026-4035 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/control/pid_controller.rs:197— src/control/pid_controller.rs:197-209 | src/control/pid_controller.rs:213-222 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) bindings/python/rapier-py-3d/src/math.rs:266— bindings/python/rapier-py-3d/src/math.rs:266-275 | bindings/python/rapier-py-3d/src/math.rs:463-472 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) bindings/python/rapier-py-3d/src/math.rs:696— bindings/python/rapier-py-3d/src/math.rs:696-706 | bindings/python/rapier-py-3d/src/math.rs:932-941 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) bindings/python/rapier-py-3d/src/controllers.rs:1100— bindings/python/rapier-py-3d/src/controllers.rs:1100-1109 | bindings/python/rapier-py-3d/src/controllers.rs:1142-1151 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) bindings/c/src/soft_body.rs:1092— bindings/c/src/soft_body.rs:1092-1101 | bindings/c/src/soft_body.rs:1106-1115 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) bindings/bevy_rapier/src/plugin/context/mod.rs:1052— bindings/bevy_rapier/src/plugin/context/mod.rs:1052-1064 | bindings/bevy_rapier/src/plugin/context/mod.rs:1120-1129 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/dynamics/rigid_body_set.rs:407— src/dynamics/rigid_body_set.rs:407-416 | src/geometry/collider_set.rs:133-142 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) bindings/typescript/src/dynamics/rigid_body_set.rs:209— bindings/typescript/src/dynamics/rigid_body_set.rs:209-220 | bindings/typescript/src/geometry/collider_set.rs:410-419 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×9
Edited copy of a member (5 corresponding lines) bindings/python/rapier-py-3d/src/geometry.rs:2358— bindings/python/rapier-py-3d/src/geometry.rs:2358-2362 | bindings/python/rapier-py-3d/src/geometry.rs:4008-4012 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) bindings/python/rapier-py-3d/src/geometry.rs:1982— bindings/python/rapier-py-3d/src/geometry.rs:1982-1992 | bindings/python/rapier-py-3d/src/geometry.rs:1995-1999 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) bindings/python/rapier-py-3d/src/geometry.rs:2710— bindings/python/rapier-py-3d/src/geometry.rs:2710-2714 | bindings/python/rapier-py-3d/src/pipeline.rs:173-177 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) bindings/c/src/pipeline.rs:1154— bindings/c/src/pipeline.rs:1154-1158 | bindings/c/src/robotics.rs:548-563 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:2248— bindings/python/rapier-py-3d/src/dynamics.rs:2248-2252 | bindings/python/rapier-py-3d/src/joints.rs:2328-2334 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) bindings/c/src/pipeline.rs:1117— bindings/c/src/pipeline.rs:1117-1128 | bindings/c/src/render.rs:204-208 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) bindings/c/src/pipeline.rs:1137— bindings/c/src/pipeline.rs:1137-1148 | bindings/c/src/render.rs:217-221 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/dynamics/rigid_body.rs:1512— src/dynamics/rigid_body.rs:1512-1516 | src/dynamics/rigid_body_components.rs:834-838 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) bindings/typescript/src/geometry/narrow_phase.rs:98— bindings/typescript/src/geometry/narrow_phase.rs:98-104 | bindings/typescript/src/geometry/ray.rs:56-60 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (19 lines × 2) examples2d/ccd2.rs:100— examples2d/ccd2.rs:100-118 | examples3d/ccd3.rs:122-140 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/ccd2.rs:100` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) examples2d/inverse_kinematics2.rs:78— examples2d/inverse_kinematics2.rs:78-96 | examples3d/inverse_kinematics3.rs:89-107 — before extracting anything, compare `examples2d/inverse_kinematics2.rs` and `examples3d/inverse_kinematics3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/inverse_kinematics2.rs:78` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) examples2d/sensor2.rs:81— examples2d/sensor2.rs:81-99 | examples3d/sensor3.rs:90-108 — before extracting anything, compare `examples2d/sensor2.rs` and `examples3d/sensor3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/sensor2.rs:81` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) examples2d/soft_plasticity2.rs:120— examples2d/soft_plasticity2.rs:120-138 | examples3d/soft_plasticity3.rs:130-148 — before extracting anything, compare `examples2d/soft_plasticity2.rs` and `examples3d/soft_plasticity3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_plasticity2.rs:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) src/dynamics/joint/multibody_joint/multibody_joint.rs:329— src/dynamics/joint/multibody_joint/multibody_joint.rs:329-347 | src/dynamics/joint/multibody_joint/multibody_joint.rs:418-436 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/joint/multibody_joint/multibody_joint.rs:329` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) src/dynamics/rigid_body.rs:1043— src/dynamics/rigid_body.rs:1043-1061 | src/dynamics/rigid_body.rs:1069-1087 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `angvel` to `Real` in one and `AngVector` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (19 lines × 2) src/dynamics/solver/contact_constraint/generic_contact_constraint_element.rs:122— src/dynamics/solver/contact_constraint/generic_contact_constraint_element.rs:122-140 | src/dynamics/solver/contact_constraint/generic_contact_constraint_element.rs:157-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/contact_constraint/generic_contact_constraint_element.rs:122` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (19 lines × 2) examples3d/joints3.rs:31— examples3d/joints3.rs:31-49 | examples3d/joints3.rs:71-89 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/joints3.rs:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:27— bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:27-45 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/heightfield3.py:27-45 — before extracting anything, compare `bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py` and `bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/heightfield3.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) bindings/python/rapier-py-3d/src/pipeline.rs:2625— bindings/python/rapier-py-3d/src/pipeline.rs:2625-2642 | bindings/python/rapier-py-3d/src/pipeline.rs:2761-2778 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/pipeline.rs:2625` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) bindings/typescript/src/geometry/broad_phase.rs:300— bindings/typescript/src/geometry/broad_phase.rs:300-317 | bindings/typescript/src/geometry/broad_phase.rs:401-418 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/typescript/src/geometry/broad_phase.rs:300` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (18 lines × 2) bindings/typescript/src/geometry/toi.rs:30— bindings/typescript/src/geometry/toi.rs:30-47 | bindings/typescript/src/geometry/toi.rs:79-96 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (18 lines × 2) examples2d/character_controller2.rs:144— examples2d/character_controller2.rs:144-161 | examples3d/character_controller3.rs:159-176 — before extracting anything, compare `examples2d/character_controller2.rs` and `examples3d/character_controller3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) examples2d/soft_plasticity2.rs:21— examples2d/soft_plasticity2.rs:21-38 | examples3d/soft_plasticity3.rs:21-38 — before extracting anything, compare `examples2d/soft_plasticity2.rs` and `examples3d/soft_plasticity3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_plasticity2.rs:21` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) examples3d/debug_boxes3.rs:8— examples3d/debug_boxes3.rs:8-25 | examples3d/debug_pop3.rs:8-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_boxes3.rs:8` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples3d/debug_boxes3.rs:26` calls `translation` and `examples3d/debug_pop3.rs:28` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (18 lines × 2) src/geometry/narrow_phase/soft_contacts/soft_contacts_vertex_pass.rs:219— src/geometry/narrow_phase/soft_contacts/soft_contacts_vertex_pass.rs:219-236 | src/geometry/narrow_phase/soft_contacts/soft_contacts_volume.rs:106-123 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (18 lines × 2) src_testbed/graphics.rs:1260— src_testbed/graphics.rs:1260-1277 | src_testbed/graphics.rs:1431-1448 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src_testbed/graphics.rs:1260` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) src/dynamics/soft_body/soft_body_cluster.rs:615— src/dynamics/soft_body/soft_body_cluster.rs:615-632 | src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_prepare.rs:135-152 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/soft_body/soft_body_cluster.rs:615` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) bindings/c/src/joint_desc.rs:240— bindings/c/src/joint_desc.rs:240-253 | bindings/c/src/joint_desc.rs:276-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/joint_desc.rs:240` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) bindings/c/src/pipeline.rs:1234— bindings/c/src/pipeline.rs:1234-1247 | bindings/c/src/pipeline.rs:1262-1275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/pipeline.rs:1234` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) bindings/python/rapier-py-3d/src/loaders.rs:355— bindings/python/rapier-py-3d/src/loaders.rs:355-368 | bindings/python/rapier-py-3d/src/loaders.rs:1200-1213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/loaders.rs:355` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) bindings/typescript/src/geometry/toi.rs:14— bindings/typescript/src/geometry/toi.rs:14-27 | bindings/typescript/src/geometry/toi.rs:63-76 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) examples2d/character_controller2.rs:35— examples2d/character_controller2.rs:35-48 | examples3d/character_controller3.rs:50-63 — before extracting anything, compare `examples2d/character_controller2.rs` and `examples3d/character_controller3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/character_controller2.rs:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) examples3d/compound3.rs:17— examples3d/compound3.rs:17-30 | examples3d/convex_polyhedron3.rs:19-32 — before extracting anything, compare `examples3d/compound3.rs` and `examples3d/convex_polyhedron3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) src_testbed/ui.rs:1214— src_testbed/ui.rs:1214-1227 | src_testbed/ui.rs:1257-1270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:60— bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:60-73 | bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:86-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) examples2d/stress_tests/soft_jellies2.rs:41— examples2d/stress_tests/soft_jellies2.rs:41-54 | examples3d/stress_tests/soft_jellies3.rs:56-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/stress_tests/soft_jellies2.rs:41` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) bindings/c/src/extra.rs:506— bindings/c/src/extra.rs:506-518 | bindings/c/src/joints.rs:485-497 — before extracting anything, compare `bindings/c/src/extra.rs` and `bindings/c/src/joints.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/extra.rs:506` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) bindings/typescript/src/dynamics/rigid_body_set.rs:117— bindings/typescript/src/dynamics/rigid_body_set.rs:117-129 | bindings/typescript/src/dynamics/rigid_body_set.rs:177-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/typescript/src/dynamics/rigid_body_set.rs:117` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) crates/rapier3d-mjcf/src/loader/conversion.rs:579— crates/rapier3d-mjcf/src/loader/conversion.rs:579-591 | crates/rapier3d-mjcf/src/loader/conversion.rs:595-607 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rapier3d-mjcf/src/loader/conversion.rs:579` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) examples2d/soft_plasticity2.rs:76— examples2d/soft_plasticity2.rs:76-88 | examples3d/soft_plasticity3.rs:88-100 — before extracting anything, compare `examples2d/soft_plasticity2.rs` and `examples3d/soft_plasticity3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_plasticity2.rs:76` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) examples3d/debug_dynamic_collider_add3.rs:38— examples3d/debug_dynamic_collider_add3.rs:38-50 | examples3d/debug_rollback3.rs:37-49 — before extracting anything, compare `examples3d/debug_dynamic_collider_add3.rs` and `examples3d/debug_rollback3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_dynamic_collider_add3.rs:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) examples3d/debug_dynamic_collider_add3.rs:64— examples3d/debug_dynamic_collider_add3.rs:64-76 | examples3d/debug_rollback3.rs:52-64 — before extracting anything, compare `examples3d/debug_dynamic_collider_add3.rs` and `examples3d/debug_rollback3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_dynamic_collider_add3.rs:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/dynamics/joint/multibody_joint/unit_multibody_joint.rs:48— src/dynamics/joint/multibody_joint/unit_multibody_joint.rs:48-61 | src/dynamics/joint/multibody_joint/unit_multibody_joint.rs:108-120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/joint/multibody_joint/unit_multibody_joint.rs:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/dynamics/soft_body/collision_mesh/collision_mesh_topology.rs:64— src/dynamics/soft_body/collision_mesh/collision_mesh_topology.rs:64-76 | src/dynamics/soft_body/collision_mesh/collision_mesh_topology.rs:133-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/soft_body/collision_mesh/collision_mesh_topology.rs:64` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/dynamics/island_manager/global_split.rs:128— src/dynamics/island_manager/global_split.rs:128-140 | src/dynamics/island_manager/global_split.rs:142-154 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/island_manager/global_split.rs:128` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
NarrowPhase::remove_pair (cyclomatic 34) src/geometry/narrow_phase/pair_management.rs:387— NarrowPhase::remove_pair has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NarrowPhase::handle_user_changes_on_colliders (cyclomatic 26) src/geometry/narrow_phase/pair_management.rs:203— NarrowPhase::handle_user_changes_on_colliders has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NarrowPhase::compute_intersections (cyclomatic 19) src/geometry/narrow_phase/intersections.rs:17— NarrowPhase::compute_intersections has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
NarrowPhase::reconcile_pair (cyclomatic 19) src/geometry/narrow_phase/solver_graph.rs:578— NarrowPhase::reconcile_pair has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NarrowPhase::maintain_solver_contact_graph (cyclomatic 17) src/geometry/narrow_phase/solver_graph.rs:129— NarrowPhase::maintain_solver_contact_graph has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NarrowPhase::debug_validate_solver_graph (cyclomatic 17) src/geometry/narrow_phase/solver_graph.rs:718— NarrowPhase::debug_validate_solver_graph has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NarrowPhase::compute_contacts (cyclomatic 16) src/geometry/narrow_phase/contacts.rs:26— NarrowPhase::compute_contacts has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NarrowPhase::remove_collider (cyclomatic 16) src/geometry/narrow_phase/pair_management.rs:78— NarrowPhase::remove_collider has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×8
Edited copy of a member (21 corresponding lines) examples2d/b2d_compounds.rs:9— examples2d/b2d_compounds.rs:9-36 | examples2d/b2d_junkyard.rs:9-79 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) bindings/python/rapier-py-3d/src/math.rs:783— bindings/python/rapier-py-3d/src/math.rs:783-803 | bindings/python/rapier-py-3d/src/math.rs:1006-1026 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) bindings/c/src/joint_extras.rs:196— bindings/c/src/joint_extras.rs:196-221 | bindings/c/src/joints.rs:334-354 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) bindings/c/src/read_access.rs:266— bindings/c/src/read_access.rs:266-286 | bindings/c/src/scoped_access.rs:1463-1487 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) bindings/typescript/src/pipeline/physics_hooks.rs:22— bindings/typescript/src/pipeline/physics_hooks.rs:22-45 | bindings/typescript/src/pipeline/physics_hooks.rs:47-67 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) examples2d/b2d_rain.rs:28— examples2d/b2d_rain.rs:28-48 | examples3d/b3d_rain.rs:28-56 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src/pipeline/physics_world.rs:742— src/pipeline/physics_world.rs:742-762 | src/pipeline/query_pipeline.rs:555-575 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src_testbed/testbed/hover.rs:17— src_testbed/testbed/hover.rs:17-38 | src_testbed/testbed/hover.rs:45-65 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×8
Edited copy of a member (17 corresponding lines) bindings/python/rapier-py-3d/src/math.rs:746— bindings/python/rapier-py-3d/src/math.rs:746-762 | bindings/python/rapier-py-3d/src/math.rs:964-980 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) bindings/python/rapier-py-3d/src/controllers.rs:1204— bindings/python/rapier-py-3d/src/controllers.rs:1204-1220 | bindings/python/rapier-py-3d/src/controllers.rs:1352-1374 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) bindings/c/src/robotics.rs:67— bindings/c/src/robotics.rs:67-83 | bindings/c/src/robotics.rs:317-334 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) bindings/c/src/robotics.rs:696— bindings/c/src/robotics.rs:696-712 | bindings/c/src/robotics.rs:739-760 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/dynamics/rigid_body.rs:402— src/dynamics/rigid_body.rs:402-418 | src/dynamics/rigid_body.rs:428-453 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) bindings/python/rapier-py-3d/src/events_hooks.rs:1306— bindings/python/rapier-py-3d/src/events_hooks.rs:1306-1322 | bindings/python/rapier-py-3d/src/events_hooks.rs:1330-1346 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) bindings/bevy_rapier/src/plugin/context/mod.rs:1149— bindings/bevy_rapier/src/plugin/context/mod.rs:1149-1168 | bindings/bevy_rapier/src/plugin/context/mod.rs:1188-1204 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/dynamics/joint/multibody_joint/multibody.rs:1782— src/dynamics/joint/multibody_joint/multibody.rs:1782-1798 | src/dynamics/joint/multibody_joint/multibody.rs:1804-1821 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×8
Edited copy of a member (20 corresponding lines) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:466— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:466-490 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:535-554 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) bindings/python/rapier-py-3d/src/loaders.rs:387— bindings/python/rapier-py-3d/src/loaders.rs:387-406 | bindings/python/rapier-py-3d/src/loaders.rs:1233-1254 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) bindings/c/src/robotics.rs:244— bindings/c/src/robotics.rs:244-263 | bindings/c/src/robotics.rs:504-529 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) bindings/c/src/soft_body.rs:454— bindings/c/src/soft_body.rs:454-473 | bindings/c/src/soft_body.rs:1172-1195 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) bindings/c/src/geometry.rs:18— bindings/c/src/geometry.rs:18-37 | bindings/c/src/geometry.rs:45-65 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/dynamics/soft_body/soft_body_cluster.rs:228— src/dynamics/soft_body/soft_body_cluster.rs:228-247 | src/dynamics/soft_body/soft_body_cluster.rs:255-274 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) examples2d/b2d_rain.rs:72— examples2d/b2d_rain.rs:72-91 | examples3d/b3d_rain.rs:80-99 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) bindings/c/src/robotics.rs:45— bindings/c/src/robotics.rs:45-64 | bindings/c/src/robotics.rs:294-314 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×8
Edited copy of a member (13 corresponding lines) bindings/python/rapier-testbed/rapier_testbed/examples3/ccd3.py:18— bindings/python/rapier-testbed/rapier_testbed/examples3/ccd3.py:18-36 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/stacks3.py:42-54 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) bindings/typescript/src/geometry/narrow_phase.rs:17— bindings/typescript/src/geometry/narrow_phase.rs:17-29 | bindings/typescript/src/geometry/narrow_phase.rs:39-53 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) bindings/bevy_rapier/src/plugin/context/mod.rs:2101— bindings/bevy_rapier/src/plugin/context/mod.rs:2101-2114 | bindings/bevy_rapier/src/plugin/context/mod.rs:2132-2144 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) bindings/c/src/handle_access.rs:487— bindings/c/src/handle_access.rs:487-499 | bindings/c/src/handle_access.rs:553-565 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) bindings/c/src/objects.rs:98— bindings/c/src/objects.rs:98-110 | bindings/c/src/scoped_access.rs:3552-3564 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) bindings/c/src/objects.rs:192— bindings/c/src/objects.rs:192-204 | bindings/c/src/scoped_access.rs:3579-3591 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) bindings/c/src/joint_access.rs:611— bindings/c/src/joint_access.rs:611-624 | bindings/c/src/joint_access.rs:807-819 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) bindings/python/rapier-py-3d/src/soft_body.rs:3482— bindings/python/rapier-py-3d/src/soft_body.rs:3482-3494 | bindings/typescript/src/dynamics/soft_body.rs:1220-1232 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×8
Edited copy of a member (11 corresponding lines) bindings/python/rapier-py-3d/src/joints.rs:3331— bindings/python/rapier-py-3d/src/joints.rs:3331-3341 | bindings/python/rapier-py-3d/src/joints.rs:3345-3355 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) bindings/c/src/robotics.rs:115— bindings/c/src/robotics.rs:115-125 | bindings/c/src/robotics.rs:365-375 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:2889— bindings/python/rapier-py-3d/src/dynamics.rs:2889-2902 | bindings/python/rapier-py-3d/src/geometry.rs:4721-4731 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) bindings/typescript/src/dynamics/joint.rs:157— bindings/typescript/src/dynamics/joint.rs:157-167 | bindings/typescript/src/dynamics/joint.rs:326-336 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) bindings/python/rapier-py-3d/src/math.rs:234— bindings/python/rapier-py-3d/src/math.rs:234-244 | bindings/python/rapier-py-3d/src/math.rs:431-441 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/geometry/contact_pair.rs:548— src/geometry/contact_pair.rs:548-560 | src/geometry/contact_pair.rs:565-575 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) bindings/c/src/pipeline.rs:1196— bindings/c/src/pipeline.rs:1196-1206 | bindings/c/src/pipeline.rs:1422-1433 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) bindings/c/src/scoped_access.rs:1497— bindings/c/src/scoped_access.rs:1497-1509 | bindings/c/src/scoped_access.rs:2736-2746 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
SoftBody::validate_topology (cyclomatic 51) src/dynamics/soft_body/tearing/tearing_validate.rs:19— SoftBody::validate_topology has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftBody::split_vertex (cyclomatic 46) src/dynamics/soft_body/tearing/tearing_particle_split.rs:478— SoftBody::split_vertex has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftBody::insert_into_segment (cyclomatic 26) src/dynamics/soft_body/tearing/tearing_cut.rs:241— SoftBody::insert_into_segment has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftBody::remove_dead_particles (cyclomatic 24) src/dynamics/soft_body/soft_body_cluster.rs:414— SoftBody::remove_dead_particles has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftBody::fit_rest_positions (cyclomatic 22) src/dynamics/soft_body/soft_body_plasticity.rs:135— SoftBody::fit_rest_positions has cyclomatic complexity 22 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SoftBody::seeded_components (cyclomatic 19) src/dynamics/soft_body/tearing/tearing_helpers.rs:62— SoftBody::seeded_components has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftBody::compute_volume_pieces (cyclomatic 17) src/dynamics/soft_body/soft_body_volume.rs:73— SoftBody::compute_volume_pieces has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×7
Edited copy of a member (15 corresponding lines) bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:60— bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:60-80 | bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:86-117 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) bindings/typescript/src/geometry/contact.rs:15— bindings/typescript/src/geometry/contact.rs:15-29 | bindings/typescript/src/geometry/contact.rs:35-53 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/dynamics/soft_body/soft_body_set/soft_body_set_proxies.rs:115— src/dynamics/soft_body/soft_body_set/soft_body_set_proxies.rs:115-134 | src/dynamics/soft_body/soft_body_set/soft_body_set_proxies.rs:149-163 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src_testbed/graphics/graphics_soft_bodies.rs:145— src_testbed/graphics/graphics_soft_bodies.rs:145-160 | src_testbed/graphics/graphics_soft_bodies.rs:391-405 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) bindings/python/rapier-py-3d/src/soft_body.rs:2710— bindings/python/rapier-py-3d/src/soft_body.rs:2710-2724 | bindings/python/rapier-py-3d/src/soft_body.rs:2739-2753 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/data/arena.rs:836— src/data/arena.rs:836-850 | src/data/arena.rs:859-873 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/dynamics/island_manager/persistent.rs:690— src/dynamics/island_manager/persistent.rs:690-704 | src/dynamics/island_manager/persistent.rs:707-721 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×7
Edited copy of a member (14 corresponding lines) src/dynamics/rigid_body_set.rs:337— src/dynamics/rigid_body_set.rs:337-350 | src/geometry/collider_set.rs:515-528 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) bindings/python/rapier-py-3d/src/joints.rs:1085— bindings/python/rapier-py-3d/src/joints.rs:1085-1098 | bindings/python/rapier-py-3d/src/joints.rs:1267-1280 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) bindings/c/src/robotics.rs:600— bindings/c/src/robotics.rs:600-613 | bindings/c/src/robotics.rs:942-956 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) bindings/python/rapier-py-3d/src/geometry.rs:4879— bindings/python/rapier-py-3d/src/geometry.rs:4879-4892 | bindings/python/rapier-py-3d/src/joints.rs:3082-3095 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) bindings/bevy_rapier/src/plugin/systems/joint.rs:609— bindings/bevy_rapier/src/plugin/systems/joint.rs:609-628 | bindings/bevy_rapier/src/plugin/systems/writeback.rs:71-84 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) bindings/c/src/array_views.rs:193— bindings/c/src/array_views.rs:193-206 | bindings/c/src/array_views.rs:217-230 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) bindings/python/rapier-py-3d/src/controllers.rs:609— bindings/python/rapier-py-3d/src/controllers.rs:609-623 | bindings/python/rapier-py-3d/src/controllers.rs:657-670 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (8 lines × 3) bindings/c/src/extra.rs:503— bindings/c/src/extra.rs:503-510 | bindings/c/src/joints.rs:289-296 | bindings/c/src/joints.rs:482-489 — before extracting anything, compare `bindings/c/src/extra.rs` and `bindings/c/src/joints.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/extra.rs:503` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) bindings/c/src/pipeline.rs:24— bindings/c/src/pipeline.rs:24-31 | bindings/c/src/pipeline.rs:94-101 | bindings/c/src/pipeline.rs:2123-2130 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/pipeline.rs:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) examples3d/character_controller3.rs:176— examples3d/character_controller3.rs:176-183 | examples3d/debug_sleeping_kinematic3.rs:33-40 | examples3d/platform3.rs:68-75 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/character_controller3.rs:176` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) examples3d/compound3.rs:23— examples3d/compound3.rs:23-30 | examples3d/convex_polyhedron3.rs:25-32 | examples3d/stress_tests/convex_polyhedron3.rs:26-33 — before extracting anything, compare `examples3d/compound3.rs` and `examples3d/convex_polyhedron3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) examples3d/debug_dynamic_collider_add3.rs:43— examples3d/debug_dynamic_collider_add3.rs:43-50 | examples3d/debug_rollback3.rs:42-49 | examples3d/debug_shape_modification3.rs:103-110 — before extracting anything, compare `examples3d/debug_dynamic_collider_add3.rs` and `examples3d/debug_rollback3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_dynamic_collider_add3.rs:43` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) examples3d/soft_surface3.rs:140— examples3d/soft_surface3.rs:140-147 | examples3d/stress_tests/soft_blobs3.rs:71-78 | examples3d/stress_tests/soft_cloth_drape3.rs:43-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/soft_surface3.rs:140` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 3) src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:119— src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:119-126 | src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:226-233 | src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:328-335 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:119` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 4) bindings/c/src/config_data.rs:568— bindings/c/src/config_data.rs:568-573 | bindings/c/src/pipeline.rs:1477-1482 | bindings/c/src/pipeline.rs:1513-1518 | bindings/c/src/pipeline.rs:1548-1553 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/config_data.rs:568` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 4) bindings/c/src/handle_access.rs:24— bindings/c/src/handle_access.rs:24-29 | bindings/c/src/handle_access.rs:739-744 | bindings/c/src/handle_access.rs:1550-1555 | bindings/c/src/scoped_access.rs:1539-1544 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/handle_access.rs:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `out` to `*mut u32` in one and `*mut RprBool` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 4) bindings/c/src/scoped_access.rs:87— bindings/c/src/scoped_access.rs:87-92 | bindings/c/src/scoped_access.rs:109-114 | bindings/c/src/scoped_access.rs:131-136 | bindings/c/src/scoped_access.rs:153-158 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/scoped_access.rs:87` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 4) examples3d/harness_capsules3.rs:32— examples3d/harness_capsules3.rs:32-37 | examples3d/primitives3.rs:35-40 | examples3d/stress_tests/capsules3.rs:34-39 | examples3d/stress_tests/convex_polyhedron3.rs:51-56 — before extracting anything, compare `examples3d/harness_capsules3.rs` and `examples3d/stress_tests/capsules3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/harness_capsules3.rs:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 4) bindings/python/rapier-py-3d/src/geometry.rs:4748— bindings/python/rapier-py-3d/src/geometry.rs:4748-4753 | bindings/python/rapier-py-3d/src/geometry.rs:4843-4848 | bindings/python/rapier-py-3d/src/pipeline.rs:3480-3485 | bindings/python/rapier-py-3d/src/pipeline.rs:3513-3518 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/geometry.rs:4748` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 4) bindings/typescript/src/dynamics/impulse_joint_set.rs:75— bindings/typescript/src/dynamics/impulse_joint_set.rs:75-80 | bindings/typescript/src/dynamics/rigid_body_set.rs:236-241 | bindings/typescript/src/dynamics/soft_body.rs:1189-1194 | bindings/typescript/src/geometry/collider_set.rs:560-565 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (6 lines × 4) bindings/typescript/src/control/character_controller.rs:283— bindings/typescript/src/control/character_controller.rs:283-288 | bindings/typescript/src/control/character_controller.rs:298-303 | bindings/typescript/src/geometry/point.rs:25-30 | bindings/typescript/src/geometry/ray.rs:22-27 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 3) bindings/bevy_rapier/src/plugin/systems/rigid_body.rs:386— bindings/bevy_rapier/src/plugin/systems/rigid_body.rs:386-391 | bindings/bevy_rapier/src/plugin/systems/rigid_body.rs:396-401 | bindings/bevy_rapier/src/plugin/systems/rigid_body.rs:423-428 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/bevy_rapier/src/plugin/systems/rigid_body.rs:386` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) bindings/c/src/extra.rs:481— bindings/c/src/extra.rs:481-486 | bindings/c/src/joint_extras.rs:130-135 | bindings/c/src/joints.rs:394-399 — before extracting anything, compare `bindings/c/src/extra.rs` and `bindings/c/src/joints.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/extra.rs:481` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) bindings/c/src/handle_access.rs:1109— bindings/c/src/handle_access.rs:1109-1114 | bindings/c/src/scoped_access.rs:175-180 | bindings/c/src/soft_extras.rs:23-28 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/handle_access.rs:1109` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) bindings/c/src/handle_access.rs:1620— bindings/c/src/handle_access.rs:1620-1625 | bindings/c/src/handle_access.rs:1656-1661 | bindings/c/src/scoped_access.rs:9-14 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/handle_access.rs:1620` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `out` to `*mut i8` in one and `*mut usize` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 3) bindings/c/src/objects.rs:328— bindings/c/src/objects.rs:328-333 | bindings/c/src/scoped_access.rs:219-224 | bindings/c/src/scoped_access.rs:241-246 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/objects.rs:328` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) bindings/c/src/dynamics.rs:615— bindings/c/src/dynamics.rs:615-620 | bindings/c/src/geometry.rs:471-476 | bindings/c/src/joints.rs:227-232 — before extracting anything, compare `bindings/c/src/dynamics.rs` and `bindings/c/src/geometry.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/dynamics.rs:615` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) bindings/c/src/soft_body.rs:15— bindings/c/src/soft_body.rs:15-20 | bindings/c/src/soft_body.rs:708-713 | bindings/c/src/soft_body.rs:802-807 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
IslandManager::update_substep_groups (cognitive 49) src/dynamics/island_manager/substep_groups.rs:63— IslandManager::update_substep_groups has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 15 (17 pts), boolean chains 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IslandManager::wake_up (cognitive 24) src/dynamics/island_manager/sleep.rs:31— IslandManager::wake_up has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (8 pts), match/switch 1 (5 pts) (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
IslandManager::update_soft_body_attachments (cognitive 23) src/dynamics/island_manager/manager.rs:202— IslandManager::update_soft_body_attachments has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (7 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
IslandManager::update_multibody_chain (cognitive 22) src/dynamics/island_manager/manager.rs:169— IslandManager::update_multibody_chain has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
IslandManager::update_islands (cognitive 22) src/dynamics/island_manager/manager.rs:390— IslandManager::update_islands has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 5 (8 pts), boolean chains 2 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
IslandManager::commit_sleeping_chunks (cognitive 17) src/dynamics/island_manager/sleep.rs:81— IslandManager::commit_sleeping_chunks has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 2, boolean chains 1 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×6
Edited copy of a member (18 corresponding lines) src_testbed/graphics.rs:46— src_testbed/graphics.rs:46-65 | src_testbed/graphics.rs:69-86 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) bindings/python/rapier-py-3d/src/joints.rs:2207— bindings/python/rapier-py-3d/src/joints.rs:2207-2228 | bindings/python/rapier-py-3d/src/joints.rs:2232-2249 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) bindings/c/src/scoped_access.rs:64— bindings/c/src/scoped_access.rs:64-81 | bindings/c/src/soft_extras.rs:59-76 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/dynamics/soft_body/soft_body_builder/soft_body_builder_mesh_helpers.rs:197— src/dynamics/soft_body/soft_body_builder/soft_body_builder_mesh_helpers.rs:197-214 | src/dynamics/soft_body/soft_body_builder/soft_body_builder_mesh_helpers.rs:217-241 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) bindings/bevy_rapier/bevy_rapier_benches3d/src/pyramids.rs:6— bindings/bevy_rapier/bevy_rapier_benches3d/src/pyramids.rs:6-24 | examples3d/stress_tests/many_pyramids3.rs:10-27 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) bindings/python/rapier-py-3d/src/loaders.rs:353— bindings/python/rapier-py-3d/src/loaders.rs:353-370 | bindings/python/rapier-py-3d/src/loaders.rs:1198-1217 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×6
Edited copy of a member (4 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:1748— bindings/python/rapier-py-3d/src/dynamics.rs:1748-1751 | bindings/python/rapier-py-3d/src/joints.rs:2337-2340 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:1755— bindings/python/rapier-py-3d/src/dynamics.rs:1755-1758 | bindings/python/rapier-py-3d/src/joints.rs:2352-2355 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:1973— bindings/python/rapier-py-3d/src/dynamics.rs:1973-1976 | bindings/python/rapier-py-3d/src/joints.rs:2367-2370 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:2138— bindings/python/rapier-py-3d/src/dynamics.rs:2138-2143 | bindings/python/rapier-py-3d/src/joints.rs:2307-2310 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) bindings/bevy_rapier/src/geometry/shape_views/polyline.rs:25— bindings/bevy_rapier/src/geometry/shape_views/polyline.rs:25-28 | bindings/bevy_rapier/src/geometry/shape_views/trimesh.rs:33-36 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:881— bindings/python/rapier-py-3d/src/dynamics.rs:881-884 | bindings/python/rapier-py-3d/src/joints.rs:1013-1016 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (16 lines × 2) examples2d/convex_polygons2.rs:30— examples2d/convex_polygons2.rs:30-45 | examples2d/stress_tests/convex_polygons2.rs:30-45 — before extracting anything, compare `examples2d/convex_polygons2.rs` and `examples2d/stress_tests/convex_polygons2.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) examples2d/damping2.rs:8— examples2d/damping2.rs:8-23 | examples3d/damping3.rs:8-23 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/damping2.rs:8` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) examples3d/debug_rollback3.rs:43— examples3d/debug_rollback3.rs:43-58 | examples3d/debug_shape_modification3.rs:104-119 — before extracting anything, compare `examples3d/debug_rollback3.rs` and `examples3d/debug_shape_modification3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_rollback3.rs:43` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) examples3d/dynamic_trimesh3.rs:77— examples3d/dynamic_trimesh3.rs:77-92 | examples3d/voxels3.rs:85-100 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/dynamic_trimesh3.rs:77` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/harness_capsules3.py:26— bindings/python/rapier-testbed/rapier_testbed/examples3/harness_capsules3.py:26-41 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/capsules3.py:20-35 — before extracting anything, compare `bindings/python/rapier-testbed/rapier_testbed/examples3/harness_capsules3.py` and `bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/capsules3.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-testbed/rapier_testbed/examples3/harness_capsules3.py:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) examples2d/stress_tests/heightfield2.rs:53— examples2d/stress_tests/heightfield2.rs:53-68 | examples2d/stress_tests/vertical_stacks2.rs:46-61 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/stress_tests/heightfield2.rs:53` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:360— bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:360-370 | bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:385-394 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:360` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–11 lines × 2) bindings/c/src/soft_body.rs:1285— bindings/c/src/soft_body.rs:1285-1295 | bindings/c/src/soft_desc.rs:219-228 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/soft_body.rs:1285` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–11 lines × 2) examples2d/character_controller2.rs:161— examples2d/character_controller2.rs:161-171 | examples2d/platform2.rs:61-70 — before extracting anything, compare `examples2d/character_controller2.rs` and `examples2d/platform2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/character_controller2.rs:161` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) src/data/graph.rs:337— src/data/graph.rs:337-347 | src/data/graph.rs:373-382 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/data/graph.rs:337` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) src/dynamics/soft_body/soft_body_builder/soft_body_builder_mesh_helpers.rs:75— src/dynamics/soft_body/soft_body_builder/soft_body_builder_mesh_helpers.rs:75-85 | src/dynamics/soft_body/soft_body_builder/soft_body_builder_mesh_helpers.rs:97-106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/soft_body/soft_body_builder/soft_body_builder_mesh_helpers.rs:75` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:199— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:199-209 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:224-233 — before extracting anything, compare `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs` and `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:192` calls `zero` and `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:219` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 3) bindings/c/src/joint_desc.rs:242— bindings/c/src/joint_desc.rs:242-250 | bindings/c/src/joint_desc.rs:278-286 | bindings/c/src/soft_desc.rs:769-777 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 3) bindings/python/rapier-py-3d/src/dynamics.rs:2292— bindings/python/rapier-py-3d/src/dynamics.rs:2292-2300 | bindings/python/rapier-py-3d/src/geometry.rs:4431-4439 | bindings/python/rapier-py-3d/src/soft_body.rs:1411-1419 — before extracting anything, compare `bindings/python/rapier-py-3d/src/dynamics.rs` and `bindings/python/rapier-py-3d/src/geometry.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `base` to `rapier::dynamics::RigidBodyBuilder` in one and `rapier::geometry::ColliderBuilder` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 3) examples3d/debug_shape_modification3.rs:81— examples3d/debug_shape_modification3.rs:81-89 | examples3d/heightfield3.rs:54-62 | examples3d/trimesh3.rs:64-72 — before extracting anything, compare `examples3d/heightfield3.rs` and `examples3d/trimesh3.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_shape_modification3.rs:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) examples3d/joints3.rs:255— examples3d/joints3.rs:255-263 | examples3d/joints3.rs:309-317 | examples3d/stress_tests/joint_ball3.rs:11-19 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/joints3.rs:255` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) src/dynamics/joint/multibody_joint/unit_multibody_joint.rs:35— src/dynamics/joint/multibody_joint/unit_multibody_joint.rs:35-43 | src/dynamics/joint/multibody_joint/unit_multibody_joint.rs:98-106 | src/dynamics/joint/multibody_joint/unit_multibody_joint.rs:155-163 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) examples2d/soft_force_tearing2.rs:202— examples2d/soft_force_tearing2.rs:202-210 | examples2d/soft_tearing2.rs:157-165 | examples3d/soft_tearing3.rs:178-186 — before extracting anything, compare `examples2d/soft_force_tearing2.rs` and `examples2d/soft_tearing2.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8–9 lines × 2) examples2d/soft_pile2.rs:66— examples2d/soft_pile2.rs:66-74 | examples2d/stress_tests/soft_strips2.rs:41-48 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples2d/stress_tests/soft_strips2.rs:49` calls `self_contacts` and `examples2d/soft_pile2.rs:75` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8–9 lines × 2) examples3d/soft_cloth_stress3.rs:64— examples3d/soft_cloth_stress3.rs:64-71 | examples3d/soft_cloth_stress3.rs:86-94 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/soft_cloth_stress3.rs:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8–9 lines × 2) src/dynamics/solver/soft_constraint/soft_element_constraint_assembly.rs:520— src/dynamics/solver/soft_constraint/soft_element_constraint_assembly.rs:520-528 | src/dynamics/solver/soft_constraint/soft_element_constraint_assembly.rs:597-604 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8–9 lines × 2) bindings/bevy_rapier/src/plugin/narrow_phase.rs:55— bindings/bevy_rapier/src/plugin/narrow_phase.rs:55-62 | bindings/bevy_rapier/src/plugin/narrow_phase.rs:144-152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/bevy_rapier/src/plugin/narrow_phase.rs:55` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8–9 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/soft_bodies3.py:14— bindings/python/rapier-testbed/rapier_testbed/examples3/soft_bodies3.py:14-22 | bindings/python/rapier-testbed/rapier_testbed/examples3/soft_tearing3.py:14-21 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8–9 lines × 2) examples2d/stress_tests/soft_jellies2.rs:32— examples2d/stress_tests/soft_jellies2.rs:32-39 | examples3d/stress_tests/soft_jellies3.rs:46-54 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 4) bindings/c/src/geometry.rs:192— bindings/c/src/geometry.rs:192-199 | bindings/c/src/geometry.rs:213-220 | bindings/c/src/geometry.rs:741-748 | bindings/c/src/geometry.rs:804-811 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/geometry.rs:192` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) bindings/c/src/queries_extras.rs:49— bindings/c/src/queries_extras.rs:49-56 | bindings/c/src/world_queries.rs:245-252 | bindings/c/src/world_queries.rs:281-288 | bindings/c/src/world_queries.rs:319-326 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/queries_extras.rs:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) bindings/python/rapier-py-3d/src/dynamics.rs:3062— bindings/python/rapier-py-3d/src/dynamics.rs:3062-3069 | bindings/python/rapier-py-3d/src/geometry.rs:4945-4952 | bindings/python/rapier-py-3d/src/joints.rs:3176-3183 | bindings/python/rapier-py-3d/src/soft_body.rs:3651-3658 — before extracting anything, compare `bindings/python/rapier-py-3d/src/dynamics.rs` and `bindings/python/rapier-py-3d/src/geometry.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/dynamics.rs:3062` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) examples3d/debug_balls3.rs:18— examples3d/debug_balls3.rs:18-25 | examples3d/stress_tests/balls3.rs:18-25 | examples3d/stress_tests/many_sleep3.rs:17-24 | examples3d/stress_tests/many_static3.rs:17-24 — before extracting anything, compare `examples3d/stress_tests/balls3.rs` and `examples3d/stress_tests/many_sleep3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_balls3.rs:18` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) examples3d/heightfield3.rs:15— examples3d/heightfield3.rs:15-22 | examples3d/stress_tests/heightfield3.rs:15-22 | examples3d/stress_tests/trimesh3.rs:15-22 | examples3d/trimesh3.rs:15-22 — before extracting anything, compare `examples3d/heightfield3.rs` and `examples3d/stress_tests/heightfield3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/heightfield3.rs:15` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:117— src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:117-124 | src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:224-231 | src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:326-333 | src/geometry/narrow_phase/soft_contacts/soft_self_contacts.rs:475-482 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
ParseState::parse_asset (cyclomatic 48) crates/mjcf-rs/src/loader/asset.rs:23— ParseState::parse_asset has cyclomatic complexity 48 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ParseState::parse_equality (cyclomatic 34) crates/mjcf-rs/src/loader/blocks.rs:72— ParseState::parse_equality has cyclomatic complexity 34 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ParseState::parse_compiler (cyclomatic 26) crates/mjcf-rs/src/loader/compiler_opts.rs:13— ParseState::parse_compiler has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ParseState::process_root_children (cyclomatic 21) crates/mjcf-rs/src/loader/state.rs:80— ParseState::process_root_children has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ParseState::parse_contact (cyclomatic 17) crates/mjcf-rs/src/loader/blocks.rs:25— ParseState::parse_contact has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ParseState::parse_actuator_block (cyclomatic 28) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
ParseState::parse_equality (cognitive 63) crates/mjcf-rs/src/loader/blocks.rs:72— ParseState::parse_equality has cognitive complexity 63 (threshold 15). Drivers by points: loops 8 (25 pts), match/switch 6 (21 pts), if/else 3 (17 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseState::parse_asset (cognitive 49) crates/mjcf-rs/src/loader/asset.rs:23— ParseState::parse_asset has cognitive complexity 49 (threshold 15). Drivers by points: match/switch 6 (23 pts), if/else 5 (13 pts), loops 5 (13 pts) (nesting depth added 33). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ParseState::merge_equality (cognitive 27) crates/mjcf-rs/src/loader/attach.rs:145— ParseState::merge_equality has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (24 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseState::parse_tendon (cognitive 18) crates/mjcf-rs/src/loader/blocks.rs:335— ParseState::parse_tendon has cognitive complexity 18 (threshold 15). Drivers by points: if/else 2 (8 pts), match/switch 2 (6 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseState::parse_contact (cognitive 17) crates/mjcf-rs/src/loader/blocks.rs:25— ParseState::parse_contact has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (10 pts), loops 3 (7 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SoftBodySet::apply_user_changes (cognitive 60) src/dynamics/soft_body/soft_body_set/soft_body_set_step_sync.rs:21— SoftBodySet::apply_user_changes has cognitive complexity 60 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 9 (24 pts), boolean chains 5 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBodySet::split_cluster (cognitive 49) src/dynamics/soft_body/soft_body_set/soft_body_set_split.rs:122— SoftBodySet::split_cluster has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (29 pts), match/switch 3 (10 pts), loops 7 (9 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBodySet::sync_particle_positions_and_collect (cognitive 39) src/dynamics/soft_body/soft_body_set/soft_body_set_step_sync.rs:211— SoftBodySet::sync_particle_positions_and_collect has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBodySet::split_body_along (cognitive 35) src/dynamics/soft_body/soft_body_set/soft_body_set_split.rs:333— SoftBodySet::split_body_along has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 9 (16 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBodySet::insert (cognitive 18) src/dynamics/soft_body/soft_body_set/soft_body_set_insert_remove.rs:17— SoftBodySet::insert has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBodyBuilder::build (cognitive 49) src/dynamics/soft_body/soft_body_builder/soft_body_build.rs:31— SoftBodyBuilder::build has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (30 pts), loops 11 (18 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBodyBuilder::cloth (cognitive 27) src/dynamics/soft_body/soft_body_builder/soft_body_builder_shapes.rs:205— SoftBodyBuilder::cloth has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBodyBuilder::cuboid (cognitive 21) src/dynamics/soft_body/soft_body_builder/soft_body_builder_shapes.rs:359— SoftBodyBuilder::cuboid has cognitive complexity 21 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 2 (5 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SoftBodyBuilder::cloth_tube (cognitive 17) src/dynamics/soft_body/soft_body_builder/soft_body_builder_shapes.rs:258— SoftBodyBuilder::cloth_tube has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftBodyBuilder::trimesh (cognitive 16) src/dynamics/soft_body/soft_body_builder/soft_body_builder_shapes.rs:66— SoftBodyBuilder::trimesh has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DebugRenderPipeline::render_contacts (cognitive 49) src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:292— DebugRenderPipeline::render_contacts has cognitive complexity 49 (threshold 15). Drivers by points: loops 6 (26 pts), if/else 7 (23 pts) (nesting depth added 36). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DebugRenderPipeline::render_soft_bodies (cognitive 38) src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:152— DebugRenderPipeline::render_soft_bodies has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 7 (16 pts), match/switch 2 (5 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DebugRenderPipeline::render_colliders (cognitive 29) src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:493— DebugRenderPipeline::render_colliders has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (6 pts), match/switch 1 (5 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DebugRenderPipeline::render_joints (cognitive 20) src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:372— DebugRenderPipeline::render_joints has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DebugRenderPipeline::render_shape_pseudo_normals (cognitive 19) src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:608— DebugRenderPipeline::render_shape_pseudo_normals has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 4 (9 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×5
Members sharing a duplicated core (5 members, 50+ identical tokens) bindings/c/src/descriptors.rs:632— bindings/c/src/descriptors.rs:632-651 | bindings/c/src/joint_desc.rs:237-263 | bindings/c/src/joint_desc.rs:273-301 | bindings/c/src/soft_desc.rs:687-706 | bindings/c/src/soft_desc.rs:765-791 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) bindings/c/src/handle_access.rs:1446— bindings/c/src/handle_access.rs:1446-1461 | bindings/c/src/handle_access.rs:1480-1495 | bindings/c/src/handle_access.rs:1514-1529 | bindings/c/src/scoped_access.rs:1738-1753 | bindings/c/src/scoped_access.rs:3204-3219 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) examples2d/soft_joints2.rs:8— examples2d/soft_joints2.rs:8-295 | examples2d/soft_thin_features2.rs:7-130 | examples3d/soft_joints3.rs:8-368 | examples3d/soft_meshes3.rs:10-22 | examples3d/soft_thin_features3.rs:7-170 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) examples3d-f64/trimesh3_f64.rs:6— examples3d-f64/trimesh3_f64.rs:6-94 | examples3d/heightfield3.rs:5-101 | examples3d/stress_tests/heightfield3.rs:5-79 | examples3d/stress_tests/trimesh3.rs:5-84 | examples3d/trimesh3.rs:5-111 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) examples3d/debug_balls3.rs:4— examples3d/debug_balls3.rs:4-62 | examples3d/stress_tests/balls3.rs:5-56 | examples3d/stress_tests/many_kinematics3.rs:4-70 | examples3d/stress_tests/many_sleep3.rs:4-57 | examples3d/stress_tests/many_static3.rs:4-55 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×5
Edited copy of a member (23 corresponding lines) examples2d/utils/character.rs:207— examples2d/utils/character.rs:207-229 | examples3d/utils/character.rs:223-245 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/dynamics/solver/solver_body.rs:199— src/dynamics/solver/solver_body.rs:199-221 | src/dynamics/solver/solver_body.rs:304-335 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) bindings/python/rapier-py-3d/src/events_hooks.rs:879— bindings/python/rapier-py-3d/src/events_hooks.rs:879-905 | bindings/python/rapier-py-3d/src/events_hooks.rs:943-965 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) bindings/c/src/pipeline.rs:2186— bindings/c/src/pipeline.rs:2186-2210 | bindings/c/src/pipeline.rs:2217-2239 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/dynamics/solver/manifold_store.rs:100— src/dynamics/solver/manifold_store.rs:100-123 | src/dynamics/solver/manifold_store.rs:146-168 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×5
Edited copy of a member (19 corresponding lines) bindings/c/src/pipeline.rs:1233— bindings/c/src/pipeline.rs:1233-1251 | bindings/c/src/pipeline.rs:1261-1279 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) bindings/c/src/extra.rs:342— bindings/c/src/extra.rs:342-360 | bindings/c/src/extra.rs:450-468 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) bindings/c/src/control.rs:1020— bindings/c/src/control.rs:1020-1038 | bindings/c/src/control.rs:1085-1104 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) bindings/typescript/src/control/pid_controller.rs:214— bindings/typescript/src/control/pid_controller.rs:214-234 | bindings/typescript/src/control/pid_controller.rs:267-285 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) examples3d/stress_tests/stacks3.rs:39— examples3d/stress_tests/stacks3.rs:39-57 | examples3d/stress_tests/stacks3.rs:65-89 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×5
Edited copies of one member (3 members, 15+ corresponding lines) bindings/c/src/handle_access.rs:1358— bindings/c/src/handle_access.rs:1358-1379 | bindings/c/src/joint_extras.rs:44-58 | bindings/c/src/joint_extras.rs:63-77 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) bindings/c/src/extra.rs:478— bindings/c/src/extra.rs:478-493 | bindings/c/src/joint_extras.rs:127-142 | bindings/c/src/joints.rs:391-405 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) src/pipeline/query_pipeline.rs:298— src/pipeline/query_pipeline.rs:298-315 | src/pipeline/query_pipeline.rs:387-401 | src/pipeline/query_pipeline.rs:428-443 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) src_testbed/settings.rs:105— src_testbed/settings.rs:105-119 | src_testbed/settings.rs:131-148 | src_testbed/settings.rs:160-174 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) bindings/c/src/read_access.rs:579— bindings/c/src/read_access.rs:579-593 | bindings/c/src/read_access.rs:1275-1289 | bindings/c/src/soft_extras.rs:373-387 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×5
Edited copies of one member (3 members, 8+ corresponding lines) bindings/typescript/src/geometry/shape.rs:766— bindings/typescript/src/geometry/shape.rs:766-776 | bindings/typescript/src/geometry/shape.rs:848-855 | bindings/typescript/src/geometry/shape.rs:862-869 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:2864— bindings/python/rapier-py-3d/src/dynamics.rs:2864-2871 | bindings/python/rapier-py-3d/src/geometry.rs:4698-4705 | bindings/python/rapier-py-3d/src/soft_body.rs:3398-3405 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) bindings/bevy_rapier/src/geometry/collider_impl.rs:982— bindings/bevy_rapier/src/geometry/collider_impl.rs:982-989 | bindings/bevy_rapier/src/geometry/collider_impl.rs:1037-1047 | bindings/bevy_rapier/src/geometry/collider_impl.rs:1066-1079 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) bindings/bevy_rapier/src/plugin/context/mod.rs:374— bindings/bevy_rapier/src/plugin/context/mod.rs:374-381 | bindings/bevy_rapier/src/plugin/context/mod.rs:389-396 | bindings/bevy_rapier/src/plugin/context/mod.rs:507-514 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) bindings/python/rapier-py-3d/src/geometry.rs:4062— bindings/python/rapier-py-3d/src/geometry.rs:4062-4072 | bindings/python/rapier-py-3d/src/soft_body.rs:2569-2580 | bindings/typescript/src/geometry/shape.rs:810-817 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×5
Edited copy of a member (6 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:3034— bindings/python/rapier-py-3d/src/dynamics.rs:3034-3039 | bindings/python/rapier-py-3d/src/geometry.rs:4924-4929 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:2037— bindings/python/rapier-py-3d/src/dynamics.rs:2037-2042 | bindings/python/rapier-py-3d/src/dynamics.rs:2066-2071 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) bindings/python/rapier-py-3d/src/pipeline.rs:3590— bindings/python/rapier-py-3d/src/pipeline.rs:3590-3599 | bindings/python/rapier-py-3d/src/pipeline.rs:3653-3658 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) bindings/typescript/src/geometry/narrow_phase.rs:107— bindings/typescript/src/geometry/narrow_phase.rs:107-114 | bindings/typescript/src/geometry/ray.rs:64-69 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:1720— bindings/python/rapier-py-3d/src/dynamics.rs:1720-1725 | bindings/python/rapier-py-3d/src/geometry.rs:3637-3644 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×5
Edited copy of a member (7 corresponding lines) bindings/python/rapier-py-3d/src/controllers.rs:109— bindings/python/rapier-py-3d/src/controllers.rs:109-117 | bindings/python/rapier-py-3d/src/pipeline.rs:115-121 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/dynamics/joint/multibody_joint/multibody_joint_set.rs:419— src/dynamics/joint/multibody_joint/multibody_joint_set.rs:419-428 | src/dynamics/joint/multibody_joint/multibody_joint_set.rs:435-441 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:1670— bindings/python/rapier-py-3d/src/dynamics.rs:1670-1676 | bindings/python/rapier-py-3d/src/geometry.rs:3621-3628 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:2206— bindings/python/rapier-py-3d/src/dynamics.rs:2206-2213 | bindings/python/rapier-py-3d/src/joints.rs:2373-2379 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) bindings/c/src/dynamics.rs:668— bindings/c/src/dynamics.rs:668-674 | bindings/c/src/joints.rs:66-72 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (17 lines × 2) bindings/c/src/robotics.rs:172— bindings/c/src/robotics.rs:172-188 | bindings/c/src/robotics.rs:422-438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/robotics.rs:172` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) examples2d/s2d_high_mass_ratio_1.rs:8— examples2d/s2d_high_mass_ratio_1.rs:8-24 | examples2d/s2d_high_mass_ratio_2.rs:8-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (17 lines × 2) examples2d/sensor2.rs:52— examples2d/sensor2.rs:52-68 | examples3d/sensor3.rs:56-72 — before extracting anything, compare `examples2d/sensor2.rs` and `examples3d/sensor3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) examples3d/debug_articulations3.rs:17— examples3d/debug_articulations3.rs:17-33 | examples3d/joints3.rs:320-336 — before extracting anything, compare `examples3d/debug_articulations3.rs` and `examples3d/joints3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_articulations3.rs:17` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (17 lines × 2) src/dynamics/solver/staged_island_solver/worker.rs:748— src/dynamics/solver/staged_island_solver/worker.rs:748-764 | src/dynamics/solver/staged_island_solver/worker.rs:775-791 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/staged_island_solver/worker.rs:748` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) examples2d/b2d_compounds.rs:86— examples2d/b2d_compounds.rs:86-97 | examples2d/b2d_smash.rs:36-47 | examples2d/stress_tests/ragdolls2.rs:85-99 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/b2d_compounds.rs:86` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) examples2d/b2d_spinner.rs:80— examples2d/b2d_spinner.rs:80-91 | examples2d/s2d_joint_grid.rs:50-64 | examples2d/soft_pile2.rs:87-98 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/b2d_spinner.rs:80` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) examples3d/stress_tests/heightfield3.rs:18— examples3d/stress_tests/heightfield3.rs:18-29 | examples3d/stress_tests/trimesh3.rs:18-29 | examples3d/trimesh3.rs:18-29 — before extracting anything, compare `examples3d/stress_tests/heightfield3.rs` and `examples3d/stress_tests/trimesh3.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/stress_tests/heightfield3.rs:18` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) examples3d/stress_tests/boxes3.rs:43— examples3d/stress_tests/boxes3.rs:43-54 | examples3d/stress_tests/capsules3.rs:44-55 | examples3d/stress_tests/ray_cast3.rs:43-54 — before extracting anything, compare `examples3d/stress_tests/boxes3.rs` and `examples3d/stress_tests/capsules3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/stress_tests/boxes3.rs:43` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) examples3d/stress_tests/many_kinematics3.rs:38— examples3d/stress_tests/many_kinematics3.rs:38-49 | examples3d/stress_tests/many_sleep3.rs:40-51 | examples3d/stress_tests/many_static3.rs:38-49 — before extracting anything, compare `examples3d/stress_tests/many_sleep3.rs` and `examples3d/stress_tests/many_static3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/stress_tests/many_kinematics3.rs:38` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 4) bindings/c/src/control.rs:988— bindings/c/src/control.rs:988-992 | bindings/c/src/control.rs:1051-1055 | bindings/c/src/read_access.rs:16-20 | bindings/c/src/read_access.rs:48-52 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/control.rs:988` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 4) bindings/c/src/handle_access.rs:1362— bindings/c/src/handle_access.rs:1362-1366 | bindings/c/src/joint_extras.rs:48-52 | bindings/c/src/joint_extras.rs:67-71 | bindings/c/src/joints.rs:341-345 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 4) bindings/typescript/src/control/character_controller.rs:276— bindings/typescript/src/control/character_controller.rs:276-280 | bindings/typescript/src/control/character_controller.rs:291-295 | bindings/typescript/src/geometry/point.rs:17-21 | bindings/typescript/src/geometry/ray.rs:14-18 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 4) src/dynamics/rigid_body_set.rs:307— src/dynamics/rigid_body_set.rs:307-311 | src/dynamics/rigid_body_set.rs:365-369 | src/geometry/collider_set.rs:500-504 | src/geometry/collider_set.rs:544-548 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/rigid_body_set.rs:365` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `&mut` in one and `crate) fn get_mut_internal_with_modification_tracking( &mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 4) bindings/python/rapier-py-3d/src/pipeline.rs:3609— bindings/python/rapier-py-3d/src/pipeline.rs:3609-3613 | bindings/python/rapier-py-3d/src/pipeline.rs:3668-3672 | bindings/python/rapier-py-3d/src/pipeline.rs:3696-3700 | bindings/python/rapier-py-3d/src/pipeline.rs:3724-3728 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
PersistentIslands::split_island_now (cognitive 53) src/dynamics/island_manager/global_split.rs:66— PersistentIslands::split_island_now has cognitive complexity 53 (threshold 15). Drivers by points: if/else 23 (40 pts), loops 9, match/switch 2 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PersistentIslands::move_component_out (cognitive 24) src/dynamics/island_manager/local_split.rs:321— PersistentIslands::move_component_out has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PersistentIslands::assert_consistent (cognitive 19) src/dynamics/island_manager/persistent.rs:804— PersistentIslands::assert_consistent has cognitive complexity 19 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 4 (8 pts), boolean chains 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PersistentIslands::resolve_removals (cognitive 18) src/dynamics/island_manager/local_split.rs:219— PersistentIslands::resolve_removals has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Conversion::build_serial_joint (cognitive 34) crates/rapier3d-mjcf/src/loader/joint.rs:17— Conversion::build_serial_joint has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 5 (9 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Conversion::materialize_body (cognitive 25) crates/rapier3d-mjcf/src/loader/conversion.rs:198— Conversion::materialize_body has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Conversion::bind_extras (cognitive 20) crates/rapier3d-mjcf/src/loader/conversion.rs:832— Conversion::bind_extras has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 3 (8 pts), loops 2, boolean chains 1 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Conversion::load_mesh_asset (cognitive 17) crates/rapier3d-mjcf/src/loader/geom.rs:143— Conversion::load_mesh_asset has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Multibody::update_mass_matrix (cognitive 32) src/dynamics/joint/multibody_joint/multibody.rs:819— Multibody::update_mass_matrix has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 6 (11 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Multibody::update_root_type (cognitive 30) src/dynamics/joint/multibody_joint/multibody.rs:1290— Multibody::update_root_type has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (8 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Multibody::update_acceleration (cognitive 26) src/dynamics/joint/multibody_joint/multibody.rs:528— Multibody::update_acceleration has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 3 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Multibody::remove_link (cognitive 23) src/dynamics/joint/multibody_joint/multibody.rs:187— Multibody::remove_link has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, loops 4 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphicsManager::add_missing_soft_body_graphics (cognitive 30) src_testbed/graphics/graphics_soft_bodies.rs:224— GraphicsManager::add_missing_soft_body_graphics has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphicsManager::draw (cognitive 18) src_testbed/graphics.rs:1236— GraphicsManager::draw has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, loops 3, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphicsManager::set_body_color (cognitive 17) src_testbed/graphics.rs:772— GraphicsManager::set_body_color has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphicsManager::add_body_render_mesh (cognitive 16) src_testbed/graphics.rs:374— GraphicsManager::add_body_render_mesh has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier3d_mjcf::loader::mass::add_frictionloss_to_multibody (cognitive 20) crates/rapier3d-mjcf/src/loader/mass.rs:285— rapier3d_mjcf::loader::mass::add_frictionloss_to_multibody has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier3d_mjcf::loader::mass::add_springdamper_to_multibody (cognitive 20) crates/rapier3d-mjcf/src/loader/mass.rs:389— rapier3d_mjcf::loader::mass::add_springdamper_to_multibody has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier3d_mjcf::loader::mass::move_motor_damping_to_multibody (cognitive 18) crates/rapier3d-mjcf/src/loader/mass.rs:169— rapier3d_mjcf::loader::mass::move_motor_damping_to_multibody has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier3d_mjcf::loader::mass::clamp_mass_properties (cognitive 16) crates/rapier3d-mjcf/src/loader/mass.rs:121— rapier3d_mjcf::loader::mass::clamp_mass_properties has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (25 lines × 2) bindings/typescript/src/geometry/collider_set.rs:86— bindings/typescript/src/geometry/collider_set.rs:86-110 | bindings/typescript/src/geometry/collider_set.rs:227-251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (25 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:509— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:509-533 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:573-597 — before extracting anything, compare `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs` and `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `constraint` to `&mut ContactWithCoulombFriction<SimdReal>` in one and `&mut ContactWithTwistFriction<SimdReal>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (25 lines × 2) examples2d/stress_tests/soft_fem_beams2.rs:28— examples2d/stress_tests/soft_fem_beams2.rs:28-52 | examples3d/stress_tests/soft_fem_beams3.rs:29-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/stress_tests/soft_fem_beams2.rs:28` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/pyramid3.py:12— bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/pyramid3.py:12-36 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/stacks3.py:14-38 — before extracting anything, compare `bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/pyramid3.py` and `bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/stacks3.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (21 lines × 2) bindings/python/rapier-py-3d/src/joints.rs:959— bindings/python/rapier-py-3d/src/joints.rs:959-979 | bindings/python/rapier-py-3d/src/joints.rs:4527-4547 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/joints.rs:959` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) src/data/arena.rs:928— src/data/arena.rs:928-948 | src/data/arena.rs:961-981 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/data/arena.rs:928` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) src/data/arena.rs:1037— src/data/arena.rs:1037-1057 | src/data/arena.rs:1070-1090 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/data/arena.rs:1037` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) src/dynamics/rigid_body_handle.rs:9— src/dynamics/rigid_body_handle.rs:9-29 | src/dynamics/soft_body/soft_body_handle.rs:9-29 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (20 lines × 2) examples2d/character_controller2.rs:178— examples2d/character_controller2.rs:178-197 | examples3d/character_controller3.rs:196-216 — before extracting anything, compare `examples2d/character_controller2.rs` and `examples3d/character_controller3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/character_controller2.rs:178` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) examples2d/joints2.rs:69— examples2d/joints2.rs:69-88 | examples2d/stress_tests/joint_ball2.rs:49-68 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/joints2.rs:69` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) examples2d/s2d_ball_and_chain.rs:62— examples2d/s2d_ball_and_chain.rs:62-81 | examples2d/s2d_bridge.rs:46-65 — before extracting anything, compare `examples2d/s2d_ball_and_chain.rs` and `examples2d/s2d_bridge.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/s2d_ball_and_chain.rs:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) examples3d/primitives3.rs:47— examples3d/primitives3.rs:47-66 | examples3d/stress_tests/ccd3.rs:51-70 — before extracting anything, compare `examples3d/primitives3.rs` and `examples3d/stress_tests/ccd3.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/primitives3.rs:47` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11–12 lines × 2) src/dynamics/island_manager/global_split.rs:226— src/dynamics/island_manager/global_split.rs:226-237 | src/dynamics/island_manager/global_split.rs:255-265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/island_manager/global_split.rs:226` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) src/dynamics/solver/staged_island_solver/joints.rs:187— src/dynamics/solver/staged_island_solver/joints.rs:187-198 | src/dynamics/solver/staged_island_solver/joints.rs:366-376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/staged_island_solver/joints.rs:187` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:240— bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:240-250 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/joint_ball3.py:18-29 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11–12 lines × 2) examples3d/stress_tests/stacks3.rs:47— examples3d/stress_tests/stacks3.rs:47-57 | examples3d/stress_tests/stacks3.rs:77-88 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/stress_tests/stacks3.rs:47` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) examples2d/character_controller2.rs:49— examples2d/character_controller2.rs:49-57 | examples2d/platform2.rs:31-40 — before extracting anything, compare `examples2d/character_controller2.rs` and `examples2d/platform2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/character_controller2.rs:49` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) examples2d/soft_plasticity2.rs:102— examples2d/soft_plasticity2.rs:102-111 | examples3d/soft_plasticity3.rs:113-121 — before extracting anything, compare `examples2d/soft_plasticity2.rs` and `examples3d/soft_plasticity3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_plasticity2.rs:102` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/trimesh3.py:28— bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/trimesh3.py:28-36 | bindings/python/rapier-testbed/rapier_testbed/examples3/trimesh3.py:63-72 — before extracting anything, compare `bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/trimesh3.py` and `bindings/python/rapier-testbed/rapier_testbed/examples3/trimesh3.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-testbed/rapier_testbed/examples3/trimesh3.py:63` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–10 lines × 2) bindings/python/examples/hello_world.py:17— bindings/python/examples/hello_world.py:17-26 | bindings/python/examples/serde/snapshot_restore.py:17-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
StagedIslandSolver::init_and_solve (cyclomatic 49) src/dynamics/solver/staged_island_solver/init.rs:30— StagedIslandSolver::init_and_solve has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StagedIslandSolver::init_joints (cyclomatic 36) src/dynamics/solver/staged_island_solver/joints.rs:28— StagedIslandSolver::init_joints has cyclomatic complexity 36 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
StagedIslandSolver::single_group_joint_layout (cyclomatic 18) src/dynamics/solver/staged_island_solver/joints.rs:326— StagedIslandSolver::single_group_joint_layout has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SoftBodySet::apply_user_changes (cyclomatic 26) src/dynamics/soft_body/soft_body_set/soft_body_set_step_sync.rs:21— SoftBodySet::apply_user_changes has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftBodySet::split_cluster (cyclomatic 23) src/dynamics/soft_body/soft_body_set/soft_body_set_split.rs:122— SoftBodySet::split_cluster has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftBodySet::split_body_along (cyclomatic 19) src/dynamics/soft_body/soft_body_set/soft_body_set_split.rs:333— SoftBodySet::split_body_along has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PhysicsPipeline::step_inner (cyclomatic 24) src/pipeline/physics_pipeline/substep.rs:309— PhysicsPipeline::step_inner has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PhysicsPipeline::build_islands_and_solve_velocity_constraints (cyclomatic 18) src/pipeline/physics_pipeline/solve.rs:163— PhysicsPipeline::build_islands_and_solve_velocity_constraints has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PhysicsPipeline::advance_to_final_positions (cyclomatic 17) src/pipeline/physics_pipeline/substep.rs:86— PhysicsPipeline::advance_to_final_positions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DebugRenderPipeline::render_shape (cyclomatic 20) src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:667— DebugRenderPipeline::render_shape has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: DebugRenderPipeline::render_shape (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
DebugRenderPipeline::render_soft_bodies (cyclomatic 19) src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:152— DebugRenderPipeline::render_soft_bodies has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: DebugRenderPipeline::render_shape (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
DebugRenderPipeline::render_joints (cyclomatic 16) src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:372— DebugRenderPipeline::render_joints has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: DebugRenderPipeline::render_shape (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Repeated repair: src/control/character_controller.rs src/control/character_controller.rs:496— src/control/character_controller.rs changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is KinematicCharacterController::detect_grounded_status_and_apply_friction at line 496), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix character controller manifold collection (#1004)”; “fix: KCC should allow grounding with no up movement (#481)”; “chore: CI fix”; “fix: apply character controller impulses at the collider's world contact point”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-12 14:08:56 +02:00' --until='2026-10-10 14:08:56 +02:00' --full-history --no-merges -- src/control/character_controller.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/dynamics/solver/joint_constraint/joint_constraint_builder.rs src/dynamics/solver/joint_constraint/joint_constraint_builder.rs:358— src/dynamics/solver/joint_constraint/joint_constraint_builder.rs changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is JointConstraintBuilderSimd::update at line 358), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix various CCD and broad-phase related bugs (#1012)”; “fix: allow angular limits on the full circle”; “Fix SIMD joint constraints (#953)”; “chore: CI fixes”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-12 14:08:56 +02:00' --until='2026-10-10 14:08:56 +02:00' --full-history --no-merges -- src/dynamics/solver/joint_constraint/joint_constraint_builder.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/dynamics/joint/generic_joint.rs src/dynamics/joint/generic_joint.rs:405— src/dynamics/joint/generic_joint.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is GenericJoint::set_enabled at line 405), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix various CCD and broad-phase related bugs (#1012)”; “fix: allow angular limits on the full circle”; “fix: complete joint axis frames with a twist-consistent minimal rotation”; “chore: CI fixes”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-12..2026-10-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-12 14:08:56 +02:00' --until='2026-10-10 14:08:56 +02:00' --full-history --no-merges -- src/dynamics/joint/generic_joint.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
StagedIslandSolver::init_and_solve (cognitive 113) src/dynamics/solver/staged_island_solver/init.rs:30— StagedIslandSolver::init_and_solve has cognitive complexity 113 (threshold 15). Drivers by points: if/else 25 (61 pts), loops 22 (48 pts), boolean chains 4 (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StagedIslandSolver::init_joints (cognitive 96) src/dynamics/solver/staged_island_solver/joints.rs:28— StagedIslandSolver::init_joints has cognitive complexity 96 (threshold 15). Drivers by points: loops 18 (57 pts), if/else 12 (31 pts), boolean chains 8 (nesting depth added 58). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
StagedIslandSolver::single_group_joint_layout (cognitive 31) src/dynamics/solver/staged_island_solver/joints.rs:326— StagedIslandSolver::single_group_joint_layout has cognitive complexity 31 (threshold 15). Drivers by points: loops 9 (18 pts), if/else 4 (8 pts), boolean chains 5 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
MjcfRobotHandles::apply_keyframe (cognitive 50) crates/rapier3d-mjcf/src/loader/runtime.rs:231— MjcfRobotHandles::apply_keyframe has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (42 pts), loops 3 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MjcfRobotHandles::apply_keyframe (cognitive 29) crates/rapier3d-mjcf/src/loader/runtime.rs:356— MjcfRobotHandles::apply_keyframe has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 4, boolean chains 2, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MjcfRobotHandles::contact_hooks (cognitive 23) crates/rapier3d-mjcf/src/loader/runtime.rs:73— MjcfRobotHandles::contact_hooks has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (7 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PhysicsPipeline::step_inner (cognitive 47) src/pipeline/physics_pipeline/substep.rs:309— PhysicsPipeline::step_inner has cognitive complexity 47 (threshold 15). Drivers by points: if/else 20 (35 pts), loops 7, match/switch 1 (3 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PhysicsPipeline::advance_to_final_positions (cognitive 40) src/pipeline/physics_pipeline/substep.rs:86— PhysicsPipeline::advance_to_final_positions has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 5 (9 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PhysicsPipeline::build_islands_and_solve_velocity_constraints (cognitive 19) src/pipeline/physics_pipeline/solve.rs:163— PhysicsPipeline::build_islands_and_solve_velocity_constraints has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 3, match/switch 2 (nesting depth added 2). Of this number, 16 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
KinematicCharacterController::detect_grounded_status_and_apply_friction (cognitive 46) src/control/character_controller.rs:496— KinematicCharacterController::detect_grounded_status_and_apply_friction has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (34 pts), loops 4 (12 pts) (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
KinematicCharacterController::solve_single_character_collision_impulse (cognitive 21) src/control/character_controller.rs:904— KinematicCharacterController::solve_single_character_collision_impulse has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (9 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KinematicCharacterController::check_and_fix_penetrations (cognitive 20) src/control/character_controller.rs:240— KinematicCharacterController::check_and_fix_penetrations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftFemSystem::writeback (cognitive 41) src/dynamics/solver/soft_fem/system/soft_fem_system_assemble.rs:276— SoftFemSystem::writeback has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (33 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftFemSystem::assemble_operator (cognitive 31) src/dynamics/solver/soft_fem/system/soft_fem_system_assemble.rs:37— SoftFemSystem::assemble_operator has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 6 (10 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftFemSystem::assemble_springs (cognitive 19) src/dynamics/solver/soft_fem/system/soft_fem_system_assemble.rs:179— SoftFemSystem::assemble_springs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyFields: RprSoftBodyDesc bindings/c/src/soft_desc.rs:88— TooManyFields — 52 stored fields beside 3 methods. The bar is 30 stored fields; this is 22 over it, 1.73× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: SoftBody src/dynamics/soft_body/soft_body.rs:28— TooManyFields — 39 stored fields beside 107 methods. The bar is 30 stored fields; this is 9 over it, 1.30× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: SoftContact src/dynamics/solver/soft_constraint/soft_contact.rs:69— TooManyFields — 38 stored fields beside 9 methods. The bar is 30 stored fields; this is 8 over it, 1.27× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (6 members, 50+ identical tokens) examples2d/character_controller2.rs:9— examples2d/character_controller2.rs:9-197 | examples2d/inverse_kinematics2.rs:4-96 | examples2d/locked_rotations2.rs:7-54 | examples2d/pin_slot_joint2.rs:7-100 | examples2d/platform2.rs:4-89 | examples2d/rope_joints2.rs:7-83 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) examples2d/soft_blobs2.rs:7— examples2d/soft_blobs2.rs:7-66 | examples2d/soft_bodies2.rs:7-107 | examples2d/soft_force_tearing2.rs:9-197 | examples2d/soft_plasticity2.rs:8-144 | examples2d/soft_stress2.rs:9-110 | examples2d/soft_tearing2.rs:11-152 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:343— src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:343-409 | src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:421-458 | src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:514-564 | src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:574-626 | src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:638-673 | src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:736-789 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×3
Edited copy of a member (31 corresponding lines) bindings/python/rapier-testbed/rapier_testbed/_meshes.py:68— bindings/python/rapier-testbed/rapier_testbed/_meshes.py:68-99 | bindings/python/rapier-testbed/rapier_testbed/_meshes.py:331-361 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) examples3d/debug_multibody_ang_motor_pos3.rs:4— examples3d/debug_multibody_ang_motor_pos3.rs:4-34 | examples3d/locked_rotations3.rs:7-57 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) examples2d/utils/character.rs:93— examples2d/utils/character.rs:93-123 | examples3d/utils/character.rs:108-139 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (49 corresponding lines) · ×3
Edited copy of a member (49 corresponding lines) examples3d/mjcf3.rs:5— examples3d/mjcf3.rs:5-53 | examples3d/urdf3.rs:5-54 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (49 corresponding lines) src/dynamics/solver/contact_constraint/generic_contact_constraint_element.rs:460— src/dynamics/solver/contact_constraint/generic_contact_constraint_element.rs:460-508 | src/dynamics/solver/contact_constraint/generic_contact_constraint_element.rs:532-583 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (49 corresponding lines) examples2d/stress_tests/soft_jellies2.rs:9— examples2d/stress_tests/soft_jellies2.rs:9-57 | examples2d/stress_tests/soft_strips2.rs:8-58 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×3
Edited copy of a member (32 corresponding lines) bindings/typescript/src/dynamics/rigid_body_set.rs:102— bindings/typescript/src/dynamics/rigid_body_set.rs:102-140 | bindings/typescript/src/dynamics/rigid_body_set.rs:168-199 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) src/dynamics/island_manager/persistent.rs:573— src/dynamics/island_manager/persistent.rs:573-617 | src/dynamics/island_manager/persistent.rs:656-687 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) bindings/typescript/src/geometry/collider_set.rs:452— bindings/typescript/src/geometry/collider_set.rs:452-483 | bindings/typescript/src/geometry/collider_set.rs:517-549 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 9+ corresponding lines) · ×3
Edited copies of one member (6 members, 9+ corresponding lines) bindings/typescript/src/control/ray_cast_vehicle_controller.rs:127— bindings/typescript/src/control/ray_cast_vehicle_controller.rs:127-135 | bindings/typescript/src/control/ray_cast_vehicle_controller.rs:262-270 | bindings/typescript/src/control/ray_cast_vehicle_controller.rs:289-297 | bindings/typescript/src/control/ray_cast_vehicle_controller.rs:360-368 | bindings/typescript/src/control/ray_cast_vehicle_controller.rs:381-389 | bindings/typescript/src/control/ray_cast_vehicle_controller.rs:409-417 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
Edited copies of one member (6 members, 9+ corresponding lines) bindings/c/src/geometry.rs:5— bindings/c/src/geometry.rs:5-13 | bindings/c/src/geometry.rs:74-82 | bindings/c/src/geometry.rs:90-98 | bindings/c/src/geometry.rs:107-115 | bindings/c/src/geometry.rs:139-147 | bindings/c/src/geometry.rs:156-164 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
Edited copies of one member (6 members, 9+ corresponding lines) bindings/c/src/robotics.rs:642— bindings/c/src/robotics.rs:642-653 | bindings/c/src/soft_body.rs:482-490 | bindings/c/src/soft_body.rs:499-507 | bindings/c/src/soft_body.rs:516-524 | bindings/c/src/soft_body.rs:533-545 | bindings/c/src/soft_body.rs:554-562 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×3
Edited copy of a member (3 corresponding lines) bindings/c/src/robotics.rs:539— bindings/c/src/robotics.rs:539-541 | bindings/c/src/soft_extras.rs:396-398 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) bindings/python/rapier-py-3d/src/geometry.rs:2241— bindings/python/rapier-py-3d/src/geometry.rs:2241-2247 | bindings/typescript/src/geometry/shape.rs:801-803 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) bindings/bevy_rapier/src/geometry/shape_views/polyline.rs:20— bindings/bevy_rapier/src/geometry/shape_views/polyline.rs:20-22 | bindings/bevy_rapier/src/geometry/shape_views/trimesh.rs:26-30 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (27 lines × 2) examples2d/heightfield2.rs:14— examples2d/heightfield2.rs:14-40 | examples2d/stress_tests/heightfield2.rs:14-40 — before extracting anything, compare `examples2d/heightfield2.rs` and `examples2d/stress_tests/heightfield2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/heightfield2.rs:14` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (27 lines × 2) examples3d/b3d_rain.rs:168— examples3d/b3d_rain.rs:168-194 | examples3d/b3d_trees.rs:132-158 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (27 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:160— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:160-186 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:186-212 — before extracting anything, compare `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs` and `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:215` calls `from`, `pt_data`, `zero` and `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:187` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (22–23 lines × 2) bindings/python/rapier-py-3d/src/loaders.rs:839— bindings/python/rapier-py-3d/src/loaders.rs:839-860 | bindings/python/rapier-py-3d/src/loaders.rs:917-939 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/loaders.rs:839` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22–23 lines × 2) examples3d/keva3.rs:13— examples3d/keva3.rs:13-35 | examples3d/stress_tests/keva3.rs:13-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/keva3.rs:13` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22–23 lines × 2) bindings/python/rapier-testbed/rapier_testbed/_meshes.py:77— bindings/python/rapier-testbed/rapier_testbed/_meshes.py:77-99 | bindings/python/rapier-testbed/rapier_testbed/_meshes.py:340-361 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `lat` to `int = _SPHERE_LAT` in one and `int` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (21–22 lines × 2) examples2d/b2d_compounds.rs:10— examples2d/b2d_compounds.rs:10-31 | examples2d/b2d_junkyard.rs:16-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (21–22 lines × 2) examples2d/soft_tearing2.rs:119— examples2d/soft_tearing2.rs:119-139 | examples3d/soft_tearing3.rs:139-160 — before extracting anything, compare `examples2d/soft_tearing2.rs` and `examples3d/soft_tearing3.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_tearing2.rs:119` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21–22 lines × 2) examples3d/dynamic_trimesh3.rs:53— examples3d/dynamic_trimesh3.rs:53-73 | examples3d/voxels3.rs:54-75 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/dynamic_trimesh3.rs:53` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) examples2d/utils/character.rs:27— examples2d/utils/character.rs:27-48 | examples3d/utils/character.rs:28-49 — before extracting anything, compare `examples2d/utils/character.rs` and `examples3d/utils/character.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (22 lines × 2) examples3d/debug_chain_high_mass_ratio3.rs:52— examples3d/debug_chain_high_mass_ratio3.rs:52-73 | examples3d/debug_long_chain3.rs:43-64 — before extracting anything, compare `examples3d/debug_chain_high_mass_ratio3.rs` and `examples3d/debug_long_chain3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_chain_high_mass_ratio3.rs:52` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:705— src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:705-726 | src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:815-836 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/pipeline/debug_render_pipeline/debug_render_pipeline.rs:705` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 3) examples2d/damping2.rs:31— examples2d/damping2.rs:31-44 | examples2d/debug_vertical_column2.rs:33-46 | examples2d/s2d_arch.rs:95-108 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/damping2.rs:31` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 3) examples2d/heightfield2.rs:48— examples2d/heightfield2.rs:48-61 | examples2d/polyline2.rs:49-62 | examples2d/stress_tests/heightfield2.rs:48-61 — before extracting anything, compare `examples2d/heightfield2.rs` and `examples2d/polyline2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/heightfield2.rs:48` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 3) examples2d/soft_fem2.rs:30— examples2d/soft_fem2.rs:30-43 | examples3d/soft_fem3.rs:31-44 | examples3d/soft_fem3.rs:58-71 — before extracting anything, compare `examples2d/soft_fem2.rs` and `examples3d/soft_fem3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_fem2.rs:30` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) examples2d/heightfield2.rs:28— examples2d/heightfield2.rs:28-40 | examples2d/polyline2.rs:29-41 | examples2d/stress_tests/heightfield2.rs:28-40 — before extracting anything, compare `examples2d/heightfield2.rs` and `examples2d/polyline2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/heightfield2.rs:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) examples3d/debug_dynamic_collider_add3.rs:18— examples3d/debug_dynamic_collider_add3.rs:18-30 | examples3d/debug_rollback3.rs:18-30 | examples3d/debug_shape_modification3.rs:18-30 — before extracting anything, compare `examples3d/debug_dynamic_collider_add3.rs` and `examples3d/debug_rollback3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_dynamic_collider_add3.rs:18` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:128— src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:128-140 | src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:235-247 | src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:337-349 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/geometry/narrow_phase/soft_contacts/soft_contacts_classify.rs:128` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–13 lines × 2) bindings/c/src/soft_body.rs:736— bindings/c/src/soft_body.rs:736-745 | bindings/c/src/soft_body.rs:1240-1252 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/soft_body.rs:736` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–13 lines × 2) examples3d/character_controller3.rs:176— examples3d/character_controller3.rs:176-188 | examples3d/platform3.rs:68-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/character_controller3.rs:176` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–13 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:401— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:401-413 | src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:473-482 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:401` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 4) examples2d/soft_joints2.rs:18— examples2d/soft_joints2.rs:18-28 | examples2d/soft_thin_features2.rs:17-27 | examples3d/soft_joints3.rs:18-28 | examples3d/soft_thin_features3.rs:17-27 — before extracting anything, compare `examples2d/soft_joints2.rs` and `examples3d/soft_joints3.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_joints2.rs:18` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 4) examples3d/platform3.rs:8— examples3d/platform3.rs:8-18 | examples3d/primitives3.rs:8-18 | examples3d/rope_joints3.rs:11-21 | examples3d/vehicle_controller3.rs:9-19 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
Duplicated block (11 lines × 4) examples3d/stress_tests/compound3.rs:8— examples3d/stress_tests/compound3.rs:8-18 | examples3d/stress_tests/convex_polyhedron3.rs:10-20 | examples3d/stress_tests/keva3.rs:71-81 | examples3d/stress_tests/stacks3.rs:95-105 — before extracting anything, compare `examples3d/stress_tests/compound3.rs` and `examples3d/stress_tests/convex_polyhedron3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) examples2d/sensor2.rs:90— examples2d/sensor2.rs:90-100 | examples3d/ccd3.rs:139-152 | examples3d/sensor3.rs:99-109 — before extracting anything, compare `examples2d/sensor2.rs` and `examples3d/ccd3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/sensor2.rs:90` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) examples2d/sensor2.rs:62— examples2d/sensor2.rs:62-72 | examples3d/ccd3.rs:104-114 | examples3d/sensor3.rs:66-76 — before extracting anything, compare `examples2d/sensor2.rs` and `examples3d/ccd3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) bindings/python/rapier-py-3d/src/joints.rs:3431— bindings/python/rapier-py-3d/src/joints.rs:3431-3441 | bindings/python/rapier-py-3d/src/joints.rs:3459-3469 | bindings/python/rapier-py-3d/src/joints.rs:3567-3577 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/joints.rs:3431` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 4) examples2d/s2d_ball_and_chain.rs:35— examples2d/s2d_ball_and_chain.rs:35-43 | examples2d/s2d_ball_and_chain.rs:61-69 | examples2d/s2d_bridge.rs:32-40 | examples2d/s2d_bridge.rs:45-53 — before extracting anything, compare `examples2d/s2d_ball_and_chain.rs` and `examples2d/s2d_bridge.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 4) examples3d/debug_cylinder3.rs:26— examples3d/debug_cylinder3.rs:26-34 | examples3d/debug_shape_modification3.rs:61-69 | examples3d/primitives3.rs:23-31 | examples3d/stress_tests/ccd3.rs:24-32 — before extracting anything, compare `examples3d/debug_cylinder3.rs` and `examples3d/primitives3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 4) src/dynamics/solver/contact_constraint/contact_constraint_element.rs:257— src/dynamics/solver/contact_constraint/contact_constraint_element.rs:257-265 | src/dynamics/solver/contact_constraint/contact_constraint_element.rs:291-299 | src/dynamics/solver/contact_constraint/contact_constraint_element.rs:496-504 | src/dynamics/solver/contact_constraint/contact_constraint_element.rs:526-534 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/contact_constraint/contact_constraint_element.rs:257` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 4) bindings/c/src/control.rs:756— bindings/c/src/control.rs:756-764 | bindings/c/src/soft_body.rs:434-440 | bindings/c/src/soft_body.rs:630-638 | bindings/c/src/soft_body.rs:664-672 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/control.rs:756` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 4) bindings/c/src/extra.rs:451— bindings/c/src/extra.rs:451-457 | bindings/c/src/scoped_access.rs:1037-1043 | bindings/c/src/scoped_access.rs:1069-1075 | bindings/c/src/scoped_access.rs:1098-1104 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/extra.rs:451` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 4) examples2d/soft_jelly2.rs:72— examples2d/soft_jelly2.rs:72-78 | examples2d/soft_joints2.rs:268-274 | examples2d/soft_plasticity2.rs:117-123 | examples2d/soft_thin_features2.rs:118-124 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_jelly2.rs:72` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 5) bindings/c/src/handle_access.rs:1447— bindings/c/src/handle_access.rs:1447-1452 | bindings/c/src/handle_access.rs:1481-1486 | bindings/c/src/handle_access.rs:1515-1520 | bindings/c/src/scoped_access.rs:1739-1744 | bindings/c/src/scoped_access.rs:3205-3210 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/handle_access.rs:1447` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `out` to `*mut u16` in one and `*mut u32` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 5) examples3d-f64/trimesh3_f64.rs:16— examples3d-f64/trimesh3_f64.rs:16-21 | examples3d/heightfield3.rs:15-20 | examples3d/stress_tests/heightfield3.rs:15-20 | examples3d/stress_tests/trimesh3.rs:15-20 | examples3d/trimesh3.rs:15-20 — before extracting anything, compare `examples3d/heightfield3.rs` and `examples3d/stress_tests/heightfield3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d-f64/trimesh3_f64.rs:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 5) examples3d/debug_self_intersect3.rs:221— examples3d/debug_self_intersect3.rs:221-226 | examples3d/soft_cloth_stress3.rs:119-124 | examples3d/soft_jelly3.rs:125-130 | examples3d/soft_joints3.rs:333-338 | examples3d/soft_plasticity3.rs:127-132 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_self_intersect3.rs:221` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) bindings/c/src/pipeline.rs:948— bindings/c/src/pipeline.rs:948-952 | bindings/c/src/pipeline.rs:969-973 | bindings/c/src/pipeline.rs:1020-1025 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/pipeline.rs:948` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `c` to `&PairFilterContext` in one and `&mut ContactModificationContext` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 3) bindings/python/rapier-py-3d/src/dynamics.rs:2867— bindings/python/rapier-py-3d/src/dynamics.rs:2867-2871 | bindings/python/rapier-py-3d/src/geometry.rs:4701-4705 | bindings/python/rapier-py-3d/src/soft_body.rs:3401-3405 — before extracting anything, compare `bindings/python/rapier-py-3d/src/dynamics.rs` and `bindings/python/rapier-py-3d/src/geometry.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `impl FnOnce(&rapier::dynamics::RigidBodySet) -> R` in one and `impl FnOnce(&rapier::geometry::ColliderSet) -> R` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 3) bindings/python/rapier-testbed/rapier_testbed/examples3/dynamic_trimesh3.py:78— bindings/python/rapier-testbed/rapier_testbed/examples3/dynamic_trimesh3.py:78-82 | bindings/python/rapier-testbed/rapier_testbed/examples3/vehicle_controller3.py:95-99 | bindings/python/rapier-testbed/rapier_testbed/examples3/vehicle_joints3.py:28-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-testbed/rapier_testbed/examples3/dynamic_trimesh3.py:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Low cohesion: SoftBody (LCOM4 11) bindings/bevy_rapier/src/dynamics/soft_body.rs:92— SoftBody's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: SolverVel (LCOM4 5) src/dynamics/solver/solver_body.rs:168— SolverVel's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: GenericJoint (LCOM4 4) src/dynamics/joint/generic_joint.rs:276— GenericJoint's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Duplicated block (25 lines × 2 locations) bindings/typescript/src.ts/dynamics/impulse_joint_set.ts:110— bindings/typescript/src.ts/dynamics/impulse_joint_set.ts:110 · bindings/typescript/src.ts/dynamics/multibody_joint_set.ts:90 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (25 lines × 2 locations) bindings/typescript/src.ts/geometry/shape.ts:1891— bindings/typescript/src.ts/geometry/shape.ts:1891 · bindings/typescript/src.ts/geometry/shape.ts:1966 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (25 lines × 2 locations) bindings/typescript/src.ts/geometry/toi.ts:66— bindings/typescript/src.ts/geometry/toi.ts:66 · bindings/typescript/src.ts/geometry/toi.ts:146 — all 2 copies are in the same file, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents.
Duplicated block (10 lines × 2 locations) bindings/typescript/src.ts/dynamics/rigid_body.ts:1300— bindings/typescript/src.ts/dynamics/rigid_body.ts:1300 · bindings/typescript/src.ts/dynamics/rigid_body.ts:1322 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (10 lines × 2 locations) bindings/typescript/src.ts/dynamics/soft_body.ts:1629— bindings/typescript/src.ts/dynamics/soft_body.ts:1629 · bindings/typescript/src.ts/dynamics/soft_body.ts:1789 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (10 lines × 2 locations) bindings/typescript/testbed3d/src/Graphics.ts:216— bindings/typescript/testbed3d/src/Graphics.ts:216 · bindings/typescript/testbed3d/src/Graphics.ts:227 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
SoftFemSet::compute_responses (cyclomatic 45) src/dynamics/solver/soft_fem/soft_fem_set.rs:375— SoftFemSet::compute_responses has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftFemSet::plan_responses (cyclomatic 37) src/dynamics/solver/soft_fem/soft_fem_set.rs:182— SoftFemSet::plan_responses has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rapier_examples_3d::voxels3::run (cyclomatic 35) examples3d/voxels3.rs:11— rapier_examples_3d::voxels3::run has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rapier_examples_3d::vehicle_joints3::run (cyclomatic 18) examples3d/vehicle_joints3.rs:4— rapier_examples_3d::vehicle_joints3::run has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MjcfRobotHandles::apply_keyframe (cyclomatic 25) crates/rapier3d-mjcf/src/loader/runtime.rs:231— MjcfRobotHandles::apply_keyframe has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MjcfRobotHandles::apply_keyframe (cyclomatic 16) crates/rapier3d-mjcf/src/loader/runtime.rs:356— MjcfRobotHandles::apply_keyframe has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Conversion::build_serial_joint (cyclomatic 24) crates/rapier3d-mjcf/src/loader/joint.rs:17— Conversion::build_serial_joint has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Conversion::materialize_body (cyclomatic 17) crates/rapier3d-mjcf/src/loader/conversion.rs:198— Conversion::materialize_body has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Multibody::remove_link (cyclomatic 16) src/dynamics/joint/multibody_joint/multibody.rs:187— Multibody::remove_link has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Multibody::update_mass_matrix (cyclomatic 16) src/dynamics/joint/multibody_joint/multibody.rs:819— Multibody::update_mass_matrix has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftFemSet::compute_responses (cognitive 123) src/dynamics/solver/soft_fem/soft_fem_set.rs:375— SoftFemSet::compute_responses has cognitive complexity 123 (threshold 15). Drivers by points: if/else 22 (76 pts), loops 7 (23 pts), match/switch 5 (16 pts), boolean chains 8 (nesting depth added 81). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftFemSet::plan_responses (cognitive 65) src/dynamics/solver/soft_fem/soft_fem_set.rs:182— SoftFemSet::plan_responses has cognitive complexity 65 (threshold 15). Drivers by points: if/else 16 (39 pts), loops 10 (15 pts), boolean chains 11 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RapierContextSimulation::step_simulation (cognitive 42) bindings/bevy_rapier/src/plugin/context/mod.rs:2188— RapierContextSimulation::step_simulation has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 5 (14 pts), match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RapierContextSimulation::remove_soft_body (cognitive 24) bindings/bevy_rapier/src/plugin/context/mod.rs:2033— RapierContextSimulation::remove_soft_body has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 3 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IslandGraph::for_each_neighbor (cognitive 33) src/dynamics/island_manager/local_split.rs:76— IslandGraph::for_each_neighbor has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 7 (12 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IslandGraph::for_each_incident_link (cognitive 23) src/dynamics/island_manager/local_split.rs:137— IslandGraph::for_each_incident_link has cognitive complexity 23 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 6 (9 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SoftCollisionMesh::remap_topology (cognitive 33) src/dynamics/soft_body/collision_mesh/collision_mesh_topology.rs:337— SoftCollisionMesh::remap_topology has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 5 (15 pts), match/switch 1 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SoftCollisionMesh::contact_is_ghost (cognitive 23) src/dynamics/soft_body/collision_mesh/collision_mesh_geometry.rs:190— SoftCollisionMesh::contact_is_ghost has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, loops 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TestbedViewer::handle_events (cognitive 33) src_testbed/viewer.rs:547— TestbedViewer::handle_events has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (16 pts), match/switch 5 (13 pts), boolean chains 2, loops 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TestbedViewer::handle_action_flags (cognitive 23) src_testbed/viewer.rs:655— TestbedViewer::handle_action_flags has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 5 (11 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftContact::update (cognitive 28) src/dynamics/solver/soft_constraint/soft_contact.rs:173— SoftContact::update has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 7 (12 pts), boolean chains 2 (nesting depth added 7). Of this number, 25 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SoftContact::apply (cognitive 23) src/dynamics/solver/soft_constraint/soft_contact.rs:286— SoftContact::apply has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mjcf_rs::loader::parse_utils::absolutize_model_assets (cognitive 23) crates/mjcf-rs/src/loader/parse_utils.rs:354— mjcf_rs::loader::parse_utils::absolutize_model_assets has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 3 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
mjcf_rs::loader::prototypes::merge_geom_proto (cognitive 17) crates/mjcf-rs/src/loader/prototypes.rs:179— mjcf_rs::loader::prototypes::merge_geom_proto has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D4 · Code Duplication· Near-duplicate member family (4 members, 21 shared lines) · ×2
Near-duplicate member family (4 members, 21 shared lines) examples3d/primitives3.rs:4— examples3d/primitives3.rs:4-78 | examples3d/stress_tests/capsules3.rs:4-63 | examples3d/stress_tests/ccd3.rs:4-78 | examples3d/stress_tests/convex_polyhedron3.rs:6-80 — These 4 members are variants of one another: a block of 21 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Near-duplicate member family (4 members, 21 shared lines) examples3d/stress_tests/compound3.rs:4— examples3d/stress_tests/compound3.rs:4-68 | examples3d/stress_tests/convex_polyhedron3.rs:6-80 | examples3d/stress_tests/keva3.rs:67-119 | examples3d/stress_tests/stacks3.rs:91-183 — These 4 members are variants of one another: a block of 21 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Members sharing a duplicated core (22 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (22 members, 50+ identical tokens) bindings/c/src/handle_access.rs:1389— bindings/c/src/handle_access.rs:1389-1407 | bindings/c/src/joint_access.rs:25-44 | bindings/c/src/joint_access.rs:67-86 | bindings/c/src/joint_access.rs:109-128 | bindings/c/src/joint_access.rs:151-170 | bindings/c/src/joint_access.rs:193-212 | bindings/c/src/joint_access.rs:235-254 | bindings/c/src/joint_access.rs:277-296 | bindings/c/src/joint_access.rs:319-338 | bindings/c/src/joint_access.rs:361-380 | bindings/c/src/joint_access.rs:403-422 | bindings/c/src/joint_access.rs:445-464 | bindings/c/src/joint_access.rs:487-506 | bindings/c/src/joint_access.rs:529-548 | bindings/c/src/joint_access.rs:578-599 | bindings/c/src/joint_access.rs:637-660 | bindings/c/src/joint_access.rs:687-707 | bindings/c/src/joint_access.rs:734-754 | bindings/c/src/joint_access.rs:777-796 | bindings/c/src/joint_access.rs:831-853 | bindings/c/src/joint_access.rs:885-906 | bindings/c/src/joints.rs:240-255 — These 22 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 22 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 22 times.
Members sharing a duplicated core (22 members, 50+ identical tokens) bindings/python/rapier-testbed/rapier_testbed/examples3/ccd3.py:40— bindings/python/rapier-testbed/rapier_testbed/examples3/ccd3.py:40-93 | bindings/python/rapier-testbed/rapier_testbed/examples3/collision_groups3.py:17-81 | bindings/python/rapier-testbed/rapier_testbed/examples3/compound3.py:17-89 | bindings/python/rapier-testbed/rapier_testbed/examples3/convex_polyhedron3.py:23-72 | bindings/python/rapier-testbed/rapier_testbed/examples3/domino3.py:14-69 | bindings/python/rapier-testbed/rapier_testbed/examples3/harness_capsules3.py:18-52 | bindings/python/rapier-testbed/rapier_testbed/examples3/inverse_kinematics3.py:19-55 | bindings/python/rapier-testbed/rapier_testbed/examples3/keva3.py:66-98 | bindings/python/rapier-testbed/rapier_testbed/examples3/locked_rotations3.py:12-47 | bindings/python/rapier-testbed/rapier_testbed/examples3/platform3.py:14-84 | bindings/python/rapier-testbed/rapier_testbed/examples3/primitives3.py:20-76 | bindings/python/rapier-testbed/rapier_testbed/examples3/restitution3.py:12-39 | bindings/python/rapier-testbed/rapier_testbed/examples3/sensor3.py:12-65 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/boxes3.py:12-45 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/capsules3.py:12-46 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/ccd3.py:12-62 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/compound3.py:12-54 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/convex_polyhedron3.py:20-60 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/keva3.py:13-44 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/pyramid3.py:40-59 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/stacks3.py:83-106 | bindings/python/rapier-testbed/rapier_testbed/examples3/vehicle_controller3.py:21-124 — These 22 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 22 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 22 times.
D4 · Code Duplication· Members sharing a duplicated core (16 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (16 members, 50+ identical tokens) bindings/c/src/handle_access.rs:159— bindings/c/src/handle_access.rs:159-174 | bindings/c/src/handle_access.rs:193-208 | bindings/c/src/handle_access.rs:874-889 | bindings/c/src/handle_access.rs:1691-1706 | bindings/c/src/objects.rs:164-179 | bindings/c/src/objects.rs:257-272 | bindings/c/src/scoped_access.rs:1427-1442 | bindings/c/src/scoped_access.rs:1969-1984 | bindings/c/src/scoped_access.rs:2002-2017 | bindings/c/src/scoped_access.rs:2068-2083 | bindings/c/src/scoped_access.rs:2101-2116 | bindings/c/src/scoped_access.rs:2134-2149 | bindings/c/src/scoped_access.rs:2167-2182 | bindings/c/src/scoped_access.rs:2200-2215 | bindings/c/src/scoped_access.rs:2753-2768 | bindings/c/src/scoped_access.rs:3404-3419 — These 16 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 16 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 16 times.
Members sharing a duplicated core (16 members, 50+ identical tokens) examples2d/s2d_ball_and_chain.rs:4— examples2d/s2d_ball_and_chain.rs:4-83 | examples2d/s2d_bridge.rs:4-67 | examples2d/s2d_card_house.rs:4-81 | examples2d/s2d_high_mass_ratio_1.rs:4-67 | examples2d/s2d_high_mass_ratio_2.rs:4-56 | examples2d/s2d_high_mass_ratio_3.rs:4-50 | examples2d/soft_blobs2.rs:7-66 | examples2d/soft_surface2.rs:7-129 | examples2d/stress_tests/soft_blobs2.rs:55-67 | examples2d/stress_tests/soft_cloth_keva2.rs:66-78 | examples2d/stress_tests/soft_fem_beams2.rs:62-74 | examples2d/stress_tests/soft_jellies2.rs:59-71 | examples2d/stress_tests/soft_ropes2.rs:49-61 | examples2d/stress_tests/soft_slab2.rs:73-85 | examples2d/stress_tests/soft_strips2.rs:60-72 | examples2d/voxels2.rs:7-112 — These 16 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 16 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 16 times.
D4 · Code Duplication· Members sharing a duplicated core (9 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (9 members, 50+ identical tokens) bindings/c/src/pipeline.rs:58— bindings/c/src/pipeline.rs:58-70 | bindings/c/src/pipeline.rs:131-144 | bindings/c/src/pipeline.rs:170-182 | bindings/c/src/pipeline.rs:209-221 | bindings/c/src/pipeline.rs:247-259 | bindings/c/src/pipeline.rs:285-297 | bindings/c/src/pipeline.rs:326-338 | bindings/c/src/pipeline.rs:1458-1470 | bindings/c/src/pipeline.rs:1494-1506 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
Members sharing a duplicated core (9 members, 50+ identical tokens) bindings/typescript/src/geometry/broad_phase.rs:40— bindings/typescript/src/geometry/broad_phase.rs:40-66 | bindings/typescript/src/geometry/broad_phase.rs:82-105 | bindings/typescript/src/geometry/broad_phase.rs:123-156 | bindings/typescript/src/geometry/broad_phase.rs:171-199 | bindings/typescript/src/geometry/broad_phase.rs:213-239 | bindings/typescript/src/geometry/broad_phase.rs:252-278 | bindings/typescript/src/geometry/broad_phase.rs:293-325 | bindings/typescript/src/geometry/broad_phase.rs:344-377 | bindings/typescript/src/geometry/broad_phase.rs:394-427 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (7 members, 50+ identical tokens) bindings/c/src/handle_access.rs:57— bindings/c/src/handle_access.rs:57-72 | bindings/c/src/handle_access.rs:91-106 | bindings/c/src/handle_access.rs:772-787 | bindings/c/src/scoped_access.rs:1604-1619 | bindings/c/src/scoped_access.rs:1639-1654 | bindings/c/src/scoped_access.rs:1672-1687 | bindings/c/src/scoped_access.rs:2668-2684 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) bindings/python/rapier-py-3d/src/joints.rs:948— bindings/python/rapier-py-3d/src/joints.rs:948-992 | bindings/python/rapier-py-3d/src/joints.rs:1219-1257 | bindings/python/rapier-py-3d/src/joints.rs:1501-1549 | bindings/python/rapier-py-3d/src/joints.rs:1791-1829 | bindings/python/rapier-py-3d/src/joints.rs:2051-2085 | bindings/python/rapier-py-3d/src/joints.rs:2595-2657 | bindings/python/rapier-py-3d/src/joints.rs:4516-4560 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Edited copy of a member (55 corresponding lines) · ×2
Edited copy of a member (55 corresponding lines) examples3d/keva3.rs:9— examples3d/keva3.rs:9-64 | examples3d/stress_tests/keva3.rs:11-65 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (55 corresponding lines) examples2d/stress_tests/ragdolls2.rs:6— examples2d/stress_tests/ragdolls2.rs:6-60 | examples3d/stress_tests/ragdolls3.rs:7-82 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×2
Edited copy of a member (44 corresponding lines) examples2d/utils/character.rs:131— examples2d/utils/character.rs:131-174 | examples3d/utils/character.rs:147-190 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (44 corresponding lines) src/dynamics/solver/contact_constraint/generic_contact_constraint.rs:603— src/dynamics/solver/contact_constraint/generic_contact_constraint.rs:603-646 | src/dynamics/solver/contact_constraint/generic_contact_constraint.rs:655-702 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×2
Edited copy of a member (38 corresponding lines) src/dynamics/solver/contact_constraint/contact_constraint_element.rs:383— src/dynamics/solver/contact_constraint/contact_constraint_element.rs:383-420 | src/dynamics/solver/contact_constraint/contact_constraint_element.rs:552-596 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) crates/rapier3d-urdf/src/lib.rs:539— crates/rapier3d-urdf/src/lib.rs:539-576 | crates/rapier3d-urdf/src/lib.rs:590-640 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (59 corresponding lines) · ×2
Edited copy of a member (59 corresponding lines) examples3d/joints3.rs:406— examples3d/joints3.rs:406-464 | examples3d/joints3.rs:471-531 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (59 corresponding lines) examples2d/stress_tests/ropes2.rs:4— examples2d/stress_tests/ropes2.rs:4-62 | examples3d/stress_tests/ropes3.rs:4-64 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (43 corresponding lines) · ×2
Edited copy of a member (43 corresponding lines) examples2d/damping2.rs:4— examples2d/damping2.rs:4-46 | examples3d/damping3.rs:4-46 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (43 corresponding lines) crates/rapier3d-mjcf/src/loader/conversion.rs:737— crates/rapier3d-mjcf/src/loader/conversion.rs:737-779 | crates/rapier3d-mjcf/src/loader/conversion.rs:781-830 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×2
Edited copy of a member (40 corresponding lines) examples2d/b2d_many_pyramids.rs:27— examples2d/b2d_many_pyramids.rs:27-75 | examples3d/b3d_many_pyramids.rs:30-69 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (40 corresponding lines) examples3d/debug_friction3.rs:4— examples3d/debug_friction3.rs:4-43 | examples3d/debug_infinite_fall3.rs:4-46 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×2
Edited copy of a member (24 corresponding lines) bindings/c/src/queries_extras.rs:317— bindings/c/src/queries_extras.rs:317-340 | bindings/c/src/queries_extras.rs:378-408 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) bindings/c/src/extra.rs:502— bindings/c/src/extra.rs:502-527 | bindings/c/src/joints.rs:481-504 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×2
Edited copies of one member (3 members, 18+ corresponding lines) bindings/c/src/handle_access.rs:1236— bindings/c/src/handle_access.rs:1236-1253 | bindings/c/src/scoped_access.rs:490-507 | bindings/c/src/scoped_access.rs:642-661 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 18+ corresponding lines) bindings/c/src/world_extras.rs:77— bindings/c/src/world_extras.rs:77-94 | bindings/c/src/world_extras.rs:107-124 | bindings/c/src/world_extras.rs:137-154 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×2
Edited copies of one member (3 members, 14+ corresponding lines) src/pipeline/physics_world.rs:691— src/pipeline/physics_world.rs:691-707 | src/pipeline/physics_world.rs:716-731 | src/pipeline/physics_world.rs:775-788 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) bindings/typescript/src/control/pid_controller.rs:145— bindings/typescript/src/control/pid_controller.rs:145-158 | bindings/typescript/src/control/pid_controller.rs:168-181 | bindings/typescript/src/control/pid_controller.rs:191-204 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×2
Edited copies of one member (3 members, 13+ corresponding lines) bindings/c/src/pipeline.rs:23— bindings/c/src/pipeline.rs:23-35 | bindings/c/src/pipeline.rs:93-105 | bindings/c/src/pipeline.rs:2122-2134 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) examples3d/stress_tests/soft_cloth_drape3.rs:73— examples3d/stress_tests/soft_cloth_drape3.rs:73-85 | examples3d/stress_tests/soft_cloth_keva3.rs:75-87 | examples3d/stress_tests/soft_fem_beams3.rs:63-75 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×2
Edited copies of one member (3 members, 9+ corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:1628— bindings/python/rapier-py-3d/src/dynamics.rs:1628-1636 | bindings/python/rapier-py-3d/src/geometry.rs:3530-3538 | bindings/python/rapier-py-3d/src/soft_body.rs:2469-2477 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) bindings/python/rapier-py-3d/src/joints.rs:3066— bindings/python/rapier-py-3d/src/joints.rs:3066-3076 | bindings/python/rapier-py-3d/src/joints.rs:4061-4069 | bindings/python/rapier-py-3d/src/joints.rs:4078-4090 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 6+ corresponding lines) · ×2
Edited copies of one member (4 members, 6+ corresponding lines) bindings/python/rapier-py-3d/src/loaders.rs:712— bindings/python/rapier-py-3d/src/loaders.rs:712-718 | bindings/python/rapier-py-3d/src/loaders.rs:737-745 | bindings/python/rapier-py-3d/src/loaders.rs:1815-1820 | bindings/python/rapier-py-3d/src/loaders.rs:1838-1844 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 6+ corresponding lines) bindings/c/src/dynamics.rs:696— bindings/c/src/dynamics.rs:696-707 | bindings/c/src/objects.rs:153-158 | bindings/c/src/objects.rs:247-252 | bindings/c/src/soft_body.rs:193-204 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×2
Edited copies of one member (3 members, 10+ corresponding lines) crates/mjcf-rs/src/model.rs:71— crates/mjcf-rs/src/model.rs:71-80 | crates/mjcf-rs/src/model.rs:83-92 | crates/mjcf-rs/src/model.rs:95-104 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 10+ corresponding lines) bindings/c/src/array_views.rs:272— bindings/c/src/array_views.rs:272-282 | bindings/c/src/array_views.rs:293-303 | bindings/c/src/array_views.rs:343-352 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×2
Edited copies of one member (3 members, 11+ corresponding lines) bindings/c/src/config_data.rs:585— bindings/c/src/config_data.rs:585-595 | bindings/c/src/handle_access.rs:468-481 | bindings/c/src/handle_access.rs:534-547 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) bindings/c/src/robotics.rs:455— bindings/c/src/robotics.rs:455-466 | bindings/c/src/robotics.rs:679-689 | bindings/c/src/robotics.rs:721-731 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 10+ corresponding lines) · ×2
Edited copies of one member (4 members, 10+ corresponding lines) bindings/typescript/src/geometry/narrow_phase.rs:171— bindings/typescript/src/geometry/narrow_phase.rs:171-180 | bindings/typescript/src/geometry/narrow_phase.rs:183-193 | bindings/typescript/src/geometry/narrow_phase.rs:196-205 | bindings/typescript/src/geometry/narrow_phase.rs:208-218 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 10+ corresponding lines) bindings/python/rapier-py-3d/src/geometry.rs:2571— bindings/python/rapier-py-3d/src/geometry.rs:2571-2581 | bindings/python/rapier-py-3d/src/geometry.rs:2591-2601 | bindings/python/rapier-py-3d/src/geometry.rs:4340-4349 | bindings/python/rapier-py-3d/src/geometry.rs:4360-4370 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×2
Edited copies of one member (3 members, 6+ corresponding lines) bindings/typescript/src/geometry/shape.rs:995— bindings/typescript/src/geometry/shape.rs:995-1009 | bindings/typescript/src/geometry/shape.rs:1018-1023 | bindings/typescript/src/geometry/shape.rs:1033-1038 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 6+ corresponding lines) bindings/typescript/src/dynamics/impulse_joint_set.rs:86— bindings/typescript/src/dynamics/impulse_joint_set.rs:86-91 | bindings/typescript/src/dynamics/island_manager.rs:25-30 | bindings/typescript/src/dynamics/multibody_joint_set.rs:79-84 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×2
Edited copies of one member (4 members, 11+ corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:1598— bindings/python/rapier-py-3d/src/dynamics.rs:1598-1608 | bindings/python/rapier-py-3d/src/geometry.rs:3502-3512 | bindings/python/rapier-py-3d/src/joints.rs:2802-2812 | bindings/python/rapier-py-3d/src/soft_body.rs:2427-2437 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 11+ corresponding lines) bindings/c/src/render.rs:243— bindings/c/src/render.rs:243-257 | bindings/c/src/render.rs:267-281 | bindings/c/src/robotics.rs:878-888 | bindings/c/src/world.rs:70-82 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (31–33 lines × 2) examples2d/s2d_high_mass_ratio_2.rs:22— examples2d/s2d_high_mass_ratio_2.rs:22-54 | examples2d/s2d_high_mass_ratio_3.rs:18-48 — before extracting anything, compare `examples2d/s2d_high_mass_ratio_2.rs` and `examples2d/s2d_high_mass_ratio_3.rs` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/s2d_high_mass_ratio_2.rs:22` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (31–33 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:623— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:623-655 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:702-732 — before extracting anything, compare `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs` and `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:623` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28–29 lines × 2) examples2d/pin_slot_joint2.rs:71— examples2d/pin_slot_joint2.rs:71-98 | examples2d/rope_joints2.rs:52-80 — before extracting anything, compare `examples2d/pin_slot_joint2.rs` and `examples2d/rope_joints2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (28–29 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:412— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:412-440 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:476-503 — before extracting anything, compare `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs` and `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (28 lines × 2) bindings/typescript/src/geometry/collider_set.rs:453— bindings/typescript/src/geometry/collider_set.rs:453-480 | bindings/typescript/src/geometry/collider_set.rs:518-545 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/typescript/src/geometry/collider_set.rs:453` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28 lines × 2) examples2d/pyramid2.rs:8— examples2d/pyramid2.rs:8-35 | examples2d/stress_tests/pyramid2.rs:8-35 — before extracting anything, compare `examples2d/pyramid2.rs` and `examples2d/stress_tests/pyramid2.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/pyramid2.rs:8` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26–28 lines × 2) src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:223— src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:223-250 | src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:346-371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (26–28 lines × 2) src/dynamics/solver/staged_island_solver/worker.rs:524— src/dynamics/solver/staged_island_solver/worker.rs:524-551 | src/dynamics/solver/staged_island_solver/worker.rs:565-590 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/staged_island_solver/worker.rs:524` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26 lines × 2) examples2d/utils/character.rs:132— examples2d/utils/character.rs:132-157 | examples3d/utils/character.rs:148-173 — before extracting anything, compare `examples2d/utils/character.rs` and `examples3d/utils/character.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/utils/character.rs:132` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26 lines × 2) examples3d/debug_dynamic_collider_add3.rs:8— examples3d/debug_dynamic_collider_add3.rs:8-33 | examples3d/debug_rollback3.rs:8-33 — before extracting anything, compare `examples3d/debug_dynamic_collider_add3.rs` and `examples3d/debug_rollback3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16–17 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:341— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:341-357 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:409-424 — before extracting anything, compare `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs` and `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:341` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 2) examples2d/stress_tests/soft_slab2.rs:43— examples2d/stress_tests/soft_slab2.rs:43-58 | examples3d/stress_tests/soft_slab3.rs:63-79 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/stress_tests/soft_slab2.rs:43` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 4) src/data/arena.rs:934— src/data/arena.rs:934-949 | src/data/arena.rs:967-982 | src/data/arena.rs:1043-1058 | src/data/arena.rs:1076-1091 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/data/arena.rs:934` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/data/arena.rs:951` calls `size_hint`, `Some` and `src/data/arena.rs:983` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 4) src/dynamics/joint/impulse_joint/impulse_joint_handle.rs:9— src/dynamics/joint/impulse_joint/impulse_joint_handle.rs:9-24 | src/dynamics/rigid_body_handle.rs:9-29 | src/dynamics/soft_body/soft_body_handle.rs:9-29 | src/geometry/collider_handle.rs:9-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (11–16 lines × 2) examples2d/soft_joints2.rs:18— examples2d/soft_joints2.rs:18-28 | examples3d/soft_joints3.rs:18-33 — before extracting anything, compare `examples2d/soft_joints2.rs` and `examples3d/soft_joints3.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_joints2.rs:18` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–16 lines × 2) examples3d/debug_articulations3.rs:40— examples3d/debug_articulations3.rs:40-55 | examples3d/joints3.rs:348-358 — before extracting anything, compare `examples3d/debug_articulations3.rs` and `examples3d/joints3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_articulations3.rs:40` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–16 lines × 2) examples2d/soft_joints2.rs:86— examples2d/soft_joints2.rs:86-100 | examples3d/soft_joints3.rs:117-132 — before extracting anything, compare `examples2d/soft_joints2.rs` and `examples3d/soft_joints3.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_joints2.rs:86` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–16 lines × 2) src/dynamics/solver/contact_constraint/contact_constraint_element.rs:400— src/dynamics/solver/contact_constraint/contact_constraint_element.rs:400-415 | src/dynamics/solver/contact_constraint/contact_constraint_element.rs:578-592 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/contact_constraint/contact_constraint_element.rs:400` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14–16 lines × 2) examples3d/joints3.rs:310— examples3d/joints3.rs:310-323 | examples3d/stress_tests/joint_ball3.rs:12-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/joints3.rs:310` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14–16 lines × 2) src/dynamics/solver/staged_island_solver/worker.rs:552— src/dynamics/solver/staged_island_solver/worker.rs:552-567 | src/dynamics/solver/staged_island_solver/worker.rs:765-778 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/staged_island_solver/worker.rs:552` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/dynamics/solver/staged_island_solver/worker.rs:549` calls `warmstart` and `src/dynamics/solver/staged_island_solver/worker.rs:762` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15 lines × 7) bindings/python/rapier-py-3d/src/joints.rs:949— bindings/python/rapier-py-3d/src/joints.rs:949-963 | bindings/python/rapier-py-3d/src/joints.rs:1220-1234 | bindings/python/rapier-py-3d/src/joints.rs:1502-1516 | bindings/python/rapier-py-3d/src/joints.rs:1792-1806 | bindings/python/rapier-py-3d/src/joints.rs:2052-2066 | bindings/python/rapier-py-3d/src/joints.rs:2596-2610 | bindings/python/rapier-py-3d/src/joints.rs:4517-4531 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/joints.rs:949` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `base` to `rapier::dynamics::FixedJointBuilder` in one and `rapier::dynamics::RevoluteJointBuilder` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (15 lines × 7) examples2d/soft_pile2.rs:9— examples2d/soft_pile2.rs:9-23 | examples2d/soft_surface2.rs:8-22 | examples2d/stress_tests/soft_blobs2.rs:10-24 | examples2d/stress_tests/soft_jellies2.rs:10-24 | examples2d/stress_tests/soft_ropes2.rs:9-23 | examples2d/stress_tests/soft_slab2.rs:10-24 | examples2d/stress_tests/soft_strips2.rs:9-23 — before extracting anything, compare `examples2d/stress_tests/soft_blobs2.rs` and `examples2d/stress_tests/soft_jellies2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 4) bindings/python/rapier-py-3d/src/pipeline.rs:1388— bindings/python/rapier-py-3d/src/pipeline.rs:1388-1401 | bindings/python/rapier-py-3d/src/pipeline.rs:1660-1673 | bindings/python/rapier-py-3d/src/pipeline.rs:1948-1961 | bindings/python/rapier-py-3d/src/pipeline.rs:2040-2053 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/pipeline.rs:1388` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 4) examples3d/heightfield3.rs:38— examples3d/heightfield3.rs:38-51 | examples3d/stress_tests/heightfield3.rs:38-51 | examples3d/stress_tests/trimesh3.rs:43-56 | examples3d/trimesh3.rs:48-61 — before extracting anything, compare `examples3d/heightfield3.rs` and `examples3d/stress_tests/heightfield3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/heightfield3.rs:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–14 lines × 2) bindings/c/src/world_queries.rs:368— bindings/c/src/world_queries.rs:368-381 | bindings/c/src/world_queries.rs:419-430 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/world_queries.rs:368` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–14 lines × 2) examples2d/soft_joints2.rs:49— examples2d/soft_joints2.rs:49-60 | examples3d/soft_joints3.rs:75-88 — before extracting anything, compare `examples2d/soft_joints2.rs` and `examples3d/soft_joints3.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/soft_joints3.rs:75` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 2) examples3d/joints3.rs:260— examples3d/joints3.rs:260-272 | examples3d/stress_tests/joint_fixed3.rs:25-38 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/joints3.rs:260` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:317— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:317-330 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:381-393 — before extracting anything, compare `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs` and `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:317` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) src/dynamics/solver/joint_constraint/generic_joint_constraint_builder.rs:193— src/dynamics/solver/joint_constraint/generic_joint_constraint_builder.rs:193-204 | src/dynamics/solver/joint_constraint/generic_joint_constraint_builder.rs:211-223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/joint_constraint/generic_joint_constraint_builder.rs:193` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/platform3.py:22— bindings/python/rapier-testbed/rapier_testbed/examples3/platform3.py:22-34 | bindings/python/rapier-testbed/rapier_testbed/examples3/sensor3.py:20-31 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10–12 lines × 2) examples2d/b2d_many_pyramids.rs:33— examples2d/b2d_many_pyramids.rs:33-42 | examples2d/stress_tests/many_pyramids2.rs:14-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10–12 lines × 2) examples2d/character_controller2.rs:164— examples2d/character_controller2.rs:164-173 | examples3d/character_controller3.rs:179-190 — before extracting anything, compare `examples2d/character_controller2.rs` and `examples3d/character_controller3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/character_controller2.rs:164` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 6) examples2d/character_controller2.rs:13— examples2d/character_controller2.rs:13-23 | examples2d/inverse_kinematics2.rs:8-18 | examples2d/locked_rotations2.rs:11-21 | examples2d/pin_slot_joint2.rs:11-21 | examples2d/platform2.rs:8-18 | examples2d/rope_joints2.rs:11-21 — before extracting anything, compare `examples2d/character_controller2.rs` and `examples2d/platform2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 6) examples3d/debug_add_remove_collider3.rs:26— examples3d/debug_add_remove_collider3.rs:26-36 | examples3d/debug_cylinder3.rs:45-55 | examples3d/debug_internal_edges3.rs:56-66 | examples3d/debug_thin_cube_on_mesh3.rs:45-55 | examples3d/debug_triangle3.rs:27-37 | examples3d/debug_two_cubes3.rs:17-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 6 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_add_remove_collider3.rs:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 6) bindings/python/rapier-py-3d/src/joints.rs:974— bindings/python/rapier-py-3d/src/joints.rs:974-983 | bindings/python/rapier-py-3d/src/joints.rs:1239-1248 | bindings/python/rapier-py-3d/src/joints.rs:1531-1540 | bindings/python/rapier-py-3d/src/joints.rs:1811-1820 | bindings/python/rapier-py-3d/src/joints.rs:2639-2648 | bindings/python/rapier-py-3d/src/joints.rs:4542-4551 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/joints.rs:974` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 6) examples2d/soft_blobs2.rs:8— examples2d/soft_blobs2.rs:8-17 | examples2d/soft_bodies2.rs:8-17 | examples2d/soft_force_tearing2.rs:15-24 | examples2d/soft_plasticity2.rs:9-18 | examples2d/soft_stress2.rs:10-19 | examples2d/soft_tearing2.rs:12-22 — before extracting anything, compare `examples2d/soft_force_tearing2.rs` and `examples2d/soft_tearing2.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_blobs2.rs:8` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) bindings/python/rapier-py-3d/src/joints.rs:964— bindings/python/rapier-py-3d/src/joints.rs:964-973 | bindings/python/rapier-py-3d/src/joints.rs:2621-2630 | bindings/python/rapier-py-3d/src/joints.rs:4532-4541 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) examples2d/soft_thin_features2.rs:17— examples2d/soft_thin_features2.rs:17-26 | examples3d/soft_meshes3.rs:12-22 | examples3d/soft_thin_features3.rs:17-26 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_thin_features2.rs:17` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–10 lines × 2) examples2d/restitution2.rs:20— examples2d/restitution2.rs:20-26 | examples3d/restitution3.rs:18-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/restitution2.rs:20` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–10 lines × 2) src/dynamics/island_manager/persistent.rs:827— src/dynamics/island_manager/persistent.rs:827-836 | src/dynamics/island_manager/persistent.rs:839-845 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/island_manager/persistent.rs:827` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–9 lines × 2) examples2d/soft_blobs2.rs:34— examples2d/soft_blobs2.rs:34-42 | examples2d/stress_tests/soft_blobs2.rs:33-39 — before extracting anything, compare `examples2d/soft_blobs2.rs` and `examples2d/stress_tests/soft_blobs2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7–9 lines × 2) src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_vertex_contacts.rs:230— src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_vertex_contacts.rs:230-238 | src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_vertex_contacts.rs:423-429 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 9) bindings/c/src/pipeline.rs:59— bindings/c/src/pipeline.rs:59-66 | bindings/c/src/pipeline.rs:132-139 | bindings/c/src/pipeline.rs:171-178 | bindings/c/src/pipeline.rs:210-217 | bindings/c/src/pipeline.rs:248-255 | bindings/c/src/pipeline.rs:286-293 | bindings/c/src/pipeline.rs:327-334 | bindings/c/src/pipeline.rs:1459-1466 | bindings/c/src/pipeline.rs:1495-1502 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/pipeline.rs:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `bindings/c/src/pipeline.rs:140` calls `ensure` and `bindings/c/src/pipeline.rs:67` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 9) bindings/c/src/dynamics.rs:374— bindings/c/src/dynamics.rs:374-381 | bindings/c/src/dynamics.rs:386-393 | bindings/c/src/dynamics.rs:398-405 | bindings/c/src/geometry.rs:266-273 | bindings/c/src/geometry.rs:278-285 | bindings/c/src/geometry.rs:362-369 | bindings/c/src/geometry.rs:374-381 | bindings/c/src/geometry.rs:690-697 | bindings/c/src/geometry.rs:883-890 — before extracting anything, compare `bindings/c/src/dynamics.rs` and `bindings/c/src/geometry.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/dynamics.rs:374` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `RprPose` in one and `RprVector` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 5) bindings/c/src/descriptors.rs:635— bindings/c/src/descriptors.rs:635-642 | bindings/c/src/joint_desc.rs:243-250 | bindings/c/src/joint_desc.rs:279-286 | bindings/c/src/soft_desc.rs:690-697 | bindings/c/src/soft_desc.rs:770-777 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bindings/c/src/joint_desc.rs:241` calls `check_world` and `bindings/c/src/descriptors.rs:634` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 5) bindings/python/rapier-py-3d/src/dynamics.rs:604— bindings/python/rapier-py-3d/src/dynamics.rs:604-611 | bindings/python/rapier-py-3d/src/geometry.rs:4972-4979 | bindings/python/rapier-py-3d/src/joints.rs:3206-3213 | bindings/python/rapier-py-3d/src/joints.rs:4267-4274 | bindings/python/rapier-py-3d/src/joints.rs:4292-4299 — before extracting anything, compare `bindings/python/rapier-py-3d/src/dynamics.rs` and `bindings/python/rapier-py-3d/src/geometry.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7–8 lines × 2) bindings/c/src/geometry.rs:172— bindings/c/src/geometry.rs:172-179 | bindings/c/src/geometry.rs:782-788 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–8 lines × 2) src/dynamics/joint/multibody_joint/multibody.rs:1443— src/dynamics/joint/multibody_joint/multibody.rs:1443-1449 | src/dynamics/joint/multibody_joint/multibody.rs:1550-1557 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/joint/multibody_joint/multibody.rs:1443` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 5) bindings/c/src/scoped_access.rs:1039— bindings/c/src/scoped_access.rs:1039-1045 | bindings/c/src/scoped_access.rs:1071-1077 | bindings/c/src/scoped_access.rs:1100-1106 | bindings/c/src/scoped_access.rs:1127-1133 | bindings/c/src/scoped_access.rs:1228-1234 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/scoped_access.rs:1039` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 5) bindings/c/src/extra.rs:81— bindings/c/src/extra.rs:81-87 | bindings/c/src/joints.rs:26-32 | bindings/c/src/joints.rs:36-42 | bindings/c/src/joints.rs:46-52 | bindings/c/src/joints.rs:56-62 — before extracting anything, compare `bindings/c/src/extra.rs` and `bindings/c/src/joints.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/extra.rs:81` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `RprPose` in one and `RprVector` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 3) bindings/c/src/geometry.rs:171— bindings/c/src/geometry.rs:171-177 | bindings/c/src/geometry.rs:761-767 | bindings/c/src/geometry.rs:781-787 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/geometry.rs:171` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) examples3d/compound3.rs:24— examples3d/compound3.rs:24-30 | examples3d/stress_tests/compound3.rs:23-29 | examples3d/stress_tests/convex_polyhedron3.rs:27-33 — before extracting anything, compare `examples3d/compound3.rs` and `examples3d/stress_tests/compound3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 12) bindings/c/src/control.rs:301— bindings/c/src/control.rs:301-306 | bindings/c/src/queries_extras.rs:52-57 | bindings/c/src/queries_extras.rs:118-123 | bindings/c/src/queries_extras.rs:181-186 | bindings/c/src/world_queries.rs:119-124 | bindings/c/src/world_queries.rs:167-172 | bindings/c/src/world_queries.rs:211-216 | bindings/c/src/world_queries.rs:248-253 | bindings/c/src/world_queries.rs:284-289 | bindings/c/src/world_queries.rs:322-327 | bindings/c/src/world_queries.rs:365-370 | bindings/c/src/world_queries.rs:416-421 — there are 12 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 12 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `bindings/c/src/control.rs:309` calls `out_ptr`, `positive` and `bindings/c/src/queries_extras.rs:59` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 12) bindings/c/src/extra.rs:479— bindings/c/src/extra.rs:479-484 | bindings/c/src/handle_access.rs:1137-1142 | bindings/c/src/joints.rs:392-397 | bindings/c/src/scoped_access.rs:42-47 | bindings/c/src/scoped_access.rs:268-273 | bindings/c/src/scoped_access.rs:297-302 | bindings/c/src/scoped_access.rs:326-331 | bindings/c/src/scoped_access.rs:355-360 | bindings/c/src/scoped_access.rs:699-704 | bindings/c/src/scoped_access.rs:755-760 | bindings/c/src/scoped_access.rs:944-949 | bindings/c/src/scoped_access.rs:975-980 — before extracting anything, compare `bindings/c/src/extra.rs` and `bindings/c/src/joints.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/extra.rs:479` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 32) bindings/c/src/handle_access.rs:1189— bindings/c/src/handle_access.rs:1189-1193 | bindings/c/src/handle_access.rs:1213-1217 | bindings/c/src/handle_access.rs:1239-1243 | bindings/c/src/scoped_access.rs:416-420 | bindings/c/src/scoped_access.rs:441-445 | bindings/c/src/scoped_access.rs:466-470 | bindings/c/src/scoped_access.rs:493-497 | bindings/c/src/scoped_access.rs:520-524 | bindings/c/src/scoped_access.rs:548-552 | bindings/c/src/scoped_access.rs:573-577 | bindings/c/src/scoped_access.rs:596-600 | bindings/c/src/scoped_access.rs:619-623 | bindings/c/src/scoped_access.rs:646-650 | bindings/c/src/scoped_access.rs:674-678 | bindings/c/src/scoped_access.rs:786-790 | bindings/c/src/scoped_access.rs:811-815 | bindings/c/src/scoped_access.rs:836-840 | bindings/c/src/scoped_access.rs:863-867 | bindings/c/src/scoped_access.rs:888-892 | bindings/c/src/scoped_access.rs:1155-1159 | bindings/c/src/scoped_access.rs:1179-1183 | bindings/c/src/scoped_access.rs:1204-1208 | bindings/c/src/soft_body.rs:9-13 | bindings/c/src/soft_body.rs:702-706 | bindings/c/src/soft_body.rs:758-762 | bindings/c/src/soft_body.rs:796-800 | bindings/c/src/soft_extras.rs:108-112 | bindings/c/src/soft_extras.rs:157-161 | bindings/c/src/soft_extras.rs:209-213 | bindings/c/src/soft_extras.rs:240-244 | bindings/c/src/soft_extras.rs:271-275 | bindings/c/src/soft_extras.rs:304-308 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bindings/c/src/scoped_access.rs:645` calls `check_world` and `bindings/c/src/handle_access.rs:1188` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 32) bindings/c/src/handle_access.rs:1189— bindings/c/src/handle_access.rs:1189-1193 | bindings/c/src/handle_access.rs:1213-1217 | bindings/c/src/handle_access.rs:1239-1243 | bindings/c/src/scoped_access.rs:416-420 | bindings/c/src/scoped_access.rs:441-445 | bindings/c/src/scoped_access.rs:466-470 | bindings/c/src/scoped_access.rs:493-497 | bindings/c/src/scoped_access.rs:520-524 | bindings/c/src/scoped_access.rs:548-552 | bindings/c/src/scoped_access.rs:573-577 | bindings/c/src/scoped_access.rs:596-600 | bindings/c/src/scoped_access.rs:619-623 | bindings/c/src/scoped_access.rs:674-678 | bindings/c/src/scoped_access.rs:786-790 | bindings/c/src/scoped_access.rs:811-815 | bindings/c/src/scoped_access.rs:836-840 | bindings/c/src/scoped_access.rs:863-867 | bindings/c/src/scoped_access.rs:888-892 | bindings/c/src/scoped_access.rs:1155-1159 | bindings/c/src/scoped_access.rs:1179-1183 | bindings/c/src/scoped_access.rs:1204-1208 | bindings/c/src/soft_body.rs:9-13 | bindings/c/src/soft_body.rs:327-331 | bindings/c/src/soft_body.rs:702-706 | bindings/c/src/soft_body.rs:758-762 | bindings/c/src/soft_body.rs:796-800 | bindings/c/src/soft_extras.rs:108-112 | bindings/c/src/soft_extras.rs:157-161 | bindings/c/src/soft_extras.rs:209-213 | bindings/c/src/soft_extras.rs:240-244 | bindings/c/src/soft_extras.rs:271-275 | bindings/c/src/soft_extras.rs:304-308 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bindings/c/src/scoped_access.rs:672` calls `ffi_value` and `bindings/c/src/handle_access.rs:1187` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 5) bindings/c/src/extra.rs:482— bindings/c/src/extra.rs:482-487 | bindings/c/src/joint_extras.rs:131-136 | bindings/c/src/joint_extras.rs:203-208 | bindings/c/src/joints.rs:395-400 | bindings/c/src/joints.rs:425-429 — before extracting anything, compare `bindings/c/src/extra.rs` and `bindings/c/src/joints.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bindings/c/src/extra.rs:480` calls `ffi_value` and `bindings/c/src/joints.rs:423` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 5) examples3d/harness_capsules3.rs:33— examples3d/harness_capsules3.rs:33-37 | examples3d/primitives3.rs:36-40 | examples3d/stress_tests/capsules3.rs:35-39 | examples3d/stress_tests/ccd3.rs:37-41 | examples3d/stress_tests/convex_polyhedron3.rs:52-56 — before extracting anything, compare `examples3d/harness_capsules3.rs` and `examples3d/stress_tests/capsules3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/harness_capsules3.rs:33` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (37 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:47— bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:47-83 | bindings/python/rapier-testbed/rapier_testbed/examples3/trimesh3.py:86-122 — before extracting anything, compare `bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py` and `bindings/python/rapier-testbed/rapier_testbed/examples3/trimesh3.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (37 lines × 2) examples3d/stress_tests/boxes3.rs:17— examples3d/stress_tests/boxes3.rs:17-53 | examples3d/stress_tests/ray_cast3.rs:17-53 — before extracting anything, compare `examples3d/stress_tests/boxes3.rs` and `examples3d/stress_tests/ray_cast3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12–16 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/primitives3.py:61— bindings/python/rapier-testbed/rapier_testbed/examples3/primitives3.py:61-76 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/ccd3.py:51-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/ccd3.py:49` calls `cuboid` and `bindings/python/rapier-testbed/rapier_testbed/examples3/primitives3.py:59` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12–16 lines × 2) examples2d/stress_tests/joint_fixed2.rs:8— examples2d/stress_tests/joint_fixed2.rs:8-23 | examples3d/stress_tests/joint_fixed3.rs:8-19 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/stress_tests/joint_fixed2.rs:8` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Off the main sequence: mjcf-rs — mjcf-rs: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: rapier3d-meshloader — rapier3d-meshloader: abstractness 0.00, instability 0.17, distance 0.83 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
Duplicated block (30 lines × 2 locations) bindings/typescript/src.ts/geometry/broad_phase.ts:267— bindings/typescript/src.ts/geometry/broad_phase.ts:267 · bindings/typescript/src.ts/geometry/broad_phase.ts:310 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (30 lines × 2 locations) bindings/typescript/src.ts/pipeline/world.ts:984— bindings/typescript/src.ts/pipeline/world.ts:984 · bindings/typescript/src.ts/pipeline/world.ts:1205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20 lines × 2 locations) bindings/typescript/src.ts/pipeline/physics_pipeline.ts:25— bindings/typescript/src.ts/pipeline/physics_pipeline.ts:25 · bindings/typescript/src.ts/pipeline/serialization_pipeline.ts:26 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (20 lines × 2 locations) bindings/typescript/src.ts/pipeline/world.ts:937— bindings/typescript/src.ts/pipeline/world.ts:937 · bindings/typescript/src.ts/pipeline/world.ts:974 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (13 lines × 2 locations) bindings/typescript/src.ts/geometry/contact.ts:61— bindings/typescript/src.ts/geometry/contact.ts:61 · bindings/typescript/src.ts/geometry/toi.ts:58 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (13 lines × 2 locations) bindings/typescript/src.ts/geometry/ray.ts:97— bindings/typescript/src.ts/geometry/ray.ts:97 · bindings/typescript/src.ts/geometry/ray.ts:167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2 locations) bindings/typescript/src.ts/control/ray_cast_vehicle_controller.ts:469— bindings/typescript/src.ts/control/ray_cast_vehicle_controller.ts:469 · bindings/typescript/src.ts/geometry/narrow_phase.ts:176 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (9 lines × 2 locations) bindings/typescript/src.ts/geometry/shape.ts:414— bindings/typescript/src.ts/geometry/shape.ts:414 · bindings/typescript/src.ts/geometry/shape.ts:423 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Dead file (~15 LoC) bindings/typescript/rapier-compat/src2d/init.ts— no import path from any entry point (3 application, 3 tooling, 4 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~15 LoC) bindings/typescript/rapier-compat/src3d/init.ts— no import path from any entry point (3 application, 3 tooling, 4 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~1 LoC) bindings/typescript/rapier-compat/src2d/raw.ts— no import path from any entry point (3 application, 3 tooling, 4 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~1 LoC) bindings/typescript/rapier-compat/src3d/raw.ts— no import path from any entry point (3 application, 3 tooling, 4 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
BroadPhaseBvh::update (cyclomatic 68) src/geometry/broad_phase_bvh/update.rs:35— BroadPhaseBvh::update has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VertexScan::scan_vertex (cyclomatic 51) src/geometry/narrow_phase/soft_contacts/soft_contacts_vertex_pass.rs:445— VertexScan::scan_vertex has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RprSoftBodyDesc::raw_piece (cyclomatic 41) bindings/c/src/soft_desc.rs:335— RprSoftBodyDesc::raw_piece has cyclomatic complexity 41 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ColliderView::raw_scale_by (cyclomatic 40) bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:262— ColliderView::raw_scale_by has cyclomatic complexity 40 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
MjcfRobot::insert_using_multibody_joints (cyclomatic 37) crates/rapier3d-mjcf/src/loader/insert.rs:111— MjcfRobot::insert_using_multibody_joints has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PersistentIslands::split_island_now (cyclomatic 36) src/dynamics/island_manager/global_split.rs:66— PersistentIslands::split_island_now has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IslandManager::update_substep_groups (cyclomatic 35) src/dynamics/island_manager/substep_groups.rs:63— IslandManager::update_substep_groups has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GenericContactConstraintBuilder::generate (cyclomatic 31) src/dynamics/solver/contact_constraint/generic_contact_constraint.rs:35— GenericContactConstraintBuilder::generate has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftBodyBuilder::build (cyclomatic 26) src/dynamics/soft_body/soft_body_builder/soft_body_build.rs:31— SoftBodyBuilder::build has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EdgeScan::scan_element (cyclomatic 25) src/geometry/narrow_phase/soft_contacts/soft_contacts_edge_pass.rs:173— EdgeScan::scan_element has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RprShapeDesc::raw_depth (cyclomatic 24) bindings/c/src/descriptors.rs:290— RprShapeDesc::raw_depth has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TestbedViewer::handle_events (cyclomatic 23) src_testbed/viewer.rs:547— TestbedViewer::handle_events has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
JointConstraint::update (cyclomatic 21) src/dynamics/solver/joint_constraint/joint_velocity_constraint.rs:147— JointConstraint::update has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftFemSystem::writeback (cyclomatic 21) src/dynamics/solver/soft_fem/system/soft_fem_system_assemble.rs:276— SoftFemSystem::writeback has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftContact::update (cyclomatic 20) src/dynamics/solver/soft_constraint/soft_contact.rs:173— SoftContact::update has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
IndexedComponents::split (cyclomatic 19) bindings/bevy_rapier/src/plugin/systems/soft_body.rs:1052— IndexedComponents::split has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DynamicRayCastVehicleController::update_friction (cyclomatic 19) src/control/ray_cast_vehicle_controller.rs:539— DynamicRayCastVehicleController::update_friction has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IslandGraph::for_each_neighbor (cyclomatic 19) src/dynamics/island_manager/local_split.rs:76— IslandGraph::for_each_neighbor has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_meshes._shape_to_arrays (cyclomatic 19) bindings/python/rapier-testbed/rapier_testbed/_meshes.py:513— _meshes._shape_to_arrays has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Graphics.addCollider (cyclomatic 19) bindings/typescript/testbed3d/src/Graphics.ts:495— Graphics.addCollider has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
InteractionGroups::group_manifold_refs (cyclomatic 18) src/dynamics/solver/interaction_groups.rs:240— InteractionGroups::group_manifold_refs has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mjcf_rs::loader::prototypes::merge_geom_proto (cyclomatic 18) crates/mjcf-rs/src/loader/prototypes.rs:179— mjcf_rs::loader::prototypes::merge_geom_proto has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RapierContextSimulation::step_simulation (cyclomatic 17) bindings/bevy_rapier/src/plugin/context/mod.rs:2188— RapierContextSimulation::step_simulation has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GraphicsManager::draw (cyclomatic 17) src_testbed/graphics.rs:1236— GraphicsManager::draw has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
RigidBodyMassProps::update_world_mass_properties (cyclomatic 16) src/dynamics/rigid_body_components.rs:547— RigidBodyMassProps::update_world_mass_properties has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SoftCollisionMesh::contact_is_ghost (cyclomatic 16) src/dynamics/soft_body/collision_mesh/collision_mesh_geometry.rs:190— SoftCollisionMesh::contact_is_ghost has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BroadPhaseBvh::update (cognitive 114) src/geometry/broad_phase_bvh/update.rs:35— BroadPhaseBvh::update has cognitive complexity 114 (threshold 15). Drivers by points: if/else 37 (69 pts), loops 15 (22 pts), boolean chains 17, match/switch 2 (6 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VertexScan::scan_vertex (cognitive 99) src/geometry/narrow_phase/soft_contacts/soft_contacts_vertex_pass.rs:445— VertexScan::scan_vertex has cognitive complexity 99 (threshold 15). Drivers by points: if/else 39 (75 pts), loops 6 (13 pts), boolean chains 11 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MjcfRobot::insert_using_multibody_joints (cognitive 73) crates/rapier3d-mjcf/src/loader/insert.rs:111— MjcfRobot::insert_using_multibody_joints has cognitive complexity 73 (threshold 15). Drivers by points: if/else 26 (55 pts), loops 7 (12 pts), boolean chains 6 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EdgeScan::scan_element (cognitive 69) src/geometry/narrow_phase/soft_contacts/soft_contacts_edge_pass.rs:173— EdgeScan::scan_element has cognitive complexity 69 (threshold 15). Drivers by points: if/else 17 (58 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GenericContactConstraintBuilder::generate (cognitive 62) src/dynamics/solver/contact_constraint/generic_contact_constraint.rs:35— GenericContactConstraintBuilder::generate has cognitive complexity 62 (threshold 15). Drivers by points: if/else 38 (53 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DynamicRayCastVehicleController::update_friction (cognitive 39) src/control/ray_cast_vehicle_controller.rs:539— DynamicRayCastVehicleController::update_friction has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (33 pts), loops 5 (6 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RigidBodyMassProps::recompute_mass_properties_from_colliders (cognitive 37) src/dynamics/rigid_body_components.rs:434— RigidBodyMassProps::recompute_mass_properties_from_colliders has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
IndexedComponents::split (cognitive 33) bindings/bevy_rapier/src/plugin/systems/soft_body.rs:1052— IndexedComponents::split has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 7 (13 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RprSoftBodyDesc::raw_piece (cognitive 33) bindings/c/src/soft_desc.rs:335— RprSoftBodyDesc::raw_piece has cognitive complexity 33 (threshold 15). Drivers by points: if/else 20 (22 pts), boolean chains 6, match/switch 4 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
InteractionGroups::group_manifold_refs (cognitive 31) src/dynamics/solver/interaction_groups.rs:240— InteractionGroups::group_manifold_refs has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (27 pts), loops 3, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JointConstraint::update (cognitive 31) src/dynamics/solver/joint_constraint/joint_velocity_constraint.rs:147— JointConstraint::update has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 6, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParallelInteractionGroups::group_interactions (cognitive 30) src/dynamics/solver/interaction_groups.rs:59— ParallelInteractionGroups::group_interactions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 4, match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultibodyJoint::velocity_constraints (cognitive 29) src/dynamics/joint/multibody_joint/multibody_joint.rs:309— MultibodyJoint::velocity_constraints has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RprShapeDesc::raw_depth (cognitive 26) bindings/c/src/descriptors.rs:290— RprShapeDesc::raw_depth has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
rapier3d_urdf::squeeze_one_empty_link (cognitive 26) crates/rapier3d-urdf/src/lib.rs:1097— rapier3d_urdf::squeeze_one_empty_link has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (10 pts), match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImpulseJointSet::select_active_interactions (cognitive 24) src/dynamics/joint/impulse_joint/impulse_joint_set.rs:557— ImpulseJointSet::select_active_interactions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultibodyJointSet::remove (cognitive 24) src/dynamics/joint/multibody_joint/multibody_joint_set.rs:203— MultibodyJointSet::remove has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (8 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
JointConstraintBuilderSimd::update (cognitive 23) src/dynamics/solver/joint_constraint/joint_constraint_builder.rs:358— JointConstraintBuilderSimd::update has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 3 (8 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SkylineCholesky::factorize (cognitive 22) src/dynamics/solver/soft_fem/soft_fem_skyline.rs:90— SkylineCholesky::factorize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 6 (11 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_picker._cli_input_loop (cognitive 22) bindings/python/rapier-testbed/rapier_testbed/_picker.py:261— _picker._cli_input_loop has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 2 (5 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Testbed._sync_mesh_nodes (cognitive 22) bindings/python/rapier-testbed/rapier_testbed/_testbed.py:598— Testbed._sync_mesh_nodes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (6 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColliderView::raw_scale_by (cognitive 21) bindings/bevy_rapier/src/geometry/shape_views/collider_view.rs:262— ColliderView::raw_scale_by has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 12 (19 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
RapierDiagnosticsPlugin::diagnostic_system (cognitive 21) bindings/bevy_rapier/src/plugin/diagnostics.rs:251— RapierDiagnosticsPlugin::diagnostic_system has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Quarantine::detect_user_changes (cognitive 21) src/pipeline/physics_pipeline/quarantine.rs:78— Quarantine::detect_user_changes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_meshes._shape_to_arrays (cognitive 21) bindings/python/rapier-testbed/rapier_testbed/_meshes.py:513— _meshes._shape_to_arrays has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, loops 2 (5 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CCDSolver::solve_continuous (cognitive 20) src/dynamics/ccd/ccd_solver.rs:169— CCDSolver::solve_continuous has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Testbed._sync_soft_body_nodes (cognitive 20) bindings/python/rapier-testbed/rapier_testbed/_testbed.py:686— Testbed._sync_soft_body_nodes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Testbed._cleanup_scene (cognitive 20) bindings/python/rapier-testbed/rapier_testbed/_testbed.py:855— Testbed._cleanup_scene has cognitive complexity 20 (threshold 15). Drivers by points: error handling 8 (14 pts), loops 4, if/else 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
examples_tour.main (cognitive 20) bindings/python/examples_tour.py:37— examples_tour.main has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 2 (3 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dynamic_trimesh3.do_init_world (cognitive 19) bindings/python/rapier-testbed/rapier_testbed/examples3/dynamic_trimesh3.py:52— dynamic_trimesh3.do_init_world has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 5 (7 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
heightfield3.init_world (cognitive 19) bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:15— heightfield3.init_world has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (9 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
trimesh3.init_world (cognitive 19) bindings/python/rapier-testbed/rapier_testbed/examples3/trimesh3.py:51— trimesh3.init_world has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (9 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColliderDesc.convexDecomposition (cognitive 19) bindings/typescript/src.ts/geometry/collider.ts:1889— ColliderDesc.convexDecomposition has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (19 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Fan::assign_groups (cognitive 18) src/dynamics/soft_body/tearing/tearing_particle_split.rs:62— Fan::assign_groups has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 9). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GenericJointConstraint::lock_axes (cognitive 18) src/dynamics/solver/joint_constraint/generic_joint_constraint.rs:64— GenericJointConstraint::lock_axes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 6 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JointConstraintBuilder::update (cognitive 18) src/dynamics/solver/joint_constraint/joint_constraint_builder.rs:81— JointConstraintBuilder::update has cognitive complexity 18 (threshold 15). Drivers by points: loops 3 (8 pts), if/else 4 (5 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlockMatrix::from_pairs (cognitive 18) src/dynamics/solver/soft_fem/soft_fem_sparse.rs:29— BlockMatrix::from_pairs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 6 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
keva3._build_block (cognitive 18) bindings/python/rapier-testbed/rapier_testbed/examples3/keva3.py:11— keva3._build_block has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (9 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColliderSet::set_parent (cognitive 17) src/geometry/collider_set.rs:338— ColliderSet::set_parent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UrdfRobot::from_robot (cognitive 17) crates/rapier3d-urdf/src/lib.rs:432— UrdfRobot::from_robot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rapier_examples_3d_f64::trimesh3_f64::run (cognitive 17) examples3d-f64/trimesh3_f64.rs:6— rapier_examples_3d_f64::trimesh3_f64::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
joints3._create_fixed_joints (cognitive 16) bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:200— joints3._create_fixed_joints has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyFunctions: crate::bindings::c::src::joints bindings/c/src/joints.rs:2— TooManyFunctions — 31 free functions. The bar is 30 free functions; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Near-duplicate member family (12 members, 42 shared lines) · ×1
Near-duplicate member family (12 members, 42 shared lines) bindings/python/rapier-py-3d/src/controllers.rs:726— bindings/python/rapier-py-3d/src/controllers.rs:726-808 | bindings/python/rapier-py-3d/src/pipeline.rs:1154-1221 | bindings/python/rapier-py-3d/src/pipeline.rs:1238-1305 | bindings/python/rapier-py-3d/src/pipeline.rs:1327-1401 | bindings/python/rapier-py-3d/src/pipeline.rs:1422-1490 | bindings/python/rapier-py-3d/src/pipeline.rs:1507-1582 | bindings/python/rapier-py-3d/src/pipeline.rs:1599-1673 | bindings/python/rapier-py-3d/src/pipeline.rs:1696-1765 | bindings/python/rapier-py-3d/src/pipeline.rs:1795-1868 | bindings/python/rapier-py-3d/src/pipeline.rs:1887-1961 | bindings/python/rapier-py-3d/src/pipeline.rs:1980-2053 | bindings/python/rapier-py-3d/src/pipeline.rs:2079-2144 — These 12 members are variants of one another: a block of 42 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
D4 · Code Duplication· Near-duplicate member family (8 members, 21 shared lines) · ×1
Near-duplicate member family (8 members, 21 shared lines) examples3d/collision_groups3.rs:5— examples3d/collision_groups3.rs:5-95 | examples3d/compound3.rs:4-89 | examples3d/convex_polyhedron3.rs:6-70 | examples3d/debug_cylinder3.rs:7-59 | examples3d/debug_eccentric_boxes3.rs:4-46 | examples3d/debug_prismatic3.rs:44-74 | examples3d/domino3.rs:5-84 | examples3d/keva3.rs:66-121 — These 8 members are variants of one another: a block of 21 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication· Near-duplicate member family (5 members, 30 shared lines) · ×1
Near-duplicate member family (5 members, 30 shared lines) examples2d/convex_polygons2.rs:6— examples2d/convex_polygons2.rs:6-78 | examples2d/stress_tests/boxes2.rs:4-65 | examples2d/stress_tests/capsules2.rs:4-67 | examples2d/stress_tests/convex_polygons2.rs:6-81 | examples2d/trimesh2.rs:4-59 — These 5 members are variants of one another: a block of 30 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Near-duplicate member family (5 members, 21 shared lines) · ×1
Near-duplicate member family (5 members, 21 shared lines) examples3d/compound3.rs:4— examples3d/compound3.rs:4-89 | examples3d/primitives3.rs:4-78 | examples3d/stress_tests/capsules3.rs:4-63 | examples3d/stress_tests/ccd3.rs:4-78 | examples3d/stress_tests/compound3.rs:4-68 — These 5 members are variants of one another: a block of 21 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 24 shared lines) · ×1
Near-duplicate member family (4 members, 24 shared lines) bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:16— bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:16-83 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/heightfield3.py:16-60 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/trimesh3.py:17-60 | bindings/python/rapier-testbed/rapier_testbed/examples3/trimesh3.py:52-122 — These 4 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 17 shared lines) · ×1
Near-duplicate member family (4 members, 17 shared lines) examples3d/debug_shape_modification3.rs:4— examples3d/debug_shape_modification3.rs:4-142 | examples3d/primitives3.rs:4-78 | examples3d/stress_tests/capsules3.rs:4-63 | examples3d/stress_tests/ccd3.rs:4-78 — These 4 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Near-duplicate member pair (177 shared lines) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:59— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:59-357 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:65-424 — These two members are variants of one another: 177 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (65 shared lines) examples2d/soft_plasticity2.rs:8— examples2d/soft_plasticity2.rs:8-144 | examples3d/soft_plasticity3.rs:8-154 — These two members are variants of one another: 65 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (62 shared lines) examples2d/character_controller2.rs:9— examples2d/character_controller2.rs:9-197 | examples3d/character_controller3.rs:9-216 — These two members are variants of one another: 62 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (59 shared lines) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:366— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:366-455 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:433-522 — These two members are variants of one another: 59 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (58 shared lines) src/dynamics/solver/staged_island_solver/joints.rs:39— src/dynamics/solver/staged_island_solver/joints.rs:39-322 | src/dynamics/solver/staged_island_solver/joints.rs:332-505 — These two members are variants of one another: 58 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (52 shared lines) examples3d/debug_dynamic_collider_add3.rs:4— examples3d/debug_dynamic_collider_add3.rs:4-114 | examples3d/debug_rollback3.rs:4-69 — These two members are variants of one another: 52 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (46 shared lines) bindings/python/rapier-py-3d/src/pipeline.rs:2624— bindings/python/rapier-py-3d/src/pipeline.rs:2624-2699 | bindings/python/rapier-py-3d/src/pipeline.rs:2760-2819 — These two members are variants of one another: 46 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (45 shared lines) examples2d/debug_angular_limits2.rs:24— examples2d/debug_angular_limits2.rs:24-93 | examples3d/debug_angular_limits3.rs:24-101 — These two members are variants of one another: 45 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (44 shared lines) examples2d/soft_fem2.rs:11— examples2d/soft_fem2.rs:11-98 | examples3d/soft_fem3.rs:11-105 — These two members are variants of one another: 44 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (42 shared lines) bindings/python/rapier-py-3d/src/pipeline.rs:3196— bindings/python/rapier-py-3d/src/pipeline.rs:3196-3275 | bindings/python/rapier-py-3d/src/pipeline.rs:3284-3342 — These two members are variants of one another: 42 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (38 shared lines) examples2d/inverse_kinematics2.rs:4— examples2d/inverse_kinematics2.rs:4-96 | examples3d/inverse_kinematics3.rs:4-107 — These two members are variants of one another: 38 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (53 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (53 members, 50+ identical tokens) bindings/c/src/config_data.rs:566— bindings/c/src/config_data.rs:566-577 | bindings/c/src/pipeline.rs:5-18 | bindings/c/src/pipeline.rs:40-53 | bindings/c/src/pipeline.rs:75-88 | bindings/c/src/pipeline.rs:110-123 | bindings/c/src/pipeline.rs:149-162 | bindings/c/src/pipeline.rs:188-201 | bindings/c/src/pipeline.rs:226-239 | bindings/c/src/pipeline.rs:264-277 | bindings/c/src/pipeline.rs:305-318 | bindings/c/src/pipeline.rs:343-356 | bindings/c/src/pipeline.rs:380-393 | bindings/c/src/pipeline.rs:420-433 | bindings/c/src/pipeline.rs:458-471 | bindings/c/src/pipeline.rs:492-505 | bindings/c/src/pipeline.rs:530-543 | bindings/c/src/pipeline.rs:568-581 | bindings/c/src/pipeline.rs:606-619 | bindings/c/src/pipeline.rs:644-657 | bindings/c/src/pipeline.rs:684-697 | bindings/c/src/pipeline.rs:1475-1486 | bindings/c/src/pipeline.rs:1511-1522 | bindings/c/src/pipeline.rs:1546-1557 | bindings/c/src/soft_extras.rs:403-419 | bindings/c/src/soft_extras.rs:424-436 | bindings/c/src/soft_extras.rs:441-457 | bindings/c/src/soft_extras.rs:462-478 | bindings/c/src/soft_extras.rs:483-499 | bindings/c/src/soft_extras.rs:504-516 | bindings/c/src/soft_extras.rs:521-533 | bindings/c/src/soft_extras.rs:538-554 | bindings/c/src/soft_extras.rs:559-571 | bindings/c/src/soft_extras.rs:576-588 | bindings/c/src/soft_extras.rs:593-609 | bindings/c/src/soft_extras.rs:616-632 | bindings/c/src/soft_extras.rs:637-649 | bindings/c/src/soft_extras.rs:654-666 | bindings/c/src/soft_extras.rs:671-683 | bindings/c/src/soft_extras.rs:688-704 | bindings/c/src/soft_extras.rs:709-725 | bindings/c/src/soft_extras.rs:730-746 | bindings/c/src/soft_extras.rs:751-774 | bindings/c/src/soft_extras.rs:808-820 | bindings/c/src/soft_extras.rs:825-837 | bindings/c/src/soft_extras.rs:842-854 | bindings/c/src/soft_extras.rs:859-871 | bindings/c/src/soft_extras.rs:876-888 | bindings/c/src/soft_extras.rs:893-905 | bindings/c/src/soft_extras.rs:929-941 | bindings/c/src/soft_extras.rs:965-981 | bindings/c/src/soft_extras.rs:987-999 | bindings/c/src/soft_extras.rs:1005-1017 | bindings/c/src/soft_extras.rs:1023-1035 — These 53 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 53 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 53 times.
D4 · Code Duplication· Members sharing a duplicated core (35 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (35 members, 50+ identical tokens) bindings/c/src/dynamics.rs:781— bindings/c/src/dynamics.rs:781-798 | bindings/c/src/handle_access.rs:266-286 | bindings/c/src/handle_access.rs:296-316 | bindings/c/src/handle_access.rs:326-346 | bindings/c/src/handle_access.rs:356-376 | bindings/c/src/handle_access.rs:384-403 | bindings/c/src/handle_access.rs:411-430 | bindings/c/src/handle_access.rs:440-460 | bindings/c/src/handle_access.rs:507-526 | bindings/c/src/handle_access.rs:573-592 | bindings/c/src/handle_access.rs:602-622 | bindings/c/src/handle_access.rs:633-654 | bindings/c/src/handle_access.rs:664-684 | bindings/c/src/handle_access.rs:693-712 | bindings/c/src/handle_access.rs:717-733 | bindings/c/src/handle_access.rs:1753-1772 | bindings/c/src/scoped_access.rs:1254-1274 | bindings/c/src/scoped_access.rs:1281-1301 | bindings/c/src/scoped_access.rs:1369-1389 | bindings/c/src/scoped_access.rs:2238-2258 | bindings/c/src/scoped_access.rs:2268-2288 | bindings/c/src/scoped_access.rs:2296-2315 | bindings/c/src/scoped_access.rs:2325-2345 | bindings/c/src/scoped_access.rs:2353-2372 | bindings/c/src/scoped_access.rs:2380-2399 | bindings/c/src/scoped_access.rs:2409-2429 | bindings/c/src/scoped_access.rs:2439-2459 | bindings/c/src/scoped_access.rs:2467-2486 | bindings/c/src/scoped_access.rs:2494-2513 | bindings/c/src/scoped_access.rs:2521-2540 | bindings/c/src/scoped_access.rs:2550-2570 | bindings/c/src/scoped_access.rs:2580-2600 | bindings/c/src/scoped_access.rs:2611-2632 | bindings/c/src/scoped_access.rs:2641-2660 | bindings/c/src/scoped_access.rs:2790-2809 — These 35 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 35 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 35 times.
D4 · Code Duplication· Members sharing a duplicated core (31 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (31 members, 50+ identical tokens) bindings/c/src/pipeline.rs:513— bindings/c/src/pipeline.rs:513-525 | bindings/c/src/pipeline.rs:551-563 | bindings/c/src/pipeline.rs:589-601 | bindings/c/src/pipeline.rs:627-639 | bindings/c/src/pipeline.rs:665-677 | bindings/c/src/pipeline.rs:705-717 | bindings/c/src/pipeline.rs:1565-1581 | bindings/c/src/pipeline.rs:1589-1601 | bindings/c/src/pipeline.rs:1609-1625 | bindings/c/src/pipeline.rs:1633-1649 | bindings/c/src/pipeline.rs:1657-1673 | bindings/c/src/pipeline.rs:1681-1697 | bindings/c/src/pipeline.rs:1705-1717 | bindings/c/src/pipeline.rs:1725-1741 | bindings/c/src/pipeline.rs:1749-1761 | bindings/c/src/pipeline.rs:1769-1785 | bindings/c/src/pipeline.rs:1793-1809 | bindings/c/src/pipeline.rs:1817-1833 | bindings/c/src/pipeline.rs:1841-1853 | bindings/c/src/pipeline.rs:1861-1877 | bindings/c/src/pipeline.rs:1885-1897 | bindings/c/src/pipeline.rs:1905-1921 | bindings/c/src/pipeline.rs:1929-1945 | bindings/c/src/pipeline.rs:1953-1969 | bindings/c/src/pipeline.rs:1977-1993 | bindings/c/src/pipeline.rs:2001-2017 | bindings/c/src/pipeline.rs:2025-2041 | bindings/c/src/pipeline.rs:2049-2065 | bindings/c/src/pipeline.rs:2073-2089 | bindings/c/src/pipeline.rs:2097-2113 | bindings/c/src/soft_extras.rs:782-803 — These 31 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 31 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 31 times.
D4 · Code Duplication· Members sharing a duplicated core (24 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (24 members, 50+ identical tokens) bindings/c/src/geometry.rs:705— bindings/c/src/geometry.rs:705-730 | bindings/c/src/handle_access.rs:946-961 | bindings/c/src/handle_access.rs:970-985 | bindings/c/src/handle_access.rs:993-1008 | bindings/c/src/handle_access.rs:1016-1031 | bindings/c/src/handle_access.rs:1039-1054 | bindings/c/src/handle_access.rs:1062-1077 | bindings/c/src/handle_access.rs:1085-1100 | bindings/c/src/handle_access.rs:1729-1744 | bindings/c/src/scoped_access.rs:1309-1324 | bindings/c/src/scoped_access.rs:1517-1533 | bindings/c/src/scoped_access.rs:2817-2832 | bindings/c/src/scoped_access.rs:2840-2855 | bindings/c/src/scoped_access.rs:2863-2878 | bindings/c/src/scoped_access.rs:2886-2901 | bindings/c/src/scoped_access.rs:2909-2924 | bindings/c/src/scoped_access.rs:2932-2947 | bindings/c/src/scoped_access.rs:2955-2970 | bindings/c/src/scoped_access.rs:2978-2993 | bindings/c/src/scoped_access.rs:3001-3016 | bindings/c/src/scoped_access.rs:3024-3039 | bindings/c/src/scoped_access.rs:3047-3062 | bindings/c/src/scoped_access.rs:3508-3523 | bindings/c/src/scoped_access.rs:3531-3546 — These 24 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 24 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 24 times.
D4 · Code Duplication· Members sharing a duplicated core (13 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (13 members, 50+ identical tokens) bindings/c/src/handle_access.rs:806— bindings/c/src/handle_access.rs:806-821 | bindings/c/src/handle_access.rs:840-855 | bindings/c/src/scoped_access.rs:1771-1786 | bindings/c/src/scoped_access.rs:1804-1819 | bindings/c/src/scoped_access.rs:1837-1852 | bindings/c/src/scoped_access.rs:1870-1885 | bindings/c/src/scoped_access.rs:1903-1918 | bindings/c/src/scoped_access.rs:1936-1951 | bindings/c/src/scoped_access.rs:3237-3252 | bindings/c/src/scoped_access.rs:3270-3285 | bindings/c/src/scoped_access.rs:3303-3318 | bindings/c/src/scoped_access.rs:3336-3351 | bindings/c/src/scoped_access.rs:3371-3386 — These 13 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 13 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 13 times.
D4 · Code Duplication· Members sharing a duplicated core (12 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (12 members, 50+ identical tokens) bindings/c/src/control.rs:298— bindings/c/src/control.rs:298-333 | bindings/c/src/queries_extras.rs:48-83 | bindings/c/src/queries_extras.rs:113-138 | bindings/c/src/queries_extras.rs:176-210 | bindings/c/src/world_queries.rs:116-150 | bindings/c/src/world_queries.rs:164-193 | bindings/c/src/world_queries.rs:208-230 | bindings/c/src/world_queries.rs:244-264 | bindings/c/src/world_queries.rs:280-303 | bindings/c/src/world_queries.rs:318-343 | bindings/c/src/world_queries.rs:358-395 | bindings/c/src/world_queries.rs:410-455 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (8 members, 50+ identical tokens) bindings/c/src/pipeline.rs:364— bindings/c/src/pipeline.rs:364-375 | bindings/c/src/pipeline.rs:401-412 | bindings/c/src/pipeline.rs:442-453 | bindings/c/src/pipeline.rs:476-487 | bindings/c/src/pipeline.rs:1530-1541 | bindings/c/src/pipeline.rs:2164-2175 | bindings/c/src/soft_extras.rs:913-924 | bindings/c/src/soft_extras.rs:949-960 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication· Edited copy of a member (93 corresponding lines) · ×1
Edited copy of a member (93 corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:2302— bindings/python/rapier-py-3d/src/dynamics.rs:2302-2416 | bindings/python/rapier-py-3d/src/geometry.rs:4441-4533 — These two members are one piece of code written twice and then edited apart: 93 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (84 corresponding lines) · ×1
Edited copy of a member (84 corresponding lines) bindings/python/rapier-py-3d/src/loaders.rs:1958— bindings/python/rapier-py-3d/src/loaders.rs:1958-2041 | bindings/python/rapier-py-3d/src/loaders.rs:2067-2153 — These two members are one piece of code written twice and then edited apart: 84 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (65 corresponding lines) · ×1
Edited copy of a member (65 corresponding lines) examples2d/one_way_platforms2.rs:58— examples2d/one_way_platforms2.rs:58-124 | examples3d/one_way_platforms3.rs:58-122 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (78 corresponding lines) · ×1
Edited copy of a member (78 corresponding lines) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:604— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:604-681 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:685-781 — These two members are one piece of code written twice and then edited apart: 78 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (54 corresponding lines) · ×1
Edited copy of a member (54 corresponding lines) examples2d/b2d_joint_grid.rs:9— examples2d/b2d_joint_grid.rs:9-73 | examples3d/b3d_joint_grid.rs:9-62 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (64 corresponding lines) · ×1
Edited copy of a member (64 corresponding lines) examples3d/debug_chain_high_mass_ratio3.rs:4— examples3d/debug_chain_high_mass_ratio3.rs:4-76 | examples3d/debug_long_chain3.rs:4-67 — These two members are one piece of code written twice and then edited apart: 64 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×1
Edited copy of a member (30 corresponding lines) bindings/c/src/soft_body.rs:6— bindings/c/src/soft_body.rs:6-35 | bindings/c/src/soft_body.rs:793-823 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 67+ corresponding lines) · ×1
Edited copies of one member (3 members, 67+ corresponding lines) examples2d/heightfield2.rs:4— examples2d/heightfield2.rs:4-70 | examples2d/polyline2.rs:5-71 | examples2d/stress_tests/heightfield2.rs:4-70 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 67 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (47 corresponding lines) · ×1
Edited copy of a member (47 corresponding lines) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:683— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:683-735 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:783-829 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) examples3d/joints3.rs:30— examples3d/joints3.rs:30-63 | examples3d/joints3.rs:70-124 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) bindings/python/rapier-py-3d/src/loaders.rs:831— bindings/python/rapier-py-3d/src/loaders.rs:831-880 | bindings/python/rapier-py-3d/src/loaders.rs:905-959 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 48+ corresponding lines) · ×1
Edited copies of one member (3 members, 48+ corresponding lines) src/dynamics/soft_body/collision_mesh/collision_mesh_topology.rs:24— src/dynamics/soft_body/collision_mesh/collision_mesh_topology.rs:24-76 | src/dynamics/soft_body/collision_mesh/collision_mesh_topology.rs:86-145 | src/dynamics/soft_body/collision_mesh/collision_mesh_topology.rs:184-231 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 48 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 51+ corresponding lines) · ×1
Edited copies of one member (3 members, 51+ corresponding lines) examples3d/debug_articulations3.rs:4— examples3d/debug_articulations3.rs:4-55 | examples3d/joints3.rs:254-306 | examples3d/joints3.rs:308-358 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 51 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (42 corresponding lines) · ×1
Edited copy of a member (42 corresponding lines) examples2d/restitution2.rs:4— examples2d/restitution2.rs:4-45 | examples3d/restitution3.rs:4-48 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 53+ corresponding lines) · ×1
Edited copies of one member (3 members, 53+ corresponding lines) examples2d/pyramid2.rs:4— examples2d/pyramid2.rs:4-56 | examples2d/stress_tests/pyramid2.rs:4-56 | examples2d/stress_tests/vertical_stacks2.rs:4-63 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 53 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 37+ corresponding lines) · ×1
Edited copies of one member (3 members, 37+ corresponding lines) examples2d/b2d_large_pyramid.rs:8— examples2d/b2d_large_pyramid.rs:8-44 | examples2d/s2d_far_pyramid.rs:4-52 | examples3d/b3d_large_pyramid.rs:8-45 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 37 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 32+ corresponding lines) · ×1
Edited copies of one member (3 members, 32+ corresponding lines) bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:203— bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:203-234 | bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:240-271 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/joint_ball3.py:12-45 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 32 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 31+ corresponding lines) · ×1
Edited copies of one member (3 members, 31+ corresponding lines) bindings/typescript/src/control/pid_controller.rs:32— bindings/typescript/src/control/pid_controller.rs:32-62 | bindings/typescript/src/control/pid_controller.rs:64-94 | bindings/typescript/src/control/pid_controller.rs:96-126 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 31 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 38+ corresponding lines) · ×1
Edited copies of one member (3 members, 38+ corresponding lines) examples3d/debug_boxes3.rs:4— examples3d/debug_boxes3.rs:4-45 | examples3d/debug_pop3.rs:4-45 | examples3d/debug_triangle3.rs:4-41 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 38 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (45 corresponding lines) · ×1
Edited copy of a member (45 corresponding lines) examples2d/debug_vertical_column2.rs:4— examples2d/debug_vertical_column2.rs:4-48 | examples2d/inv_pyramid2.rs:4-49 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) bindings/python/rapier-testbed/rapier_testbed/examples3/mjcf3.py:45— bindings/python/rapier-testbed/rapier_testbed/examples3/mjcf3.py:45-83 | bindings/python/rapier-testbed/rapier_testbed/examples3/urdf3.py:42-74 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 24+ corresponding lines) · ×1
Edited copies of one member (3 members, 24+ corresponding lines) bindings/typescript/src/geometry/shape.rs:359— bindings/typescript/src/geometry/shape.rs:359-382 | bindings/typescript/src/geometry/shape.rs:384-407 | bindings/typescript/src/geometry/shape.rs:409-439 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:557— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:557-597 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:633-678 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (46 corresponding lines) · ×1
Edited copy of a member (46 corresponding lines) examples2d/one_way_platforms2.rs:10— examples2d/one_way_platforms2.rs:10-55 | examples3d/one_way_platforms3.rs:10-55 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 22+ corresponding lines) · ×1
Edited copies of one member (3 members, 22+ corresponding lines) bindings/c/src/scoped_access.rs:383— bindings/c/src/scoped_access.rs:383-404 | bindings/c/src/scoped_access.rs:911-932 | bindings/c/src/scoped_access.rs:1004-1025 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 27+ corresponding lines) · ×1
Edited copies of one member (3 members, 27+ corresponding lines) bindings/c/src/robotics.rs:170— bindings/c/src/robotics.rs:170-196 | bindings/c/src/robotics.rs:205-233 | bindings/c/src/robotics.rs:420-446 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) bindings/c/src/queries_extras.rs:419— bindings/c/src/queries_extras.rs:419-440 | bindings/c/src/queries_extras.rs:451-476 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 19+ corresponding lines) · ×1
Edited copies of one member (6 members, 19+ corresponding lines) bindings/c/src/handle_access.rs:1108— bindings/c/src/handle_access.rs:1108-1126 | bindings/c/src/scoped_access.rs:725-743 | bindings/c/src/scoped_access.rs:1097-1116 | bindings/c/src/scoped_access.rs:1124-1143 | bindings/c/src/scoped_access.rs:1225-1244 | bindings/c/src/soft_extras.rs:22-40 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 16+ corresponding lines) · ×1
Edited copies of one member (7 members, 16+ corresponding lines) bindings/c/src/handle_access.rs:1210— bindings/c/src/handle_access.rs:1210-1225 | bindings/c/src/scoped_access.rs:570-585 | bindings/c/src/scoped_access.rs:593-608 | bindings/c/src/scoped_access.rs:616-631 | bindings/c/src/scoped_access.rs:1152-1167 | bindings/c/src/soft_extras.rs:268-283 | bindings/c/src/soft_extras.rs:301-316 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 19+ corresponding lines) · ×1
Edited copies of one member (7 members, 19+ corresponding lines) bindings/c/src/scoped_access.rs:754— bindings/c/src/scoped_access.rs:754-774 | bindings/c/src/scoped_access.rs:943-963 | bindings/c/src/scoped_access.rs:974-994 | bindings/c/src/scoped_access.rs:1036-1057 | bindings/c/src/scoped_access.rs:1068-1089 | bindings/c/src/soft_extras.rs:154-172 | bindings/c/src/soft_extras.rs:206-224 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 15+ corresponding lines) · ×1
Edited copies of one member (5 members, 15+ corresponding lines) bindings/c/src/extra.rs:318— bindings/c/src/extra.rs:318-333 | bindings/c/src/extra.rs:370-393 | bindings/c/src/joints.rs:265-280 | bindings/c/src/joints.rs:314-329 | bindings/c/src/objects.rs:307-321 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 14+ corresponding lines) · ×1
Edited copies of one member (4 members, 14+ corresponding lines) bindings/c/src/extra.rs:172— bindings/c/src/extra.rs:172-189 | bindings/c/src/geometry.rs:170-183 | bindings/c/src/geometry.rs:760-773 | bindings/c/src/geometry.rs:780-793 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) bindings/python/rapier-py-3d/src/joints.rs:3426— bindings/python/rapier-py-3d/src/joints.rs:3426-3441 | bindings/python/rapier-py-3d/src/joints.rs:3454-3469 | bindings/python/rapier-py-3d/src/joints.rs:3562-3577 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 13+ corresponding lines) · ×1
Edited copies of one member (4 members, 13+ corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:1643— bindings/python/rapier-py-3d/src/dynamics.rs:1643-1655 | bindings/python/rapier-py-3d/src/geometry.rs:3542-3554 | bindings/python/rapier-py-3d/src/joints.rs:2844-2856 | bindings/python/rapier-py-3d/src/soft_body.rs:2479-2494 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 15+ corresponding lines) · ×1
Edited copies of one member (6 members, 15+ corresponding lines) bindings/c/src/geometry_views.rs:12— bindings/c/src/geometry_views.rs:12-26 | bindings/c/src/geometry_views.rs:57-72 | bindings/c/src/geometry_views.rs:127-141 | bindings/c/src/geometry_views.rs:150-164 | bindings/c/src/geometry_views.rs:174-188 | bindings/c/src/geometry_views.rs:238-253 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) examples3d/dynamic_trimesh3.rs:138— examples3d/dynamic_trimesh3.rs:138-158 | examples3d/soft_trimesh3.rs:285-303 | examples3d/voxels3.rs:318-339 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) bindings/c/src/handle_access.rs:1298— bindings/c/src/handle_access.rs:1298-1317 | bindings/c/src/objects.rs:130-146 | bindings/c/src/scoped_access.rs:2709-2728 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 20+ corresponding lines) · ×1
Edited copies of one member (3 members, 20+ corresponding lines) src/dynamics/rigid_body.rs:1120— src/dynamics/rigid_body.rs:1120-1141 | src/dynamics/rigid_body.rs:1153-1172 | src/dynamics/rigid_body.rs:1180-1199 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 11+ corresponding lines) · ×1
Edited copies of one member (7 members, 11+ corresponding lines) bindings/c/src/soft_body.rs:869— bindings/c/src/soft_body.rs:869-879 | bindings/c/src/soft_body.rs:884-894 | bindings/c/src/soft_body.rs:899-909 | bindings/c/src/soft_body.rs:914-924 | bindings/c/src/soft_body.rs:929-939 | bindings/c/src/soft_body.rs:1135-1150 | bindings/c/src/soft_extras.rs:82-96 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) bindings/python/rapier-testbed/rapier_testbed/_obj.py:24— bindings/python/rapier-testbed/rapier_testbed/_obj.py:24-40 | bindings/python/rapier-testbed/rapier_testbed/examples3/mjcf3.py:30-41 | bindings/python/rapier-testbed/rapier_testbed/examples3/urdf3.py:27-38 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 12+ corresponding lines) · ×1
Edited copies of one member (4 members, 12+ corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:3020— bindings/python/rapier-py-3d/src/dynamics.rs:3020-3031 | bindings/python/rapier-py-3d/src/geometry.rs:4910-4921 | bindings/python/rapier-py-3d/src/joints.rs:3113-3127 | bindings/python/rapier-py-3d/src/soft_body.rs:3612-3623 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 11+ corresponding lines) · ×1
Edited copies of one member (5 members, 11+ corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:2970— bindings/python/rapier-py-3d/src/dynamics.rs:2970-2980 | bindings/python/rapier-py-3d/src/dynamics.rs:2985-2998 | bindings/python/rapier-py-3d/src/geometry.rs:4867-4877 | bindings/python/rapier-py-3d/src/soft_body.rs:3568-3578 | bindings/python/rapier-py-3d/src/soft_body.rs:3583-3596 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 9+ corresponding lines) · ×1
Edited copies of one member (4 members, 9+ corresponding lines) bindings/c/src/dynamics.rs:627— bindings/c/src/dynamics.rs:627-635 | bindings/c/src/dynamics.rs:642-652 | bindings/c/src/soft_extras.rs:129-140 | bindings/c/src/soft_extras.rs:180-191 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) bindings/c/src/soft_body.rs:155— bindings/c/src/soft_body.rs:155-161 | bindings/c/src/soft_body.rs:168-174 | bindings/c/src/soft_body.rs:181-187 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 9+ corresponding lines) · ×1
Edited copies of one member (7 members, 9+ corresponding lines) bindings/c/src/soft_body.rs:209— bindings/c/src/soft_body.rs:209-217 | bindings/c/src/soft_body.rs:222-230 | bindings/c/src/soft_body.rs:235-243 | bindings/c/src/soft_body.rs:248-256 | bindings/c/src/soft_body.rs:262-271 | bindings/c/src/soft_body.rs:277-286 | bindings/c/src/soft_body.rs:1202-1210 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (2 corresponding lines) · ×1
Edited copy of a member (2 corresponding lines) bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:19— bindings/python/rapier-testbed/rapier_testbed/examples3/joints3.py:19-20 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/joint_prismatic3.py:14-15 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 4+ corresponding lines) · ×1
Edited copies of one member (3 members, 4+ corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:1680— bindings/python/rapier-py-3d/src/dynamics.rs:1680-1684 | bindings/python/rapier-py-3d/src/joints.rs:2313-2319 | bindings/python/rapier-py-3d/src/soft_body.rs:3313-3316 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 4+ corresponding lines) · ×1
Edited copies of one member (4 members, 4+ corresponding lines) bindings/python/rapier-py-3d/src/dynamics.rs:111— bindings/python/rapier-py-3d/src/dynamics.rs:111-114 | bindings/python/rapier-py-3d/src/geometry.rs:230-233 | bindings/python/rapier-py-3d/src/joints.rs:536-539 | bindings/python/rapier-py-3d/src/soft_body.rs:113-116 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (71–75 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:64— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:64-138 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:70-140 — before extracting anything, compare `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs` and `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (58 lines × 3) bindings/python/rapier-py-3d/src/joints.rs:2961— bindings/python/rapier-py-3d/src/joints.rs:2961-3018 | bindings/python/rapier-py-3d/src/joints.rs:3879-3936 | bindings/python/rapier-py-3d/src/joints.rs:3961-4018 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (54 lines × 2) bindings/python/rapier-py-3d/src/loaders.rs:1974— bindings/python/rapier-py-3d/src/loaders.rs:1974-2027 | bindings/python/rapier-py-3d/src/loaders.rs:2086-2139 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/loaders.rs:1974` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (38 lines × 2) examples2d/heightfield2.rs:33— examples2d/heightfield2.rs:33-70 | examples2d/polyline2.rs:34-71 — before extracting anything, compare `examples2d/heightfield2.rs` and `examples2d/polyline2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/heightfield2.rs:33` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (42–43 lines × 2) examples2d/soft_joints2.rs:153— examples2d/soft_joints2.rs:153-194 | examples3d/soft_joints3.rs:205-247 — before extracting anything, compare `examples2d/soft_joints2.rs` and `examples3d/soft_joints3.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_joints2.rs:153` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (34 lines × 2) examples3d/heightfield3.rs:49— examples3d/heightfield3.rs:49-82 | examples3d/trimesh3.rs:59-92 — before extracting anything, compare `examples3d/heightfield3.rs` and `examples3d/trimesh3.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (33 lines × 12) bindings/python/rapier-py-3d/src/controllers.rs:751— bindings/python/rapier-py-3d/src/controllers.rs:751-783 | bindings/python/rapier-py-3d/src/pipeline.rs:1179-1211 | bindings/python/rapier-py-3d/src/pipeline.rs:1263-1295 | bindings/python/rapier-py-3d/src/pipeline.rs:1352-1384 | bindings/python/rapier-py-3d/src/pipeline.rs:1448-1480 | bindings/python/rapier-py-3d/src/pipeline.rs:1534-1566 | bindings/python/rapier-py-3d/src/pipeline.rs:1625-1657 | bindings/python/rapier-py-3d/src/pipeline.rs:1723-1755 | bindings/python/rapier-py-3d/src/pipeline.rs:1820-1852 | bindings/python/rapier-py-3d/src/pipeline.rs:1913-1945 | bindings/python/rapier-py-3d/src/pipeline.rs:2005-2037 | bindings/python/rapier-py-3d/src/pipeline.rs:2104-2136 — there are 12 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 12 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/controllers.rs:751` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (33 lines × 2) examples2d/utils/character.rs:236— examples2d/utils/character.rs:236-268 | examples3d/utils/character.rs:252-284 — before extracting anything, compare `examples2d/utils/character.rs` and `examples3d/utils/character.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (30 lines × 2) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:215— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:215-244 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:250-279 — before extracting anything, compare `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs` and `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:215` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (29 lines × 2) examples2d/one_way_platforms2.rs:23— examples2d/one_way_platforms2.rs:23-51 | examples3d/one_way_platforms3.rs:23-51 — before extracting anything, compare `examples2d/one_way_platforms2.rs` and `examples3d/one_way_platforms3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/one_way_platforms2.rs:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26–27 lines × 2) crates/rapier3d-urdf/src/lib.rs:540— crates/rapier3d-urdf/src/lib.rs:540-565 | crates/rapier3d-urdf/src/lib.rs:591-617 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/rapier3d-urdf/src/lib.rs:540` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (17–25 lines × 3) src/dynamics/solver/joint_constraint/generic_joint_constraint_builder.rs:499— src/dynamics/solver/joint_constraint/generic_joint_constraint_builder.rs:499-515 | src/dynamics/solver/joint_constraint/generic_joint_constraint_builder.rs:538-554 | src/dynamics/solver/joint_constraint/generic_joint_constraint_builder.rs:588-612 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (23–25 lines × 2) src/dynamics/solver/staged_island_solver/joints.rs:202— src/dynamics/solver/staged_island_solver/joints.rs:202-226 | src/dynamics/solver/staged_island_solver/joints.rs:380-402 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/staged_island_solver/joints.rs:202` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24 lines × 2) examples2d/utils/character.rs:182— examples2d/utils/character.rs:182-205 | examples3d/utils/character.rs:198-221 — before extracting anything, compare `examples2d/utils/character.rs` and `examples3d/utils/character.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (23–24 lines × 2) src/dynamics/joint/multibody_joint/multibody_joint.rs:362— src/dynamics/joint/multibody_joint/multibody_joint.rs:362-384 | src/dynamics/joint/multibody_joint/multibody_joint.rs:435-458 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/joint/multibody_joint/multibody_joint.rs:362` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 4) bindings/python/rapier-py-3d/src/pipeline.rs:2663— bindings/python/rapier-py-3d/src/pipeline.rs:2663-2684 | bindings/python/rapier-py-3d/src/pipeline.rs:2788-2809 | bindings/python/rapier-py-3d/src/pipeline.rs:3238-3259 | bindings/python/rapier-py-3d/src/pipeline.rs:3310-3331 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/pipeline.rs:2663` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bindings/python/rapier-py-3d/src/pipeline.rs:2661` calls `wake_up_modified_bodies` and `bindings/python/rapier-py-3d/src/pipeline.rs:3236` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (4–22 lines × 4) src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:370— src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:370-391 | src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:468-471 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:436-457 | src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs:537-540 — before extracting anything, compare `src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs` and `src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (18–20 lines × 2) src/dynamics/solver/staged_island_solver/solve.rs:179— src/dynamics/solver/staged_island_solver/solve.rs:179-198 | src/dynamics/solver/staged_island_solver/solve.rs:265-282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/staged_island_solver/solve.rs:179` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–19 lines × 2) examples2d/debug_angular_limits2.rs:67— examples2d/debug_angular_limits2.rs:67-84 | examples3d/debug_angular_limits3.rs:72-90 — before extracting anything, compare `examples2d/debug_angular_limits2.rs` and `examples3d/debug_angular_limits3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/debug_angular_limits2.rs:67` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (25–28 lines × 2) src/dynamics/solver/contact_constraint/contact_constraint_element.rs:140— src/dynamics/solver/contact_constraint/contact_constraint_element.rs:140-167 | src/dynamics/solver/contact_constraint/contact_constraint_element.rs:675-699 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16–18 lines × 3) examples2d/all_examples2.rs:215— examples2d/all_examples2.rs:215-230 | examples3d-f64/all_examples3-f64.rs:32-47 | examples3d/all_examples3.rs:267-284 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/all_examples2.rs:215` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–17 lines × 2) examples2d/b2d_tumbler.rs:55— examples2d/b2d_tumbler.rs:55-67 | examples2d/s2d_confined.rs:66-82 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/b2d_tumbler.rs:55` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–17 lines × 2) src/dynamics/solver/staged_island_solver/worker.rs:510— src/dynamics/solver/staged_island_solver/worker.rs:510-526 | src/dynamics/solver/staged_island_solver/worker.rs:737-751 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/staged_island_solver/worker.rs:510` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 3) examples2d/inv_pyramid2.rs:8— examples2d/inv_pyramid2.rs:8-23 | examples2d/pyramid2.rs:8-23 | examples2d/stress_tests/pyramid2.rs:8-23 — before extracting anything, compare `examples2d/pyramid2.rs` and `examples2d/stress_tests/pyramid2.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (3–16 lines × 3) examples2d/soft_force_tearing2.rs:166— examples2d/soft_force_tearing2.rs:166-168 | examples2d/soft_tearing2.rs:104-117 | examples3d/soft_tearing3.rs:122-137 — before extracting anything, compare `examples2d/soft_force_tearing2.rs` and `examples2d/soft_tearing2.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_tearing2.rs:104` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–15 lines × 8) examples3d/compound3.rs:74— examples3d/compound3.rs:74-85 | examples3d/debug_shape_modification3.rs:97-108 | examples3d/primitives3.rs:59-73 | examples3d/stress_tests/boxes3.rs:47-58 | examples3d/stress_tests/capsules3.rs:48-59 | examples3d/stress_tests/ccd3.rs:63-74 | examples3d/stress_tests/compound3.rs:53-64 | examples3d/stress_tests/convex_polyhedron3.rs:65-76 — before extracting anything, compare `examples3d/compound3.rs` and `examples3d/primitives3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/compound3.rs:74` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 3) examples2d/pin_slot_joint2.rs:86— examples2d/pin_slot_joint2.rs:86-100 | examples2d/rope_joints2.rs:67-83 | examples3d/rope_joints3.rs:95-110 — before extracting anything, compare `examples2d/pin_slot_joint2.rs` and `examples2d/rope_joints2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/pin_slot_joint2.rs:86` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) bindings/bevy_rapier/src/plugin/systems/remove.rs:94— bindings/bevy_rapier/src/plugin/systems/remove.rs:94-108 | bindings/bevy_rapier/src/plugin/systems/remove.rs:114-127 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/bevy_rapier/src/plugin/systems/remove.rs:94` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–15 lines × 2) examples3d/b3d_washer.rs:13— examples3d/b3d_washer.rs:13-24 | examples3d/stress_tests/pyramid3.rs:14-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13–15 lines × 2) examples3d/character_controller3.rs:56— examples3d/character_controller3.rs:56-70 | examples3d/vehicle_controller3.rs:50-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/character_controller3.rs:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–15 lines × 2) examples3d/debug_self_intersect3.rs:9— examples3d/debug_self_intersect3.rs:9-23 | examples3d/soft_meshes3.rs:26-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10–15 lines × 2) examples3d/harness_capsules3.rs:21— examples3d/harness_capsules3.rs:21-30 | examples3d/stress_tests/capsules3.rs:18-32 — before extracting anything, compare `examples3d/harness_capsules3.rs` and `examples3d/stress_tests/capsules3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9–15 lines × 2) src/dynamics/solver/contact_constraint/generic_contact_constraint.rs:203— src/dynamics/solver/contact_constraint/generic_contact_constraint.rs:203-211 | src/dynamics/solver/contact_constraint/generic_contact_constraint.rs:300-314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/contact_constraint/generic_contact_constraint.rs:203` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–14 lines × 41) examples3d-f64/trimesh3_f64.rs:84— examples3d-f64/trimesh3_f64.rs:84-94 | examples3d/collision_groups3.rs:86-95 | examples3d/compound3.rs:80-89 | examples3d/convex_polyhedron3.rs:61-70 | examples3d/debug_balls3.rs:53-62 | examples3d/debug_big_colliders3.rs:35-44 | examples3d/debug_boxes3.rs:36-45 | examples3d/debug_chain_high_mass_ratio3.rs:67-76 | examples3d/debug_cube_high_mass_ratio3.rs:90-99 | examples3d/debug_cylinder3.rs:50-59 | examples3d/debug_eccentric_boxes3.rs:37-46 | examples3d/debug_friction3.rs:34-43 | examples3d/debug_internal_edges3.rs:61-70 | examples3d/debug_long_chain3.rs:58-67 | examples3d/debug_multi_collider_body3.rs:53-62 | examples3d/debug_pop3.rs:36-45 | examples3d/debug_prismatic3.rs:65-74 | examples3d/debug_thin_cube_on_mesh3.rs:50-59 | examples3d/debug_triangle3.rs:32-41 | examples3d/debug_trimesh3.rs:54-63 | examples3d/debug_two_cubes3.rs:22-31 | examples3d/domino3.rs:75-84 | examples3d/dynamic_trimesh3.rs:127-136 | examples3d/heightfield3.rs:92-101 | examples3d/keva3.rs:112-121 | examples3d/newton_cradle3.rs:41-50 | examples3d/primitives3.rs:65-78 | examples3d/stress_tests/balls3.rs:47-56 | examples3d/stress_tests/boxes3.rs:53-62 | examples3d/stress_tests/capsules3.rs:54-63 | examples3d/stress_tests/ccd3.rs:69-78 | examples3d/stress_tests/compound3.rs:59-68 | examples3d/stress_tests/convex_polyhedron3.rs:71-80 | examples3d/stress_tests/heightfield3.rs:70-79 | examples3d/stress_tests/keva3.rs:110-119 | examples3d/stress_tests/many_pyramids3.rs:74-83 | examples3d/stress_tests/many_sleep3.rs:48-57 | examples3d/stress_tests/many_static3.rs:46-55 | examples3d/stress_tests/stacks3.rs:174-183 | examples3d/stress_tests/trimesh3.rs:75-84 | examples3d/trimesh3.rs:102-111 — before extracting anything, compare `examples3d/collision_groups3.rs` and `examples3d/compound3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d-f64/trimesh3_f64.rs:84` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples3d/debug_chain_high_mass_ratio3.rs:61` calls `push` and `examples3d-f64/trimesh3_f64.rs:78` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 10) examples2d/convex_polygons2.rs:62— examples2d/convex_polygons2.rs:62-75 | examples2d/pyramid2.rs:40-53 | examples2d/restitution2.rs:29-42 | examples2d/s2d_pyramid.rs:35-48 | examples2d/stress_tests/balls2.rs:50-63 | examples2d/stress_tests/boxes2.rs:49-62 | examples2d/stress_tests/capsules2.rs:51-64 | examples2d/stress_tests/convex_polygons2.rs:65-78 | examples2d/stress_tests/pyramid2.rs:40-53 | examples2d/trimesh2.rs:43-56 — before extracting anything, compare `examples2d/convex_polygons2.rs` and `examples2d/stress_tests/boxes2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/convex_polygons2.rs:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 3) crates/rapier3d-mjcf/src/loader/mass.rs:175— crates/rapier3d-mjcf/src/loader/mass.rs:175-188 | crates/rapier3d-mjcf/src/loader/mass.rs:242-254 | crates/rapier3d-mjcf/src/loader/mass.rs:291-303 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11–14 lines × 3) examples2d/ccd2.rs:95— examples2d/ccd2.rs:95-108 | examples2d/sensor2.rs:75-85 | examples3d/ccd3.rs:117-130 — before extracting anything, compare `examples2d/sensor2.rs` and `examples3d/ccd3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/ccd2.rs:95` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples2d/sensor2.rs:73` calls `look_at` and `examples2d/ccd2.rs:93` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–14 lines × 2) examples3d/platform3.rs:18— examples3d/platform3.rs:18-31 | examples3d/sensor3.rs:24-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/platform3.rs:18` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 8) bindings/typescript/src/geometry/broad_phase.rs:44— bindings/typescript/src/geometry/broad_phase.rs:44-56 | bindings/typescript/src/geometry/broad_phase.rs:86-98 | bindings/typescript/src/geometry/broad_phase.rs:175-187 | bindings/typescript/src/geometry/broad_phase.rs:217-229 | bindings/typescript/src/geometry/broad_phase.rs:256-268 | bindings/typescript/src/geometry/broad_phase.rs:297-309 | bindings/typescript/src/geometry/broad_phase.rs:348-360 | bindings/typescript/src/geometry/broad_phase.rs:398-410 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/typescript/src/geometry/broad_phase.rs:44` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 5) examples2d/convex_polygons2.rs:10— examples2d/convex_polygons2.rs:10-22 | examples2d/stress_tests/boxes2.rs:8-20 | examples2d/stress_tests/capsules2.rs:8-20 | examples2d/stress_tests/convex_polygons2.rs:10-22 | examples2d/trimesh2.rs:8-20 — before extracting anything, compare `examples2d/convex_polygons2.rs` and `examples2d/stress_tests/boxes2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12–13 lines × 3) examples2d/soft_pile2.rs:68— examples2d/soft_pile2.rs:68-79 | examples2d/soft_surface2.rs:83-95 | examples3d/soft_surface3.rs:105-117 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_pile2.rs:68` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–13 lines × 2) examples3d/debug_cylinder3.rs:26— examples3d/debug_cylinder3.rs:26-33 | examples3d/primitives3.rs:18-30 — before extracting anything, compare `examples3d/debug_cylinder3.rs` and `examples3d/primitives3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9–13 lines × 2) examples3d/debug_shape_modification3.rs:56— examples3d/debug_shape_modification3.rs:56-68 | examples3d/stress_tests/ccd3.rs:23-31 — before extracting anything, compare `examples3d/debug_shape_modification3.rs` and `examples3d/stress_tests/ccd3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7–12 lines × 5) examples3d/heightfield3.rs:38— examples3d/heightfield3.rs:38-44 | examples3d/stress_tests/compound3.rs:23-29 | examples3d/stress_tests/heightfield3.rs:38-44 | examples3d/stress_tests/trimesh3.rs:43-49 | examples3d/trimesh3.rs:43-54 — before extracting anything, compare `examples3d/heightfield3.rs` and `examples3d/stress_tests/heightfield3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 4) examples2d/soft_fem2.rs:32— examples2d/soft_fem2.rs:32-44 | examples2d/soft_fem2.rs:54-65 | examples3d/soft_fem3.rs:33-45 | examples3d/soft_fem3.rs:60-72 — before extracting anything, compare `examples2d/soft_fem2.rs` and `examples3d/soft_fem3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_fem2.rs:32` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–12 lines × 3) examples3d/debug_disabled3.rs:29— examples3d/debug_disabled3.rs:29-36 | examples3d/fountain3.rs:24-35 | examples3d/joint_motor_position3.rs:64-71 — before extracting anything, compare `examples3d/debug_disabled3.rs` and `examples3d/fountain3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_disabled3.rs:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–21 lines × 2) examples2d/debug_angular_limits2.rs:28— examples2d/debug_angular_limits2.rs:28-45 | examples3d/debug_angular_limits3.rs:28-48 — before extracting anything, compare `examples2d/debug_angular_limits2.rs` and `examples3d/debug_angular_limits3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/debug_angular_limits2.rs:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–11 lines × 4) bindings/c/src/pipeline.rs:1843— bindings/c/src/pipeline.rs:1843-1849 | bindings/c/src/pipeline.rs:1955-1965 | bindings/c/src/pipeline.rs:2003-2013 | bindings/c/src/pipeline.rs:2099-2109 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–11 lines × 2) bindings/c/src/pipeline.rs:2187— bindings/c/src/pipeline.rs:2187-2197 | bindings/c/src/pipeline.rs:2218-2226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/pipeline.rs:2187` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (17–19 lines × 2) examples3d/debug_self_intersect3.rs:62— examples3d/debug_self_intersect3.rs:62-80 | examples3d/debug_self_intersect3.rs:101-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 25) examples2d/b2d_compounds.rs:90— examples2d/b2d_compounds.rs:90-99 | examples2d/b2d_large_pyramid.rs:35-44 | examples2d/b2d_smash.rs:40-49 | examples2d/b2d_spinner.rs:84-93 | examples2d/collision_groups2.rs:82-91 | examples2d/convex_polygons2.rs:69-78 | examples2d/debug_many_colliders2.rs:196-205 | examples2d/pyramid2.rs:47-56 | examples2d/restitution2.rs:36-45 | examples2d/s2d_high_mass_ratio_1.rs:58-67 | examples2d/s2d_joint_grid.rs:57-66 | examples2d/s2d_pyramid.rs:42-51 | examples2d/soft_letters2.rs:63-72 | examples2d/soft_pile2.rs:91-100 | examples2d/stress_tests/balls2.rs:57-66 | examples2d/stress_tests/boxes2.rs:56-65 | examples2d/stress_tests/capsules2.rs:58-67 | examples2d/stress_tests/convex_polygons2.rs:72-81 | examples2d/stress_tests/heightfield2.rs:61-70 | examples2d/stress_tests/joint_fixed2.rs:68-77 | examples2d/stress_tests/joint_prismatic2.rs:54-63 | examples2d/stress_tests/pyramid2.rs:47-56 | examples2d/stress_tests/ragdolls2.rs:92-101 | examples2d/stress_tests/vertical_stacks2.rs:54-63 | examples2d/trimesh2.rs:50-59 — before extracting anything, compare `examples2d/convex_polygons2.rs` and `examples2d/stress_tests/boxes2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/b2d_compounds.rs:90` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–10 lines × 20) bindings/c/src/pipeline.rs:1568— bindings/c/src/pipeline.rs:1568-1577 | bindings/c/src/pipeline.rs:1592-1597 | bindings/c/src/pipeline.rs:1612-1621 | bindings/c/src/pipeline.rs:1636-1645 | bindings/c/src/pipeline.rs:1660-1669 | bindings/c/src/pipeline.rs:1684-1693 | bindings/c/src/pipeline.rs:1708-1713 | bindings/c/src/pipeline.rs:1728-1737 | bindings/c/src/pipeline.rs:1752-1757 | bindings/c/src/pipeline.rs:1772-1781 | bindings/c/src/pipeline.rs:1796-1805 | bindings/c/src/pipeline.rs:1820-1829 | bindings/c/src/pipeline.rs:1864-1873 | bindings/c/src/pipeline.rs:1888-1893 | bindings/c/src/pipeline.rs:1908-1917 | bindings/c/src/pipeline.rs:1932-1941 | bindings/c/src/pipeline.rs:1980-1989 | bindings/c/src/pipeline.rs:2028-2037 | bindings/c/src/pipeline.rs:2052-2061 | bindings/c/src/pipeline.rs:2076-2085 — all 20 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 14) examples2d/s2d_ball_and_chain.rs:74— examples2d/s2d_ball_and_chain.rs:74-83 | examples2d/s2d_bridge.rs:58-67 | examples2d/s2d_high_mass_ratio_2.rs:47-56 | examples2d/s2d_high_mass_ratio_3.rs:41-50 | examples2d/soft_blobs2.rs:57-66 | examples2d/soft_surface2.rs:120-129 | examples2d/stress_tests/soft_blobs2.rs:58-67 | examples2d/stress_tests/soft_cloth_keva2.rs:69-78 | examples2d/stress_tests/soft_fem_beams2.rs:65-74 | examples2d/stress_tests/soft_jellies2.rs:62-71 | examples2d/stress_tests/soft_ropes2.rs:52-61 | examples2d/stress_tests/soft_slab2.rs:76-85 | examples2d/stress_tests/soft_strips2.rs:63-72 | examples2d/voxels2.rs:98-112 — before extracting anything, compare `examples2d/s2d_ball_and_chain.rs` and `examples2d/s2d_bridge.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/s2d_ball_and_chain.rs:74` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 13) examples3d/ccd3.rs:43— examples3d/ccd3.rs:43-52 | examples3d/collision_groups3.rs:9-18 | examples3d/compound3.rs:8-17 | examples3d/convex_polyhedron3.rs:10-19 | examples3d/debug_cylinder3.rs:11-20 | examples3d/debug_eccentric_boxes3.rs:8-17 | examples3d/debug_prismatic3.rs:48-57 | examples3d/domino3.rs:9-18 | examples3d/harness_capsules3.rs:6-15 | examples3d/inverse_kinematics3.rs:8-17 | examples3d/keva3.rs:70-79 | examples3d/locked_rotations3.rs:11-20 | examples3d/sensor3.rs:9-18 — before extracting anything, compare `examples3d/ccd3.rs` and `examples3d/sensor3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 5) src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:386— src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:386-395 | src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:435-444 | src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:541-550 | src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:603-612 | src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:650-659 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/joint_constraint/joint_constraint_helper.rs:386` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–10 lines × 4) examples3d/b3d_rain.rs:144— examples3d/b3d_rain.rs:144-151 | examples3d/debug_disabled3.rs:29-34 | examples3d/fountain3.rs:24-33 | examples3d/joint_motor_position3.rs:64-69 — before extracting anything, compare `examples3d/debug_disabled3.rs` and `examples3d/fountain3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/b3d_rain.rs:144` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–9 lines × 24) bindings/c/src/pipeline.rs:515— bindings/c/src/pipeline.rs:515-521 | bindings/c/src/pipeline.rs:553-559 | bindings/c/src/pipeline.rs:591-597 | bindings/c/src/pipeline.rs:629-635 | bindings/c/src/pipeline.rs:1567-1575 | bindings/c/src/pipeline.rs:1591-1597 | bindings/c/src/pipeline.rs:1611-1619 | bindings/c/src/pipeline.rs:1635-1643 | bindings/c/src/pipeline.rs:1659-1667 | bindings/c/src/pipeline.rs:1683-1691 | bindings/c/src/pipeline.rs:1707-1713 | bindings/c/src/pipeline.rs:1727-1735 | bindings/c/src/pipeline.rs:1751-1757 | bindings/c/src/pipeline.rs:1771-1779 | bindings/c/src/pipeline.rs:1795-1803 | bindings/c/src/pipeline.rs:1819-1827 | bindings/c/src/pipeline.rs:1863-1871 | bindings/c/src/pipeline.rs:1887-1893 | bindings/c/src/pipeline.rs:1907-1915 | bindings/c/src/pipeline.rs:1931-1939 | bindings/c/src/pipeline.rs:1979-1987 | bindings/c/src/pipeline.rs:2027-2035 | bindings/c/src/pipeline.rs:2051-2059 | bindings/c/src/pipeline.rs:2075-2083 — all 24 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 20) bindings/c/src/joint_access.rs:30— bindings/c/src/joint_access.rs:30-38 | bindings/c/src/joint_access.rs:72-80 | bindings/c/src/joint_access.rs:114-122 | bindings/c/src/joint_access.rs:156-164 | bindings/c/src/joint_access.rs:198-206 | bindings/c/src/joint_access.rs:240-248 | bindings/c/src/joint_access.rs:282-290 | bindings/c/src/joint_access.rs:324-332 | bindings/c/src/joint_access.rs:366-374 | bindings/c/src/joint_access.rs:408-416 | bindings/c/src/joint_access.rs:450-458 | bindings/c/src/joint_access.rs:492-500 | bindings/c/src/joint_access.rs:534-542 | bindings/c/src/joint_access.rs:583-591 | bindings/c/src/joint_access.rs:642-650 | bindings/c/src/joint_access.rs:692-700 | bindings/c/src/joint_access.rs:739-747 | bindings/c/src/joint_access.rs:782-790 | bindings/c/src/joint_access.rs:836-844 | bindings/c/src/joint_access.rs:890-898 — all 20 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9–20 lines × 12) bindings/python/rapier-py-3d/src/controllers.rs:741— bindings/python/rapier-py-3d/src/controllers.rs:741-749 | bindings/python/rapier-py-3d/src/pipeline.rs:1158-1177 | bindings/python/rapier-py-3d/src/pipeline.rs:1242-1261 | bindings/python/rapier-py-3d/src/pipeline.rs:1331-1350 | bindings/python/rapier-py-3d/src/pipeline.rs:1427-1446 | bindings/python/rapier-py-3d/src/pipeline.rs:1513-1532 | bindings/python/rapier-py-3d/src/pipeline.rs:1604-1623 | bindings/python/rapier-py-3d/src/pipeline.rs:1702-1721 | bindings/python/rapier-py-3d/src/pipeline.rs:1799-1818 | bindings/python/rapier-py-3d/src/pipeline.rs:1892-1911 | bindings/python/rapier-py-3d/src/pipeline.rs:1984-2003 | bindings/python/rapier-py-3d/src/pipeline.rs:2083-2102 — there are 12 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 12 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-py-3d/src/controllers.rs:741` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bindings/python/rapier-py-3d/src/pipeline.rs:1600` calls `into` and `bindings/python/rapier-py-3d/src/pipeline.rs:1327` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 11) examples2d/b2d_many_pyramids.rs:66— examples2d/b2d_many_pyramids.rs:66-75 | examples2d/b2d_tumbler.rs:60-69 | examples2d/b2d_washer.rs:67-76 | examples2d/damping2.rs:37-46 | examples2d/debug_vertical_column2.rs:39-48 | examples2d/inv_pyramid2.rs:40-49 | examples2d/s2d_arch.rs:101-110 | examples2d/s2d_card_house.rs:72-81 | examples2d/s2d_confined.rs:75-84 | examples2d/soft_bodies2.rs:98-107 | examples2d/soft_fem2.rs:90-98 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 11 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/b2d_many_pyramids.rs:66` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 9) bindings/typescript/src/geometry/broad_phase.rs:42— bindings/typescript/src/geometry/broad_phase.rs:42-49 | bindings/typescript/src/geometry/broad_phase.rs:84-91 | bindings/typescript/src/geometry/broad_phase.rs:124-132 | bindings/typescript/src/geometry/broad_phase.rs:172-180 | bindings/typescript/src/geometry/broad_phase.rs:214-222 | bindings/typescript/src/geometry/broad_phase.rs:253-261 | bindings/typescript/src/geometry/broad_phase.rs:294-302 | bindings/typescript/src/geometry/broad_phase.rs:345-353 | bindings/typescript/src/geometry/broad_phase.rs:395-403 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/typescript/src/geometry/broad_phase.rs:124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 5) examples3d/debug_shape_modification3.rs:67— examples3d/debug_shape_modification3.rs:67-75 | examples3d/harness_capsules3.rs:26-34 | examples3d/primitives3.rs:29-37 | examples3d/stress_tests/capsules3.rs:28-36 | examples3d/stress_tests/compound3.rs:27-35 — before extracting anything, compare `examples3d/debug_shape_modification3.rs` and `examples3d/primitives3.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/debug_shape_modification3.rs:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 31) examples3d/b3d_large_pyramid.rs:37— examples3d/b3d_large_pyramid.rs:37-45 | examples3d/b3d_many_pyramids.rs:61-69 | examples3d/b3d_trees.rs:30-38 | examples3d/b3d_washer.rs:103-111 | examples3d/damping3.rs:38-46 | examples3d/debug_articulations3.rs:80-88 | examples3d/debug_deserialize3.rs:69-77 | examples3d/debug_multibody_ang_motor_pos3.rs:26-34 | examples3d/gyroscopic3.rs:25-33 | examples3d/joints3.rs:558-566 | examples3d/joints3.rs:580-588 | examples3d/locked_rotations3.rs:49-57 | examples3d/mjcf3.rs:45-53 | examples3d/restitution3.rs:40-48 | examples3d/soft_bodies3.rs:95-103 | examples3d/soft_cloth3.rs:67-75 | examples3d/soft_fem3.rs:98-105 | examples3d/soft_pile3.rs:98-106 | examples3d/soft_surface3.rs:150-158 | examples3d/soft_thin_features3.rs:162-170 | examples3d/soft_trimesh3.rs:211-219 | examples3d/spring_joints3.rs:50-58 | examples3d/stress_tests/pyramid3.rs:62-70 | examples3d/stress_tests/soft_blobs3.rs:98-106 | examples3d/stress_tests/soft_cloth_drape3.rs:77-85 | examples3d/stress_tests/soft_cloth_keva3.rs:79-87 | examples3d/stress_tests/soft_fem_beams3.rs:67-75 | examples3d/stress_tests/soft_jellies3.rs:90-98 | examples3d/stress_tests/soft_ropes3.rs:92-100 | examples3d/stress_tests/soft_slab3.rs:112-120 | examples3d/urdf3.rs:46-54 — before extracting anything, compare `examples3d/debug_articulations3.rs` and `examples3d/joints3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/b3d_large_pyramid.rs:37` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples3d/soft_bodies3.rs:89` calls `attach_particle` and `examples3d/soft_cloth3.rs:64` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7–8 lines × 4) bindings/c/src/queries_extras.rs:116— bindings/c/src/queries_extras.rs:116-122 | bindings/c/src/queries_extras.rs:179-185 | bindings/c/src/world_queries.rs:362-369 | bindings/c/src/world_queries.rs:413-420 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/queries_extras.rs:116` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (2–8 lines × 3) examples2d/soft_force_tearing2.rs:81— examples2d/soft_force_tearing2.rs:81-82 | examples2d/soft_stress2.rs:30-37 | examples2d/soft_tearing2.rs:32-39 — before extracting anything, compare `examples2d/soft_force_tearing2.rs` and `examples2d/soft_tearing2.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples2d/soft_stress2.rs:30` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–7 lines × 49) bindings/c/src/pipeline.rs:7— bindings/c/src/pipeline.rs:7-12 | bindings/c/src/pipeline.rs:42-47 | bindings/c/src/pipeline.rs:77-82 | bindings/c/src/pipeline.rs:112-117 | bindings/c/src/pipeline.rs:151-156 | bindings/c/src/pipeline.rs:190-195 | bindings/c/src/pipeline.rs:228-233 | bindings/c/src/pipeline.rs:266-271 | bindings/c/src/pipeline.rs:307-312 | bindings/c/src/pipeline.rs:345-350 | bindings/c/src/pipeline.rs:382-387 | bindings/c/src/pipeline.rs:422-427 | bindings/c/src/pipeline.rs:460-465 | bindings/c/src/pipeline.rs:494-499 | bindings/c/src/pipeline.rs:532-537 | bindings/c/src/pipeline.rs:570-575 | bindings/c/src/pipeline.rs:608-613 | bindings/c/src/pipeline.rs:646-651 | bindings/c/src/pipeline.rs:686-691 | bindings/c/src/soft_extras.rs:405-411 | bindings/c/src/soft_extras.rs:426-431 | bindings/c/src/soft_extras.rs:443-449 | bindings/c/src/soft_extras.rs:464-470 | bindings/c/src/soft_extras.rs:485-491 | bindings/c/src/soft_extras.rs:506-511 | bindings/c/src/soft_extras.rs:523-528 | bindings/c/src/soft_extras.rs:540-546 | bindings/c/src/soft_extras.rs:561-566 | bindings/c/src/soft_extras.rs:578-583 | bindings/c/src/soft_extras.rs:595-601 | bindings/c/src/soft_extras.rs:618-624 | bindings/c/src/soft_extras.rs:639-644 | bindings/c/src/soft_extras.rs:656-661 | bindings/c/src/soft_extras.rs:673-678 | bindings/c/src/soft_extras.rs:690-696 | bindings/c/src/soft_extras.rs:711-717 | bindings/c/src/soft_extras.rs:732-738 | bindings/c/src/soft_extras.rs:753-759 | bindings/c/src/soft_extras.rs:810-815 | bindings/c/src/soft_extras.rs:827-832 | bindings/c/src/soft_extras.rs:844-849 | bindings/c/src/soft_extras.rs:861-866 | bindings/c/src/soft_extras.rs:878-883 | bindings/c/src/soft_extras.rs:895-900 | bindings/c/src/soft_extras.rs:931-936 | bindings/c/src/soft_extras.rs:967-973 | bindings/c/src/soft_extras.rs:989-994 | bindings/c/src/soft_extras.rs:1007-1012 | bindings/c/src/soft_extras.rs:1025-1030 — before extracting anything, compare `bindings/c/src/pipeline.rs` and `bindings/c/src/soft_extras.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/pipeline.rs:7` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 35) bindings/c/src/dynamics.rs:782— bindings/c/src/dynamics.rs:782-788 | bindings/c/src/handle_access.rs:267-273 | bindings/c/src/handle_access.rs:297-303 | bindings/c/src/handle_access.rs:327-333 | bindings/c/src/handle_access.rs:357-363 | bindings/c/src/handle_access.rs:385-391 | bindings/c/src/handle_access.rs:412-418 | bindings/c/src/handle_access.rs:441-447 | bindings/c/src/handle_access.rs:508-514 | bindings/c/src/handle_access.rs:574-580 | bindings/c/src/handle_access.rs:603-609 | bindings/c/src/handle_access.rs:634-640 | bindings/c/src/handle_access.rs:665-671 | bindings/c/src/handle_access.rs:694-700 | bindings/c/src/handle_access.rs:718-724 | bindings/c/src/handle_access.rs:1754-1760 | bindings/c/src/scoped_access.rs:1255-1261 | bindings/c/src/scoped_access.rs:1282-1288 | bindings/c/src/scoped_access.rs:1370-1376 | bindings/c/src/scoped_access.rs:2239-2245 | bindings/c/src/scoped_access.rs:2269-2275 | bindings/c/src/scoped_access.rs:2297-2303 | bindings/c/src/scoped_access.rs:2326-2332 | bindings/c/src/scoped_access.rs:2354-2360 | bindings/c/src/scoped_access.rs:2381-2387 | bindings/c/src/scoped_access.rs:2410-2416 | bindings/c/src/scoped_access.rs:2440-2446 | bindings/c/src/scoped_access.rs:2468-2474 | bindings/c/src/scoped_access.rs:2495-2501 | bindings/c/src/scoped_access.rs:2522-2528 | bindings/c/src/scoped_access.rs:2551-2557 | bindings/c/src/scoped_access.rs:2581-2587 | bindings/c/src/scoped_access.rs:2612-2618 | bindings/c/src/scoped_access.rs:2642-2648 | bindings/c/src/scoped_access.rs:2791-2797 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/dynamics.rs:782` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `handle` to `RprRigidBodyHandle` in one and `RprColliderHandle` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `bindings/c/src/scoped_access.rs:1289` calls `cast` and `bindings/c/src/handle_access.rs:275` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 24) bindings/c/src/geometry.rs:706— bindings/c/src/geometry.rs:706-712 | bindings/c/src/handle_access.rs:947-953 | bindings/c/src/handle_access.rs:971-977 | bindings/c/src/handle_access.rs:994-1000 | bindings/c/src/handle_access.rs:1017-1023 | bindings/c/src/handle_access.rs:1040-1046 | bindings/c/src/handle_access.rs:1063-1069 | bindings/c/src/handle_access.rs:1086-1092 | bindings/c/src/handle_access.rs:1730-1736 | bindings/c/src/scoped_access.rs:1310-1316 | bindings/c/src/scoped_access.rs:1518-1524 | bindings/c/src/scoped_access.rs:2818-2824 | bindings/c/src/scoped_access.rs:2841-2847 | bindings/c/src/scoped_access.rs:2864-2870 | bindings/c/src/scoped_access.rs:2887-2893 | bindings/c/src/scoped_access.rs:2910-2916 | bindings/c/src/scoped_access.rs:2933-2939 | bindings/c/src/scoped_access.rs:2956-2962 | bindings/c/src/scoped_access.rs:2979-2985 | bindings/c/src/scoped_access.rs:3002-3008 | bindings/c/src/scoped_access.rs:3025-3031 | bindings/c/src/scoped_access.rs:3048-3054 | bindings/c/src/scoped_access.rs:3509-3515 | bindings/c/src/scoped_access.rs:3532-3538 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/geometry.rs:706` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `handle` to `RprColliderHandle` in one and `RprRigidBodyHandle` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 22) bindings/c/src/handle_access.rs:1390— bindings/c/src/handle_access.rs:1390-1396 | bindings/c/src/joint_access.rs:26-32 | bindings/c/src/joint_access.rs:68-74 | bindings/c/src/joint_access.rs:110-116 | bindings/c/src/joint_access.rs:152-158 | bindings/c/src/joint_access.rs:194-200 | bindings/c/src/joint_access.rs:236-242 | bindings/c/src/joint_access.rs:278-284 | bindings/c/src/joint_access.rs:320-326 | bindings/c/src/joint_access.rs:362-368 | bindings/c/src/joint_access.rs:404-410 | bindings/c/src/joint_access.rs:446-452 | bindings/c/src/joint_access.rs:488-494 | bindings/c/src/joint_access.rs:530-536 | bindings/c/src/joint_access.rs:579-585 | bindings/c/src/joint_access.rs:638-644 | bindings/c/src/joint_access.rs:688-694 | bindings/c/src/joint_access.rs:735-741 | bindings/c/src/joint_access.rs:778-784 | bindings/c/src/joint_access.rs:832-838 | bindings/c/src/joint_access.rs:886-892 | bindings/c/src/joints.rs:241-247 — there are 22 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 22 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/handle_access.rs:1390` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 16) bindings/c/src/pipeline.rs:6— bindings/c/src/pipeline.rs:6-12 | bindings/c/src/pipeline.rs:41-47 | bindings/c/src/pipeline.rs:76-82 | bindings/c/src/pipeline.rs:111-117 | bindings/c/src/pipeline.rs:150-156 | bindings/c/src/pipeline.rs:189-195 | bindings/c/src/pipeline.rs:227-233 | bindings/c/src/pipeline.rs:265-271 | bindings/c/src/pipeline.rs:306-312 | bindings/c/src/pipeline.rs:1476-1482 | bindings/c/src/pipeline.rs:1512-1518 | bindings/c/src/soft_extras.rs:638-644 | bindings/c/src/soft_extras.rs:731-737 | bindings/c/src/soft_extras.rs:826-832 | bindings/c/src/soft_extras.rs:966-972 | bindings/c/src/soft_extras.rs:988-994 — before extracting anything, compare `bindings/c/src/pipeline.rs` and `bindings/c/src/soft_extras.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/pipeline.rs:6` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 7) bindings/c/src/pipeline.rs:344— bindings/c/src/pipeline.rs:344-350 | bindings/c/src/pipeline.rs:381-387 | bindings/c/src/pipeline.rs:421-427 | bindings/c/src/pipeline.rs:459-465 | bindings/c/src/pipeline.rs:1547-1553 | bindings/c/src/soft_extras.rs:1006-1012 | bindings/c/src/soft_extras.rs:1024-1030 — before extracting anything, compare `bindings/c/src/pipeline.rs` and `bindings/c/src/soft_extras.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/pipeline.rs:344` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 6) bindings/c/src/queries_extras.rs:420— bindings/c/src/queries_extras.rs:420-426 | bindings/c/src/queries_extras.rs:452-458 | bindings/c/src/scoped_access.rs:384-390 | bindings/c/src/scoped_access.rs:912-918 | bindings/c/src/scoped_access.rs:1005-1011 | bindings/c/src/scoped_access.rs:2710-2716 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/queries_extras.rs:420` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–7 lines × 2) src/dynamics/island_manager/persistent.rs:331— src/dynamics/island_manager/persistent.rs:331-337 | src/dynamics/island_manager/persistent.rs:410-415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/island_manager/persistent.rs:331` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 31) bindings/c/src/pipeline.rs:514— bindings/c/src/pipeline.rs:514-519 | bindings/c/src/pipeline.rs:552-557 | bindings/c/src/pipeline.rs:590-595 | bindings/c/src/pipeline.rs:628-633 | bindings/c/src/pipeline.rs:666-671 | bindings/c/src/pipeline.rs:706-711 | bindings/c/src/pipeline.rs:1566-1571 | bindings/c/src/pipeline.rs:1590-1595 | bindings/c/src/pipeline.rs:1610-1615 | bindings/c/src/pipeline.rs:1634-1639 | bindings/c/src/pipeline.rs:1658-1663 | bindings/c/src/pipeline.rs:1682-1687 | bindings/c/src/pipeline.rs:1706-1711 | bindings/c/src/pipeline.rs:1726-1731 | bindings/c/src/pipeline.rs:1750-1755 | bindings/c/src/pipeline.rs:1770-1775 | bindings/c/src/pipeline.rs:1794-1799 | bindings/c/src/pipeline.rs:1818-1823 | bindings/c/src/pipeline.rs:1842-1847 | bindings/c/src/pipeline.rs:1862-1867 | bindings/c/src/pipeline.rs:1886-1891 | bindings/c/src/pipeline.rs:1906-1911 | bindings/c/src/pipeline.rs:1930-1935 | bindings/c/src/pipeline.rs:1954-1959 | bindings/c/src/pipeline.rs:1978-1983 | bindings/c/src/pipeline.rs:2002-2007 | bindings/c/src/pipeline.rs:2026-2031 | bindings/c/src/pipeline.rs:2050-2055 | bindings/c/src/pipeline.rs:2074-2079 | bindings/c/src/pipeline.rs:2098-2103 | bindings/c/src/soft_extras.rs:783-788 — before extracting anything, compare `bindings/c/src/pipeline.rs` and `bindings/c/src/soft_extras.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/pipeline.rs:514` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 16) bindings/c/src/handle_access.rs:160— bindings/c/src/handle_access.rs:160-165 | bindings/c/src/handle_access.rs:194-199 | bindings/c/src/handle_access.rs:875-880 | bindings/c/src/handle_access.rs:1692-1697 | bindings/c/src/objects.rs:165-170 | bindings/c/src/objects.rs:258-263 | bindings/c/src/scoped_access.rs:1428-1433 | bindings/c/src/scoped_access.rs:1970-1975 | bindings/c/src/scoped_access.rs:2003-2008 | bindings/c/src/scoped_access.rs:2069-2074 | bindings/c/src/scoped_access.rs:2102-2107 | bindings/c/src/scoped_access.rs:2135-2140 | bindings/c/src/scoped_access.rs:2168-2173 | bindings/c/src/scoped_access.rs:2201-2206 | bindings/c/src/scoped_access.rs:2754-2759 | bindings/c/src/scoped_access.rs:3405-3410 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/handle_access.rs:160` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `out` to `*mut RprAngVector` in one and `*mut RprBool` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 15) examples3d/ccd3.rs:48— examples3d/ccd3.rs:48-53 | examples3d/collision_groups3.rs:14-19 | examples3d/compound3.rs:13-18 | examples3d/convex_polyhedron3.rs:15-20 | examples3d/debug_cylinder3.rs:16-21 | examples3d/debug_disabled3.rs:12-17 | examples3d/debug_eccentric_boxes3.rs:13-18 | examples3d/debug_prismatic3.rs:53-58 | examples3d/domino3.rs:14-19 | examples3d/fountain3.rs:14-19 | examples3d/harness_capsules3.rs:11-16 | examples3d/inverse_kinematics3.rs:13-18 | examples3d/keva3.rs:75-80 | examples3d/locked_rotations3.rs:16-21 | examples3d/sensor3.rs:14-19 — before extracting anything, compare `examples3d/ccd3.rs` and `examples3d/sensor3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples3d/debug_disabled3.rs:22` calls `dynamic`, `translation`, `cuboid` and `examples3d/fountain3.rs:24` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 13) bindings/c/src/handle_access.rs:807— bindings/c/src/handle_access.rs:807-812 | bindings/c/src/handle_access.rs:841-846 | bindings/c/src/scoped_access.rs:1772-1777 | bindings/c/src/scoped_access.rs:1805-1810 | bindings/c/src/scoped_access.rs:1838-1843 | bindings/c/src/scoped_access.rs:1871-1876 | bindings/c/src/scoped_access.rs:1904-1909 | bindings/c/src/scoped_access.rs:1937-1942 | bindings/c/src/scoped_access.rs:3238-3243 | bindings/c/src/scoped_access.rs:3271-3276 | bindings/c/src/scoped_access.rs:3304-3309 | bindings/c/src/scoped_access.rs:3337-3342 | bindings/c/src/scoped_access.rs:3372-3377 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/handle_access.rs:807` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `out` to `*mut RprVector` in one and `*mut RprReal` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 8) bindings/c/src/pipeline.rs:365— bindings/c/src/pipeline.rs:365-370 | bindings/c/src/pipeline.rs:402-407 | bindings/c/src/pipeline.rs:443-448 | bindings/c/src/pipeline.rs:477-482 | bindings/c/src/pipeline.rs:1531-1536 | bindings/c/src/pipeline.rs:2165-2170 | bindings/c/src/soft_extras.rs:914-919 | bindings/c/src/soft_extras.rs:950-955 — before extracting anything, compare `bindings/c/src/pipeline.rs` and `bindings/c/src/soft_extras.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/pipeline.rs:365` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 7) bindings/c/src/handle_access.rs:58— bindings/c/src/handle_access.rs:58-63 | bindings/c/src/handle_access.rs:92-97 | bindings/c/src/handle_access.rs:773-778 | bindings/c/src/scoped_access.rs:1605-1610 | bindings/c/src/scoped_access.rs:1640-1645 | bindings/c/src/scoped_access.rs:1673-1678 | bindings/c/src/scoped_access.rs:2669-2674 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/handle_access.rs:58` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `out` to `*mut RprPose` in one and `*mut RprVector` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (2–6 lines × 3) examples2d/debug_self_intersect2.rs:179— examples2d/debug_self_intersect2.rs:179-184 | examples2d/debug_self_intersect2.rs:185-190 | examples2d/debug_self_intersect2.rs:191-192 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples2d/debug_self_intersect2.rs:190` calls `eight_blob`, `asym_eight` and `examples2d/debug_self_intersect2.rs:192` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 33) bindings/c/src/handle_access.rs:270— bindings/c/src/handle_access.rs:270-279 | bindings/c/src/handle_access.rs:300-309 | bindings/c/src/handle_access.rs:330-339 | bindings/c/src/handle_access.rs:360-369 | bindings/c/src/handle_access.rs:388-397 | bindings/c/src/handle_access.rs:415-424 | bindings/c/src/handle_access.rs:444-453 | bindings/c/src/handle_access.rs:511-520 | bindings/c/src/handle_access.rs:577-586 | bindings/c/src/handle_access.rs:606-615 | bindings/c/src/handle_access.rs:637-646 | bindings/c/src/handle_access.rs:668-677 | bindings/c/src/handle_access.rs:697-706 | bindings/c/src/handle_access.rs:721-730 | bindings/c/src/handle_access.rs:1757-1766 | bindings/c/src/scoped_access.rs:1258-1267 | bindings/c/src/scoped_access.rs:1373-1382 | bindings/c/src/scoped_access.rs:2242-2251 | bindings/c/src/scoped_access.rs:2272-2281 | bindings/c/src/scoped_access.rs:2300-2309 | bindings/c/src/scoped_access.rs:2329-2338 | bindings/c/src/scoped_access.rs:2357-2366 | bindings/c/src/scoped_access.rs:2384-2393 | bindings/c/src/scoped_access.rs:2413-2422 | bindings/c/src/scoped_access.rs:2443-2452 | bindings/c/src/scoped_access.rs:2471-2480 | bindings/c/src/scoped_access.rs:2498-2507 | bindings/c/src/scoped_access.rs:2525-2534 | bindings/c/src/scoped_access.rs:2554-2563 | bindings/c/src/scoped_access.rs:2584-2593 | bindings/c/src/scoped_access.rs:2615-2624 | bindings/c/src/scoped_access.rs:2645-2654 | bindings/c/src/scoped_access.rs:2794-2803 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `handle` to `RprRigidBodyHandle` in one and `RprColliderHandle` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 32) bindings/c/src/handle_access.rs:1112— bindings/c/src/handle_access.rs:1112-1118 | bindings/c/src/handle_access.rs:1140-1146 | bindings/c/src/handle_access.rs:1164-1170 | bindings/c/src/scoped_access.rs:45-51 | bindings/c/src/scoped_access.rs:68-74 | bindings/c/src/scoped_access.rs:90-96 | bindings/c/src/scoped_access.rs:112-118 | bindings/c/src/scoped_access.rs:134-140 | bindings/c/src/scoped_access.rs:156-162 | bindings/c/src/scoped_access.rs:178-184 | bindings/c/src/scoped_access.rs:200-206 | bindings/c/src/scoped_access.rs:222-228 | bindings/c/src/scoped_access.rs:244-250 | bindings/c/src/scoped_access.rs:271-277 | bindings/c/src/scoped_access.rs:300-306 | bindings/c/src/scoped_access.rs:329-335 | bindings/c/src/scoped_access.rs:358-364 | bindings/c/src/scoped_access.rs:388-394 | bindings/c/src/scoped_access.rs:702-708 | bindings/c/src/scoped_access.rs:729-735 | bindings/c/src/scoped_access.rs:758-764 | bindings/c/src/scoped_access.rs:916-922 | bindings/c/src/scoped_access.rs:947-953 | bindings/c/src/scoped_access.rs:978-984 | bindings/c/src/scoped_access.rs:1009-1015 | bindings/c/src/scoped_access.rs:1041-1047 | bindings/c/src/scoped_access.rs:1073-1079 | bindings/c/src/scoped_access.rs:1102-1108 | bindings/c/src/scoped_access.rs:1129-1135 | bindings/c/src/scoped_access.rs:1230-1236 | bindings/c/src/soft_extras.rs:26-32 | bindings/c/src/soft_extras.rs:63-69 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bindings/c/src/scoped_access.rs:1040` calls `check_world` and `bindings/c/src/handle_access.rs:1111` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 29) bindings/c/src/handle_access.rs:1112— bindings/c/src/handle_access.rs:1112-1116 | bindings/c/src/handle_access.rs:1140-1144 | bindings/c/src/handle_access.rs:1164-1168 | bindings/c/src/objects.rs:331-335 | bindings/c/src/scoped_access.rs:45-49 | bindings/c/src/scoped_access.rs:68-72 | bindings/c/src/scoped_access.rs:90-94 | bindings/c/src/scoped_access.rs:112-116 | bindings/c/src/scoped_access.rs:134-138 | bindings/c/src/scoped_access.rs:156-160 | bindings/c/src/scoped_access.rs:178-182 | bindings/c/src/scoped_access.rs:200-204 | bindings/c/src/scoped_access.rs:222-226 | bindings/c/src/scoped_access.rs:244-248 | bindings/c/src/scoped_access.rs:271-275 | bindings/c/src/scoped_access.rs:300-304 | bindings/c/src/scoped_access.rs:329-333 | bindings/c/src/scoped_access.rs:358-362 | bindings/c/src/scoped_access.rs:388-392 | bindings/c/src/scoped_access.rs:702-706 | bindings/c/src/scoped_access.rs:729-733 | bindings/c/src/scoped_access.rs:758-762 | bindings/c/src/scoped_access.rs:916-920 | bindings/c/src/scoped_access.rs:947-951 | bindings/c/src/scoped_access.rs:978-982 | bindings/c/src/scoped_access.rs:1009-1013 | bindings/c/src/scoped_access.rs:3609-3613 | bindings/c/src/soft_extras.rs:26-30 | bindings/c/src/soft_extras.rs:63-67 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 20) examples3d/b3d_trees.rs:29— examples3d/b3d_trees.rs:29-33 | examples3d/debug_articulations3.rs:79-83 | examples3d/debug_deserialize3.rs:67-72 | examples3d/debug_multibody_ang_motor_pos3.rs:25-29 | examples3d/gyroscopic3.rs:24-28 | examples3d/inverse_kinematics3.rs:56-60 | examples3d/joints3.rs:557-561 | examples3d/joints3.rs:579-583 | examples3d/locked_rotations3.rs:48-52 | examples3d/mjcf3.rs:44-48 | examples3d/rope_joints3.rs:92-96 | examples3d/soft_bodies3.rs:94-98 | examples3d/soft_cloth3.rs:66-70 | examples3d/soft_surface3.rs:149-153 | examples3d/soft_thin_features3.rs:161-165 | examples3d/soft_trimesh3.rs:210-214 | examples3d/stress_tests/soft_cloth_drape3.rs:76-80 | examples3d/stress_tests/soft_cloth_keva3.rs:78-82 | examples3d/stress_tests/soft_fem_beams3.rs:66-70 | examples3d/urdf3.rs:45-49 — before extracting anything, compare `examples3d/debug_articulations3.rs` and `examples3d/joints3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/b3d_trees.rs:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples3d/soft_bodies3.rs:89` calls `attach_particle` and `examples3d/soft_cloth3.rs:64` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 9) examples3d/collision_groups3.rs:86— examples3d/collision_groups3.rs:86-90 | examples3d/convex_polyhedron3.rs:61-65 | examples3d/debug_balls3.rs:53-57 | examples3d/heightfield3.rs:92-96 | examples3d/stress_tests/balls3.rs:47-51 | examples3d/stress_tests/many_kinematics3.rs:46-50 | examples3d/stress_tests/many_sleep3.rs:48-52 | examples3d/stress_tests/many_static3.rs:46-50 | examples3d/trimesh3.rs:102-106 — before extracting anything, compare `examples3d/collision_groups3.rs` and `examples3d/convex_polyhedron3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/collision_groups3.rs:86` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 7) examples3d/compound3.rs:28— examples3d/compound3.rs:28-32 | examples3d/debug_shape_modification3.rs:67-71 | examples3d/harness_capsules3.rs:26-30 | examples3d/primitives3.rs:29-33 | examples3d/stress_tests/capsules3.rs:28-32 | examples3d/stress_tests/ccd3.rs:30-34 | examples3d/stress_tests/compound3.rs:27-31 — before extracting anything, compare `examples3d/compound3.rs` and `examples3d/primitives3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 6) bindings/bevy_rapier/src/plugin/systems/collider.rs:209— bindings/bevy_rapier/src/plugin/systems/collider.rs:209-213 | bindings/bevy_rapier/src/plugin/systems/collider.rs:218-222 | bindings/bevy_rapier/src/plugin/systems/collider.rs:227-231 | bindings/bevy_rapier/src/plugin/systems/collider.rs:265-269 | bindings/bevy_rapier/src/plugin/systems/collider.rs:274-278 | bindings/bevy_rapier/src/plugin/systems/collider.rs:301-305 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/bevy_rapier/src/plugin/systems/collider.rs:209` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (32 lines × 2) bindings/bevy_rapier/src/geometry/shape_views/cone.rs:15— bindings/bevy_rapier/src/geometry/shape_views/cone.rs:15-46 | bindings/bevy_rapier/src/geometry/shape_views/cylinder.rs:15-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/bevy_rapier/src/geometry/shape_views/cone.rs:15` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 13) bindings/c/src/control.rs:98— bindings/c/src/control.rs:98-106 | bindings/c/src/control.rs:587-595 | bindings/c/src/objects.rs:65-73 | bindings/c/src/pipeline.rs:1088-1096 | bindings/c/src/pipeline.rs:1306-1314 | bindings/c/src/render.rs:226-234 | bindings/c/src/robotics.rs:99-107 | bindings/c/src/robotics.rs:155-163 | bindings/c/src/robotics.rs:349-357 | bindings/c/src/robotics.rs:405-413 | bindings/c/src/robotics.rs:996-1004 | bindings/c/src/robotics.rs:1148-1156 | bindings/c/src/soft_body.rs:401-409 — there are 13 copies across 6 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 13 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/control.rs:98` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 6) bindings/c/src/dynamics.rs:106— bindings/c/src/dynamics.rs:106-111 | bindings/c/src/dynamics.rs:186-191 | bindings/c/src/dynamics.rs:216-221 | bindings/c/src/dynamics.rs:250-255 | bindings/c/src/dynamics.rs:260-265 | bindings/c/src/geometry.rs:631-636 — before extracting anything, compare `bindings/c/src/dynamics.rs` and `bindings/c/src/geometry.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/dynamics.rs:106` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `out` to `*mut u32` in one and `*mut RprBool` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 11) bindings/c/src/dynamics.rs:438— bindings/c/src/dynamics.rs:438-445 | bindings/c/src/dynamics.rs:450-457 | bindings/c/src/dynamics.rs:462-469 | bindings/c/src/dynamics.rs:843-850 | bindings/c/src/geometry.rs:290-297 | bindings/c/src/geometry.rs:302-309 | bindings/c/src/geometry.rs:314-321 | bindings/c/src/geometry.rs:326-333 | bindings/c/src/geometry.rs:338-345 | bindings/c/src/geometry.rs:410-417 | bindings/c/src/geometry.rs:422-429 — before extracting anything, compare `bindings/c/src/dynamics.rs` and `bindings/c/src/geometry.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/dynamics.rs:438` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `RprReal` in one and `RprBool` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 62) bindings/c/src/handle_access.rs:44— bindings/c/src/handle_access.rs:44-52 | bindings/c/src/handle_access.rs:78-86 | bindings/c/src/handle_access.rs:112-120 | bindings/c/src/handle_access.rs:146-154 | bindings/c/src/handle_access.rs:180-188 | bindings/c/src/handle_access.rs:214-222 | bindings/c/src/handle_access.rs:248-256 | bindings/c/src/handle_access.rs:759-767 | bindings/c/src/handle_access.rs:793-801 | bindings/c/src/handle_access.rs:827-835 | bindings/c/src/handle_access.rs:861-869 | bindings/c/src/handle_access.rs:895-903 | bindings/c/src/handle_access.rs:929-937 | bindings/c/src/handle_access.rs:1433-1441 | bindings/c/src/handle_access.rs:1467-1475 | bindings/c/src/handle_access.rs:1501-1509 | bindings/c/src/handle_access.rs:1535-1543 | bindings/c/src/handle_access.rs:1570-1578 | bindings/c/src/handle_access.rs:1604-1612 | bindings/c/src/handle_access.rs:1640-1648 | bindings/c/src/handle_access.rs:1676-1684 | bindings/c/src/handle_access.rs:1712-1720 | bindings/c/src/scoped_access.rs:29-37 | bindings/c/src/scoped_access.rs:1352-1360 | bindings/c/src/scoped_access.rs:1415-1423 | bindings/c/src/scoped_access.rs:1448-1456 | bindings/c/src/scoped_access.rs:1559-1567 | bindings/c/src/scoped_access.rs:1592-1600 | bindings/c/src/scoped_access.rs:1625-1633 | bindings/c/src/scoped_access.rs:1660-1668 | bindings/c/src/scoped_access.rs:1693-1701 | bindings/c/src/scoped_access.rs:1726-1734 | bindings/c/src/scoped_access.rs:1759-1767 | bindings/c/src/scoped_access.rs:1792-1800 | bindings/c/src/scoped_access.rs:1825-1833 | bindings/c/src/scoped_access.rs:1858-1866 | bindings/c/src/scoped_access.rs:1891-1899 | bindings/c/src/scoped_access.rs:1924-1932 | bindings/c/src/scoped_access.rs:1957-1965 | bindings/c/src/scoped_access.rs:1990-1998 | bindings/c/src/scoped_access.rs:2023-2031 | bindings/c/src/scoped_access.rs:2056-2064 | bindings/c/src/scoped_access.rs:2089-2097 | bindings/c/src/scoped_access.rs:2122-2130 | bindings/c/src/scoped_access.rs:2155-2163 | bindings/c/src/scoped_access.rs:2188-2196 | bindings/c/src/scoped_access.rs:2221-2229 | bindings/c/src/scoped_access.rs:2774-2782 | bindings/c/src/scoped_access.rs:3088-3096 | bindings/c/src/scoped_access.rs:3123-3131 | bindings/c/src/scoped_access.rs:3158-3166 | bindings/c/src/scoped_access.rs:3191-3199 | bindings/c/src/scoped_access.rs:3225-3233 | bindings/c/src/scoped_access.rs:3258-3266 | bindings/c/src/scoped_access.rs:3291-3299 | bindings/c/src/scoped_access.rs:3324-3332 | bindings/c/src/scoped_access.rs:3357-3365 | bindings/c/src/scoped_access.rs:3392-3400 | bindings/c/src/scoped_access.rs:3425-3433 | bindings/c/src/scoped_access.rs:3458-3466 | bindings/c/src/scoped_access.rs:3493-3501 | bindings/c/src/soft_extras.rs:337-345 — before extracting anything, compare `bindings/c/src/handle_access.rs` and `bindings/c/src/scoped_access.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/c/src/handle_access.rs:44` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `out` to `*mut RprPose` in one and `*mut RprVector` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (4–5 lines × 3) src/dynamics/solver/contact_constraint/contact_constraint_element.rs:111— src/dynamics/solver/contact_constraint/contact_constraint_element.rs:111-115 | src/dynamics/solver/contact_constraint/contact_constraint_element.rs:129-133 | src/dynamics/solver/contact_constraint/contact_constraint_element.rs:136-139 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/dynamics/solver/contact_constraint/contact_constraint_element.rs:111` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/dynamics/solver/contact_constraint/contact_constraint_element.rs:115` calls `gdot` and `src/dynamics/solver/contact_constraint/contact_constraint_element.rs:139` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (27–28 lines × 2) bindings/python/rapier-testbed/rapier_testbed/examples3/keva3.py:71— bindings/python/rapier-testbed/rapier_testbed/examples3/keva3.py:71-98 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/keva3.py:18-44 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14–16 lines × 4) bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:37— bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:37-52 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/heightfield3.py:37-52 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/trimesh3.py:39-52 | bindings/python/rapier-testbed/rapier_testbed/examples3/trimesh3.py:76-91 — before extracting anything, compare `bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py` and `bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/heightfield3.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:37` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–14 lines × 4) bindings/python/rapier-testbed/rapier_testbed/examples3/ccd3.py:45— bindings/python/rapier-testbed/rapier_testbed/examples3/ccd3.py:45-56 | bindings/python/rapier-testbed/rapier_testbed/examples3/compound3.py:22-33 | bindings/python/rapier-testbed/rapier_testbed/examples3/convex_polyhedron3.py:28-39 | bindings/python/rapier-testbed/rapier_testbed/examples3/primitives3.py:26-39 — before extracting anything, compare `bindings/python/rapier-testbed/rapier_testbed/examples3/compound3.py` and `bindings/python/rapier-testbed/rapier_testbed/examples3/convex_polyhedron3.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11–13 lines × 3) bindings/python/rapier-testbed/rapier_testbed/examples3/harness_capsules3.py:37— bindings/python/rapier-testbed/rapier_testbed/examples3/harness_capsules3.py:37-47 | bindings/python/rapier-testbed/rapier_testbed/examples3/primitives3.py:45-57 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/capsules3.py:31-41 — before extracting anything, compare `bindings/python/rapier-testbed/rapier_testbed/examples3/harness_capsules3.py` and `bindings/python/rapier-testbed/rapier_testbed/examples3/primitives3.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-testbed/rapier_testbed/examples3/harness_capsules3.py:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–12 lines × 22) bindings/python/rapier-testbed/rapier_testbed/examples3/ccd3.py:40— bindings/python/rapier-testbed/rapier_testbed/examples3/ccd3.py:40-49 | bindings/python/rapier-testbed/rapier_testbed/examples3/collision_groups3.py:17-26 | bindings/python/rapier-testbed/rapier_testbed/examples3/compound3.py:17-26 | bindings/python/rapier-testbed/rapier_testbed/examples3/convex_polyhedron3.py:23-32 | bindings/python/rapier-testbed/rapier_testbed/examples3/domino3.py:14-23 | bindings/python/rapier-testbed/rapier_testbed/examples3/harness_capsules3.py:18-27 | bindings/python/rapier-testbed/rapier_testbed/examples3/inverse_kinematics3.py:19-28 | bindings/python/rapier-testbed/rapier_testbed/examples3/keva3.py:66-75 | bindings/python/rapier-testbed/rapier_testbed/examples3/locked_rotations3.py:12-21 | bindings/python/rapier-testbed/rapier_testbed/examples3/platform3.py:14-23 | bindings/python/rapier-testbed/rapier_testbed/examples3/primitives3.py:20-31 | bindings/python/rapier-testbed/rapier_testbed/examples3/restitution3.py:12-21 | bindings/python/rapier-testbed/rapier_testbed/examples3/sensor3.py:12-21 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/boxes3.py:12-21 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/capsules3.py:12-21 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/ccd3.py:12-21 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/compound3.py:12-21 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/convex_polyhedron3.py:20-29 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/keva3.py:13-22 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/pyramid3.py:40-49 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/stacks3.py:83-92 | bindings/python/rapier-testbed/rapier_testbed/examples3/vehicle_controller3.py:21-30 — before extracting anything, compare `bindings/python/rapier-testbed/rapier_testbed/examples3/compound3.py` and `bindings/python/rapier-testbed/rapier_testbed/examples3/convex_polyhedron3.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-testbed/rapier_testbed/examples3/ccd3.py:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 5) bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:16— bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:16-25 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/heightfield3.py:16-25 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/trimesh3.py:17-26 | bindings/python/rapier-testbed/rapier_testbed/examples3/trimesh3.py:52-61 | bindings/python/rapier-testbed/rapier_testbed/examples3/vehicle_joints3.py:21-31 — before extracting anything, compare `bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py` and `bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/heightfield3.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10–11 lines × 3) bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:52— bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:52-61 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/ccd3.py:45-55 | bindings/python/rapier-testbed/rapier_testbed/examples3/trimesh3.py:91-100 — before extracting anything, compare `bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py` and `bindings/python/rapier-testbed/rapier_testbed/examples3/trimesh3.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/ccd3.py:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 4) bindings/python/rapier-testbed/rapier_testbed/examples3/harness_capsules3.py:35— bindings/python/rapier-testbed/rapier_testbed/examples3/harness_capsules3.py:35-42 | bindings/python/rapier-testbed/rapier_testbed/examples3/primitives3.py:43-51 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/capsules3.py:29-36 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/compound3.py:28-35 — before extracting anything, compare `bindings/python/rapier-testbed/rapier_testbed/examples3/harness_capsules3.py` and `bindings/python/rapier-testbed/rapier_testbed/examples3/primitives3.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-testbed/rapier_testbed/examples3/harness_capsules3.py:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–8 lines × 3) bindings/python/rapier-testbed/rapier_testbed/examples3/ccd3.py:27— bindings/python/rapier-testbed/rapier_testbed/examples3/ccd3.py:27-34 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/pyramid3.py:29-35 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/stacks3.py:31-37 — before extracting anything, compare `bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/pyramid3.py` and `bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/stacks3.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bindings/python/rapier-testbed/rapier_testbed/examples3/ccd3.py:27` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication· Edited copy of a member (63 corresponding lines) · ×1
Edited copy of a member (63 corresponding lines) examples2d/stress_tests/soft_slab2.rs:9— examples2d/stress_tests/soft_slab2.rs:9-71 | examples3d/stress_tests/soft_slab3.rs:9-95 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (60 corresponding lines) · ×1
Edited copy of a member (60 corresponding lines) examples2d/stress_tests/joint_prismatic2.rs:4— examples2d/stress_tests/joint_prismatic2.rs:4-63 | examples3d/stress_tests/joint_prismatic3.rs:4-63 — These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 63+ corresponding lines) · ×1
Edited copies of one member (4 members, 63+ corresponding lines) examples2d/stress_tests/joint_ball2.rs:4— examples2d/stress_tests/joint_ball2.rs:4-68 | examples2d/stress_tests/joint_fixed2.rs:4-77 | examples3d/stress_tests/joint_ball3.rs:4-66 | examples3d/stress_tests/joint_fixed3.rs:4-84 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 63 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (52 corresponding lines) · ×1
Edited copy of a member (52 corresponding lines) examples2d/stress_tests/soft_fem_beams2.rs:9— examples2d/stress_tests/soft_fem_beams2.rs:9-60 | examples3d/stress_tests/soft_fem_beams3.rs:9-61 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/balls3.py:12— bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/balls3.py:12-38 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/many_static3.py:12-38 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 24+ corresponding lines) · ×1
Edited copies of one member (4 members, 24+ corresponding lines) examples3d/stress_tests/soft_blobs3.rs:83— examples3d/stress_tests/soft_blobs3.rs:83-106 | examples3d/stress_tests/soft_jellies3.rs:75-98 | examples3d/stress_tests/soft_ropes3.rs:77-100 | examples3d/stress_tests/soft_slab3.rs:97-120 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (27 lines × 4) examples3d/stress_tests/soft_blobs3.rs:10— examples3d/stress_tests/soft_blobs3.rs:10-36 | examples3d/stress_tests/soft_jellies3.rs:10-36 | examples3d/stress_tests/soft_ropes3.rs:10-36 | examples3d/stress_tests/soft_slab3.rs:10-36 — before extracting anything, compare `examples3d/stress_tests/soft_blobs3.rs` and `examples3d/stress_tests/soft_jellies3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (23 lines × 2) examples3d/stress_tests/heightfield3.rs:49— examples3d/stress_tests/heightfield3.rs:49-71 | examples3d/stress_tests/trimesh3.rs:54-76 — before extracting anything, compare `examples3d/stress_tests/heightfield3.rs` and `examples3d/stress_tests/trimesh3.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/stress_tests/heightfield3.rs:49` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 3) examples2d/stress_tests/boxes2.rs:15— examples2d/stress_tests/boxes2.rs:15-34 | examples2d/stress_tests/capsules2.rs:15-34 | examples2d/stress_tests/convex_polygons2.rs:17-36 — before extracting anything, compare `examples2d/stress_tests/boxes2.rs` and `examples2d/stress_tests/capsules2.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 3) examples3d/stress_tests/balls3.rs:9— examples3d/stress_tests/balls3.rs:9-27 | examples3d/stress_tests/many_sleep3.rs:8-26 | examples3d/stress_tests/many_static3.rs:8-26 — before extracting anything, compare `examples3d/stress_tests/balls3.rs` and `examples3d/stress_tests/many_sleep3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/stress_tests/balls3.rs:9` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 4) examples3d/stress_tests/soft_blobs3.rs:84— examples3d/stress_tests/soft_blobs3.rs:84-101 | examples3d/stress_tests/soft_jellies3.rs:76-93 | examples3d/stress_tests/soft_ropes3.rs:78-95 | examples3d/stress_tests/soft_slab3.rs:98-115 — before extracting anything, compare `examples3d/stress_tests/soft_blobs3.rs` and `examples3d/stress_tests/soft_jellies3.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples3d/stress_tests/soft_blobs3.rs:84` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 4) examples3d/stress_tests/boxes3.rs:8— examples3d/stress_tests/boxes3.rs:8-24 | examples3d/stress_tests/capsules3.rs:8-24 | examples3d/stress_tests/ccd3.rs:8-24 | examples3d/stress_tests/ray_cast3.rs:8-24 — before extracting anything, compare `examples3d/stress_tests/boxes3.rs` and `examples3d/stress_tests/capsules3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 7) examples2d/stress_tests/soft_blobs2.rs:56— examples2d/stress_tests/soft_blobs2.rs:56-66 | examples2d/stress_tests/soft_cloth_keva2.rs:67-77 | examples2d/stress_tests/soft_fem_beams2.rs:63-73 | examples2d/stress_tests/soft_jellies2.rs:60-70 | examples2d/stress_tests/soft_ropes2.rs:50-60 | examples2d/stress_tests/soft_slab2.rs:74-84 | examples2d/stress_tests/soft_strips2.rs:61-71 — before extracting anything, compare `examples2d/stress_tests/soft_blobs2.rs` and `examples2d/stress_tests/soft_jellies2.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 3) bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/balls3.py:12— bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/balls3.py:12-29 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/many_sleep3.py:12-29 | bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/many_static3.py:12-29 — before extracting anything, compare `bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/balls3.py` and `bindings/python/rapier-testbed/rapier_testbed/examples3/stress_tests/many_sleep3.py` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the jest suite in bindings/typescript/rapier-compat/ ran and not one test passed (FAIL tests/World3d.test.ts), so the coverage would describe the failed run, not the code. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
Duplication concentrated across 4 sibling directories (15 clone groups) bindings/typescript/src.ts/dynamics/rigid_body.ts:1412— 15 duplicated blocks under bindings/typescript/src.ts/ have copies in at least two of the sibling directories control, dynamics, geometry, pipeline — 7 of them are reported below, and 8 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 15 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 15 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 15 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 2 sibling directories (7 clone groups) bindings/typescript/testbed2d/src/Testbed.ts:1— 7 duplicated blocks under bindings/typescript/ have copies in at least two of the sibling directories testbed2d, testbed3d — 5 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Wholesale file copy (133 identical lines × 2 files) bindings/typescript/testbed2d/src/Testbed.ts:1— bindings/typescript/testbed2d/src/Testbed.ts:1 · bindings/typescript/testbed3d/src/Testbed.ts:1 — these 2 files are line-for-line copies of one another — 133 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (94 matched lines × 2 locations) · ×1
Duplicated block with local edits (94 matched lines × 2 locations) bindings/typescript/testbed2d/src/Gui.ts:6— bindings/typescript/testbed2d/src/Gui.ts:6 · bindings/typescript/testbed3d/src/Gui.ts:23 — the two spans are one implementation copied and then locally edited — 649 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (42 matched lines × 2 locations) · ×1
Duplicated block with local edits (42 matched lines × 2 locations) bindings/typescript/src.ts/geometry/shape.ts:81— bindings/typescript/src.ts/geometry/shape.ts:81 · bindings/typescript/src.ts/geometry/shape.ts:279 — the two spans are one implementation copied and then locally edited — 397 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (42 lines × 2 locations) bindings/typescript/testbed2d/webpack.config.js:5— bindings/typescript/testbed2d/webpack.config.js:5 · bindings/typescript/testbed3d/webpack.config.js:5 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (34 lines × 2 locations) bindings/typescript/src.ts/geometry/collider_set.ts:89— bindings/typescript/src.ts/geometry/collider_set.ts:89 · bindings/typescript/src.ts/geometry/collider_set.ts:174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (33 lines × 2 locations) bindings/typescript/src.ts/geometry/point.ts:43— bindings/typescript/src.ts/geometry/point.ts:43 · bindings/typescript/src.ts/geometry/ray.ts:100 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (30 matched lines × 2 locations) · ×1
Duplicated block with local edits (30 matched lines × 2 locations) bindings/typescript/src.ts/dynamics/rigid_body_set.ts:182— bindings/typescript/src.ts/dynamics/rigid_body_set.ts:182 · bindings/typescript/src.ts/dynamics/soft_body_set.ts:256 — the two spans are one implementation copied and then locally edited — 155 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (27 lines × 2 locations) bindings/typescript/src.ts/dynamics/impulse_joint.ts:595— bindings/typescript/src.ts/dynamics/impulse_joint.ts:595 · bindings/typescript/src.ts/dynamics/impulse_joint.ts:675 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (26 lines × 2 locations) bindings/typescript/src.ts/geometry/shape.ts:669— bindings/typescript/src.ts/geometry/shape.ts:669 · bindings/typescript/src.ts/geometry/shape.ts:699 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (23 lines × 2 locations) bindings/typescript/src.ts/dynamics/rigid_body.ts:1412— bindings/typescript/src.ts/dynamics/rigid_body.ts:1412 · bindings/typescript/src.ts/geometry/collider.ts:1945 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (22 lines × 2 locations) bindings/typescript/src.ts/dynamics/rigid_body.ts:142— bindings/typescript/src.ts/dynamics/rigid_body.ts:142 · bindings/typescript/src.ts/dynamics/rigid_body.ts:185 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (18 lines × 3 locations) bindings/typescript/src.ts/dynamics/impulse_joint.ts:543— bindings/typescript/src.ts/dynamics/impulse_joint.ts:543 · bindings/typescript/src.ts/dynamics/impulse_joint.ts:642 · bindings/typescript/src.ts/dynamics/impulse_joint.ts:745 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (18 matched lines × 2 locations) · ×1
Duplicated block with local edits (18 matched lines × 2 locations) bindings/typescript/src.ts/geometry/broad_phase.ts:441— bindings/typescript/src.ts/geometry/broad_phase.ts:441 · bindings/typescript/src.ts/geometry/collider.ts:1223 — the two spans are one implementation copied and then locally edited — 66 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (17 lines × 3 locations) bindings/typescript/src.ts/geometry/shape.ts:1124— bindings/typescript/src.ts/geometry/shape.ts:1124 · bindings/typescript/src.ts/geometry/shape.ts:1871 · bindings/typescript/src.ts/geometry/shape.ts:1946 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (15 lines × 3 locations) bindings/typescript/src.ts/dynamics/rigid_body_set.ts:69— bindings/typescript/src.ts/dynamics/rigid_body_set.ts:69 · bindings/typescript/src.ts/geometry/collider_set.ts:89 · bindings/typescript/src.ts/geometry/collider_set.ts:174 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (14 lines × 2 locations) bindings/typescript/testbed3d/src/Graphics.ts:542— bindings/typescript/testbed3d/src/Graphics.ts:542 · bindings/typescript/testbed3d/src/Graphics.ts:556 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (13 lines × 4 locations) bindings/typescript/src.ts/geometry/broad_phase.ts:30— bindings/typescript/src.ts/geometry/broad_phase.ts:30 · bindings/typescript/src.ts/pipeline/debug_render_pipeline.ts:58 · bindings/typescript/src.ts/pipeline/physics_pipeline.ts:29 · bindings/typescript/src.ts/pipeline/serialization_pipeline.ts:30 — the 4 copies are spread across 4 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (13 matched lines × 2 locations) · ×1
Duplicated block with local edits (13 matched lines × 2 locations) bindings/typescript/testbed2d/src/Graphics.ts:120— bindings/typescript/testbed2d/src/Graphics.ts:120 · bindings/typescript/testbed3d/src/Graphics.ts:278 — the two spans are one implementation copied and then locally edited — 94 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (12 lines × 2 locations) bindings/typescript/src.ts/math.ts:34— bindings/typescript/src.ts/math.ts:34 · bindings/typescript/src.ts/math.ts:122 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (11 lines × 2 locations) bindings/typescript/src.ts/dynamics/impulse_joint.ts:289— bindings/typescript/src.ts/dynamics/impulse_joint.ts:289 · bindings/typescript/src.ts/dynamics/multibody_joint.ts:60 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (10 lines × 4 locations) bindings/typescript/src.ts/dynamics/island_manager.ts:16— bindings/typescript/src.ts/dynamics/island_manager.ts:16 · bindings/typescript/src.ts/geometry/broad_phase.ts:26 · bindings/typescript/src.ts/pipeline/physics_pipeline.ts:25 · bindings/typescript/src.ts/pipeline/serialization_pipeline.ts:26 — the 4 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 4 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
Duplicated block (10 lines × 3 locations) bindings/typescript/testbed3d/src/Graphics.ts:200— bindings/typescript/testbed3d/src/Graphics.ts:200 · bindings/typescript/testbed3d/src/Graphics.ts:211 · bindings/typescript/testbed3d/src/Graphics.ts:222 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3 locations) bindings/typescript/src.ts/geometry/shape.ts:193— bindings/typescript/src.ts/geometry/shape.ts:193 · bindings/typescript/src.ts/geometry/shape.ts:205 · bindings/typescript/src.ts/geometry/shape.ts:214 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (8 lines × 6 locations) bindings/typescript/src.ts/dynamics/rigid_body.ts:429— bindings/typescript/src.ts/dynamics/rigid_body.ts:429 · bindings/typescript/src.ts/dynamics/rigid_body.ts:483 · bindings/typescript/src.ts/dynamics/soft_body.ts:709 · bindings/typescript/src.ts/dynamics/soft_body.ts:727 · +2 more site(s) not listed — the 6 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Complex function addCollider (cyclomatic 19, cognitive 13) bindings/typescript/testbed3d/src/Graphics.ts:495— addCollider has cyclomatic complexity 19 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function addCollider (cyclomatic 14, cognitive 12) bindings/typescript/testbed2d/src/Graphics.ts:200— addCollider has cyclomatic complexity 14 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function convexDecomposition (cyclomatic 12, cognitive 20) bindings/typescript/src.ts/geometry/collider.ts:1889— convexDecomposition has cyclomatic complexity 12 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function intoRaw (cyclomatic 12, cognitive 13) bindings/typescript/src.ts/dynamics/soft_body.ts:2168— intoRaw has cyclomatic complexity 12 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function initWorld (cyclomatic 11, cognitive 10) bindings/typescript/testbed3d/src/demos/softTearing.ts:5— initWorld has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· bindings/typescript/src.ts/dynamics/soft_body.ts · ×1
bindings/typescript/src.ts/dynamics/soft_body.ts: 2237 lines of code bindings/typescript/src.ts/dynamics/soft_body.ts:1— bindings/typescript/src.ts/dynamics/soft_body.ts has 2237 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· bindings/typescript/src.ts/geometry/collider.ts · ×1
bindings/typescript/src.ts/geometry/collider.ts: 2039 lines of code bindings/typescript/src.ts/geometry/collider.ts:1— bindings/typescript/src.ts/geometry/collider.ts has 2039 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· bindings/typescript/src.ts/geometry/shape.ts · ×1
bindings/typescript/src.ts/geometry/shape.ts: 1769 lines of code bindings/typescript/src.ts/geometry/shape.ts:1— bindings/typescript/src.ts/geometry/shape.ts has 1769 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· bindings/typescript/src.ts/dynamics/rigid_body.ts · ×1
bindings/typescript/src.ts/dynamics/rigid_body.ts: 1657 lines of code bindings/typescript/src.ts/dynamics/rigid_body.ts:1— bindings/typescript/src.ts/dynamics/rigid_body.ts has 1657 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· bindings/typescript/src.ts/pipeline/world.ts · ×1
bindings/typescript/src.ts/pipeline/world.ts: 1422 lines of code bindings/typescript/src.ts/pipeline/world.ts:1— bindings/typescript/src.ts/pipeline/world.ts has 1422 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· bindings/typescript/src.ts/dynamics/impulse_joint.ts · ×1
bindings/typescript/src.ts/dynamics/impulse_joint.ts: 823 lines of code bindings/typescript/src.ts/dynamics/impulse_joint.ts:1— bindings/typescript/src.ts/dynamics/impulse_joint.ts has 823 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· bindings/typescript/testbed3d/src/Graphics.ts · ×1
bindings/typescript/testbed3d/src/Graphics.ts: 573 lines of code bindings/typescript/testbed3d/src/Graphics.ts:1— bindings/typescript/testbed3d/src/Graphics.ts has 573 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· bindings/typescript/src.ts/geometry/broad_phase.ts · ×1
bindings/typescript/src.ts/geometry/broad_phase.ts: 510 lines of code bindings/typescript/src.ts/geometry/broad_phase.ts:1— bindings/typescript/src.ts/geometry/broad_phase.ts has 510 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· bindings/typescript/src.ts/control/ray_cast_vehicle_controller.ts · ×1
bindings/typescript/src.ts/control/ray_cast_vehicle_controller.ts: 461 lines of code bindings/typescript/src.ts/control/ray_cast_vehicle_controller.ts:1— bindings/typescript/src.ts/control/ray_cast_vehicle_controller.ts has 461 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Unused dependency 'typedoc' — Declared in bindings/typescript/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'wasm-opt' — Declared in bindings/typescript/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'wasm-pack' — Declared in bindings/typescript/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Duplicated predicate bindings/typescript/testbed2d/src/Testbed.ts:141— `this.parameters.running || this.parameters.stepping` appears character-identically in 2 files — bindings/typescript/testbed2d/src/Testbed.ts, bindings/typescript/testbed3d/src/Testbed.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate bindings/typescript/src.ts/dynamics/rigid_body.ts:1413— `typeof x != "number" || typeof y != "number"` appears character-identically in 2 files — bindings/typescript/src.ts/dynamics/rigid_body.ts, bindings/typescript/src.ts/geometry/collider.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate bindings/typescript/src.ts/dynamics/rigid_body.ts:1430— `typeof x != "number" || typeof y != "number" || typeof z != "number"` appears character-identically in 2 files — bindings/typescript/src.ts/dynamics/rigid_body.ts, bindings/typescript/src.ts/geometry/collider.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py:26— `i == 0 or i == nsubdivs or j == 0 or j == nsubdivs` appears character-identically in 2 files — bindings/python/rapier-testbed/rapier_testbed/examples3/heightfield3.py, bindings/python/rapier-testbed/rapier_testbed/examples3/trimesh3.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/geometry/narrow_phase/intersections.rs:68— `!co1.changes.needs_narrow_phase_update() && !co2.changes.needs_narrow_phase_update() && !body_awake(co1) && !body_awake(co2)` appears character-identically in 2 files — src/geometry/narrow_phase/intersections.rs, src/geometry/narrow_phase/pair_update.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/geometry/narrow_phase/intersections.rs:96— `!co1.flags.active_collision_types.test(rb_type1, rb_type2) && !co2.flags.active_collision_types.test(rb_type1, rb_type2)` appears character-identically in 2 files — src/geometry/narrow_phase/intersections.rs, src/geometry/narrow_phase/pair_update.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_vertex_contacts.rs:208— `!out.cross_tangled_vertices.is_empty() || !out.cross_tangled_elements.is_empty()` appears character-identically in 2 files — src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_vertex_contacts.rs, src/geometry/narrow_phase/soft_contacts/soft_contacts_vertex_pass.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_edge_contacts.rs:54— `!params.soft_bodies.recovery.edge_speculation && mesh.is_closed() && other_mesh.is_closed()` appears character-identically in 2 files — src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_edge_contacts.rs, src/geometry/narrow_phase/soft_contacts/soft_contacts_edge_pass.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:717— `!self.manifold_id[ii].is_padding() && contact_id != u8::MAX` appears character-identically in 2 files — src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs, src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate bindings/python/rapier-py-3d/src/pipeline.rs:1053— `aabb.mins.is_finite() && aabb.maxs.is_finite()` appears character-identically in 3 files — bindings/python/rapier-py-3d/src/pipeline.rs, src/geometry/broad_phase_bvh/update.rs, src/pipeline/physics_pipeline/substep.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:371— `constraint.solver_vel1[ii] == u32::MAX || constraint.solver_vel2[ii] == u32::MAX` appears character-identically in 2 files — src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs, src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate examples2d/one_way_platforms2.rs:44— `context.collider1 == self.platform1 || context.collider2 == self.platform2` appears character-identically in 2 files — examples2d/one_way_platforms2.rs, examples3d/one_way_platforms3.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate examples3d-f64/trimesh3_f64.rs:19— `i == 0 || i == nsubdivs || j == 0 || j == nsubdivs` appears character-identically in 3 files — examples3d-f64/trimesh3_f64.rs, examples3d/heightfield3.rs, examples3d/trimesh3.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate examples3d/debug_self_intersect3.rs:138— `i == 0 || j == 0 || i == n - 1 || j == n - 1` appears character-identically in 2 files — examples3d/debug_self_intersect3.rs, examples3d/soft_tearing3.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/dynamics/solver/soft_constraint/soft_contact.rs:306— `id != u32::MAX && (id as usize) < bodies.len()` appears character-identically in 3 files — src/dynamics/solver/soft_constraint/soft_contact.rs, src/dynamics/solver/soft_constraint/soft_element_constraint/soft_elastic_constraint.rs, src/dynamics/solver/soft_constraint/soft_element_constraint/soft_scalar_constraint.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:65— `manifolds[ii].data.relative_dominance <= 0 && !manifold_id[ii].is_padding()` appears character-identically in 2 files — src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs, src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs:72— `manifolds[ii].data.relative_dominance >= 0 && !manifold_id[ii].is_padding()` appears character-identically in 2 files — src/dynamics/solver/contact_constraint/contact_with_coulomb_friction.rs, src/dynamics/solver/contact_constraint/contact_with_twist_friction.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_writeback.rs:98— `material.plastic_yield > 0.0 && material.plastic_creep > 0.0` appears character-identically in 2 files — src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_writeback.rs, src/dynamics/solver/soft_fem/system/soft_fem_system_assemble.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_edge_contacts.rs:50— `mesh.is_closed() && other_mesh.is_closed()` appears character-identically in 2 files — src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_edge_contacts.rs, src/geometry/narrow_phase/soft_contacts/soft_contacts_edge_pass.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate examples2d/sensor2.rs:90— `parent_handle1 != ground_handle && parent_handle1 != sensor_handle` appears character-identically in 3 files — examples2d/sensor2.rs, examples3d/ccd3.rs, examples3d/sensor3.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate examples2d/sensor2.rs:93— `parent_handle2 != ground_handle && parent_handle2 != sensor_handle` appears character-identically in 3 files — examples2d/sensor2.rs, examples3d/ccd3.rs, examples3d/sensor3.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_rigid_coupling.rs:184— `rb.ids.active_island_id == island_id as u32 && !rb.is_sleeping() && rb.is_enabled() && rb.is_dynamic_or_kinematic()` appears character-identically in 2 files — src/dynamics/solver/soft_constraint/soft_constraints_set/soft_constraint_rigid_coupling.rs, src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_body_contacts.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/dynamics/joint/impulse_joint/impulse_joint_set.rs:615— `rb.is_dynamic_or_kinematic() && !rb.is_sleeping()` appears character-identically in 2 files — src/dynamics/joint/impulse_joint/impulse_joint_set.rs, src/dynamics/solver/solver_body.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/geometry/narrow_phase/intersections.rs:78— `rb_handle1 == rb_handle2 && co1.parent.is_some()` appears character-identically in 2 files — src/geometry/narrow_phase/intersections.rs, src/geometry/narrow_phase/pair_update.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_vertex_contacts.rs:145— `recovery.overlap_skin_volume || recovery.overlap_patch_constraints != SoftPatchConstraints::Keep` appears character-identically in 2 files — src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_vertex_contacts.rs, src/dynamics/solver/soft_constraint/soft_contact_assembly/soft_contact_assembly_volume_constraints.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Silent fallback default on Err bindings/typescript/src/geometry/broad_phase.rs:138— `intersectionsWithRay` turns every `Err` into `true` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err bindings/typescript/src/geometry/broad_phase.rs:315— `intersectionsWithPoint` turns every `Err` into `true` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err bindings/typescript/src/geometry/broad_phase.rs:416— `intersectionsWithShape` turns every `Err` into `true` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err bindings/typescript/src/geometry/broad_phase.rs:442— `collidersWithAabbIntersectingAabb` turns every `Err` into `true` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err bindings/typescript/src/utils.rs:76— `with_filter` turns every `Err` into `true` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err bindings/python/rapier-py-3d/src/events_hooks.rs:1211— `filter_contact_pair` turns every `Err` into `Some(rapier::geometry::SolverFlags::default())` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
README/code drift crates/rapier3d-meshloader/README.md:20— crates/rapier3d-meshloader/README.md links to `CODE_OF_CONDUCT.md`, but `crates/rapier3d-meshloader/CODE_OF_CONDUCT.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift crates/rapier3d-meshloader/README.md:21— crates/rapier3d-meshloader/README.md links to `CONTRIBUTING.md`, but `crates/rapier3d-meshloader/CONTRIBUTING.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift crates/rapier3d-urdf/README.md:37— crates/rapier3d-urdf/README.md links to `CODE_OF_CONDUCT.md`, but `crates/rapier3d-urdf/CODE_OF_CONDUCT.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift crates/rapier3d-urdf/README.md:38— crates/rapier3d-urdf/README.md links to `CONTRIBUTING.md`, but `crates/rapier3d-urdf/CONTRIBUTING.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
Orphaned file src/dynamics/joint/pin_slot_joint.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/rapier3d-meshloader/src/lib.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/data/modified_objects.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 73 significant file(s) lose their only recent owner: bindings/python/rapier-py-3d/src/geometry.rs, bindings/python/rapier-py-3d/src/joints.rs, bindings/python/rapier-py-3d/src/pipeline.rs, bindings/python/rapier-py-3d/src/dynamics.rs, src/dynamics/rigid_body.rs, bindings/python/rapier-py-3d/src/loaders.rs, src/dynamics/joint/multibody_joint/multibody.rs, bindings/c/src/pipeline.rs (+65 more). Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (74 single-owned of 556 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 556 of the 841 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: examples2d/multi_pendulum2.rs.
No ADRs found examples3d-f64/Cargo.toml:29— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `examples3d-f64/Cargo.toml` makes this repository a deployable product (line 29).
D21 · Naming Consistency· `RawCCDSolver` spells `CCD` where 12 names in the project spell it `Ccd` · ×1
`RawCCDSolver` spells `CCD` where 12 names in the project spell it `Ccd` bindings/typescript/src/dynamics/ccd_solver.rs:5— 12 of 13 names in project crate spell the token `Ccd` (12 of 13; unit: names in project crate containing `Ccd`). Peers: crate.bindings.bevy_rapier.src.dynamics.rigid_body.SoftCcd (bindings/bevy_rapier/src/dynamics/rigid_body.rs:574); RprIntegrationParameters.minCcdDt (bindings/c/src/config_data.rs:425); RprIntegrationParameters.maxCcdSubsteps (bindings/c/src/config_data.rs:451); RprRigidBodyDesc.softCcdPrediction (bindings/c/src/descriptors.rs:40); RawIntegrationParameters.maxCcdSubsteps (bindings/typescript/src/dynamics/integration_parameters.rs:46). Rename to `RawCcdSolver`. [rule N6]
D21 · Naming Consistency· `rawCCDSolver` spells `CCD` where 19 names in the project spell it `Ccd` · ×1
`rawCCDSolver` spells `CCD` where 19 names in the project spell it `Ccd` bindings/typescript/src.ts/pipeline/world.ts:152— 19 of 20 names in project repository spell the token `Ccd` (19 of 20; unit: names in project repository containing `Ccd`). Peers: IntegrationParameters.maxCcdSubsteps (bindings/typescript/src.ts/dynamics/integration_parameters.ts:75); RigidBody.enableCcd (bindings/typescript/src.ts/dynamics/rigid_body.ts:315); RigidBody.setSoftCcdPrediction (bindings/typescript/src.ts/dynamics/rigid_body.ts:325); RigidBody.softCcdPrediction (bindings/typescript/src.ts/dynamics/rigid_body.ts:335); RigidBody.isCcdEnabled (bindings/typescript/src.ts/dynamics/rigid_body.ts:820). Rename to `rawCcdSolver`. [rule N6]
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 3 of 556 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 556 of the 841 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: src/dynamics/joint/pin_slot_joint.rs, crates/rapier3d-meshloader/src/lib.rs, src/data/modified_objects.rs. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
Logging is not universal — Only 5/12 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `bindings/bevy_rapier/bevy_rapier_benches3d`, `bindings/python/rapier-testbed`, `bindings/typescript/builds/prepare_builds`, `examples2d` and 2 more.
No dependency-update automation bindings/typescript/package.json:5— `bindings/typescript/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
Nullable reference types not enabled everywhere — 0/1 C# file(s) are in a nullable-enabled context. This repository commits no project file, so nothing sets <Nullable>enable</Nullable> for it: a file is enabled only by its own `#nullable enable`, by a Unity `csc.rsp` with `-nullable:enable` for its assembly, or as a file-based app (`#:` directives) whose `#:property Nullable` does not turn it off. NRTs catch a whole class of null-deref bugs at compile time.
doc comments repeat the names bindings/typescript/src.ts/dynamics/rigid_body.ts:53— 2 of 696 documented parameters and 7 of 1063 summaries in `bindings/typescript` only repeat the member or parameter name (e.g. "A rigid-body." for `RigidBody`). 3 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1db5e-55d8-7a75-aa23-43dbc6172b8a · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 96 · Warnings: 1700 · Recommendations: 55 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 18:42 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.