Public report of Genesis-Embodied-AI/genesis-world, published 16 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, 16 November 2026, 05:57 UTC · Survey ID cd_bbecd09e51e54f06bedc9f143c7dabb3
Genesis-Embodied-AI/genesis-world
Measured 16 November 2026, 05:56 UTC, at code version c27c6ca
CAI scoreWeak
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: 143,454 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 1.2 person-years · Weakest lens: Production Readiness, 36
Findings by how serious they are
52 critical1669 serious93 minor
16 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
16 November 2026, 05:56 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 ▸
50of 50 dimensions measured by tools.
1803of 1814 findings point to an exact file and line, so you can open each one in the code. The other 11 concern the repository as a whole, such as missing documentation.
50dimensions across 7 lenses, read from 143,454 lines of product code in 1 project.
Genesis-Embodied-AI/genesis-world falls short of our standard for production, in part because we found no automated security scanning of the code, its secrets or its dependencies. It scores 47 out of 100 and is rated Weak, and 46 of its 52 critical findings are security problems in the build pipeline and in its code.
Production Readiness, at 36, is the weakest lens and counts most in the score. The best first step for the work it takes is fixing the package under a licence on your banned list, worth about 5 points. Adding automated security scanning would lift Production Readiness itself, worth about 7 points. Raising Production Readiness to 70 would lift the score to about 56.
Thirty-four pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Five pipeline steps put outside input straight into a shell command, so an attacker can run commands in the build pipeline. Pinning each tool to an exact version and passing outside input through environment variables would close both risks. Correcting the flagged pipeline settings would fix the two weaknesses in the build pipeline's configuration, and the two pipeline steps that install packages without pinning their versions need the packages they install pinned to exact versions. The two images with no text description need a text description.
The product code is 143,454 lines, about €170,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 Production Readiness rose from 36 to 70, the lowest score rated Strong, the score would rise from 47 to about 56.
Code composition: what the lines of code are
Product code 77%Tests 23%
New since the last survey: 405 findings
These 405 critical or serious findings weren't in the previous survey, on 4 November 2026. The first 100 are listed here, and the findings file in the download package lists them all.
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: 312 findings
These 312 critical or serious findings were in the previous survey, on 4 November 2026, and are gone from this one. The first 100 are listed here.
God Classes · TooManyMethods: SAPCoupler genesis/engine/couplers/sap_coupler.py
God Classes · TooManyMethods: FEMSolver genesis/engine/solvers/fem_solver.py
God Classes · FileTooLong: utils/array_class.py genesis/utils/array_class.py
God Classes · TooManyMethods: MPMSolver genesis/engine/solvers/mpm_solver.py
God Classes · TooManyMethods: PBDSolver genesis/engine/solvers/pbd_solver.py
God Classes · TooManyMethods: SPHSolver genesis/engine/solvers/sph_solver.py
God Classes · FileTooLong: sensors/tactile_shared.py genesis/engine/sensors/tactile_shared.py
Code Duplication · Near-duplicate member family (3 members, 34 shared lines) genesis/engine/solvers/rigid/collider/diff_gjk.py
Code Duplication · Near-duplicate member family (3 members, 33 shared lines) genesis/engine/couplers/sap_coupler.py
Code Duplication · Near-duplicate member pair (92 shared lines) genesis/engine/solvers/rigid/collider/narrowphase.py
Code Duplication · Near-duplicate member pair (83 shared lines) genesis/utils/path_planning.py
Code Duplication · Near-duplicate member pair (71 shared lines) genesis/engine/solvers/rigid/rigid_solver.py
Code Duplication · Near-duplicate member pair (60 shared lines) genesis/utils/path_planning.py
Code Duplication · Edited copy of a member (45 corresponding lines) genesis/engine/sensors/kinematic_tactile.py
Code Duplication · Edited copy of a member (14 corresponding lines) genesis/engine/entities/rigid_entity/rigid_entity.py
Code Duplication · Edited copy of a member (24 corresponding lines) genesis/engine/solvers/rigid/abd/forward_dynamics.py
Code Duplication · Edited copy of a member (15 corresponding lines) genesis/utils/path_planning.py
Code Duplication · Edited copy of a member (12 corresponding lines) genesis/engine/sensors/kinematic_tactile.py
Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) genesis/engine/solvers/mpm_solver.py
Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) genesis/engine/solvers/rigid/abd/forward_kinematics.py
Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) genesis/engine/solvers/rigid/constraint/backward.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) genesis/engine/couplers/sap_coupler.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) genesis/engine/couplers/sap_coupler.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) genesis/engine/sensors/kinematic_tactile.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) genesis/engine/sensors/point_cloud_tactile.py
Rebuild cost: about €170,000 · Estimate
Cost to rebuild
€56,000 to €280,000, for 932 to 2,958 hours of work, about 1.2 person-years for 1 to 3 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.7 at a score of 47. 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: 143,454 lines of product code
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. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
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 Banned license finding(s) in License Compliance.
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Raises the score by about 3 points · Medium effort · Text alternatives
Diagnosis: what the measurements show together
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 €170,000 to build again, about 1.2 person-years of work. Its weakest lens is Production Readiness, at 36 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Banned license finding(s) in License Compliance. 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 License Compliance 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 5.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 15% on every change. The history of the code shows how much it changes: about 194,725 lines over the last 90 days, which is about 789,718 lines a year. At that pace, the extra work comes to an estimated 127.5 to 764.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: 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.
212 modules, with 362 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 172 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.
engine.sensors.base_sensor uses repr_base, so a change to repr_base can break engine.sensors.base_sensor, while a change to engine.sensors.base_sensor can't break repr_base.
Position
Below the diagonal: engine.sensors.base_sensor uses a module listed above it, which is the healthy direction.
engine.sensors.base_sensor uses utils.misc, so a change to utils.misc can break engine.sensors.base_sensor, while a change to engine.sensors.base_sensor can't break utils.misc.
Position
Below the diagonal: engine.sensors.base_sensor uses a module listed above it, which is the healthy direction.
engine.solvers.rigid.collider.data uses utils.data, so a change to utils.data can break engine.solvers.rigid.collider.data, while a change to engine.solvers.rigid.collider.data can't break utils.data.
Position
Below the diagonal: engine.solvers.rigid.collider.data uses a module listed above it, which is the healthy direction.
engine.solvers.rigid.constraint.data uses utils.data, so a change to utils.data can break engine.solvers.rigid.constraint.data, while a change to engine.solvers.rigid.constraint.data can't break utils.data.
Position
Below the diagonal: engine.solvers.rigid.constraint.data uses a module listed above it, which is the healthy direction.
engine.states.solvers uses repr_base, so a change to repr_base can break engine.states.solvers, while a change to engine.states.solvers can't break repr_base.
Position
Below the diagonal: engine.states.solvers uses a module listed above it, which is the healthy direction.
engine.materials.base uses options.options, so a change to options.options can break engine.materials.base, while a change to engine.materials.base can't break options.options.
Position
Below the diagonal: engine.materials.base uses a module listed above it, which is the healthy direction.
engine.sensors.tactile_shared uses utils.misc, so a change to utils.misc can break engine.sensors.tactile_shared, while a change to engine.sensors.tactile_shared can't break utils.misc.
Position
Below the diagonal: engine.sensors.tactile_shared uses a module listed above it, which is the healthy direction.
engine.sensors.tactile_shared uses engine.bvh, so a change to engine.bvh can break engine.sensors.tactile_shared, while a change to engine.sensors.tactile_shared can't break engine.bvh.
Position
Below the diagonal: engine.sensors.tactile_shared uses a module listed above it, which is the healthy direction.
engine.simulator uses engine.states.solvers, so a change to engine.states.solvers can break engine.simulator, while a change to engine.simulator can't break engine.states.solvers.
Position
Below the diagonal: engine.simulator uses a module listed above it, which is the healthy direction.
engine.solvers.base_solver uses repr_base, so a change to repr_base can break engine.solvers.base_solver, while a change to engine.solvers.base_solver can't break repr_base.
Position
Below the diagonal: engine.solvers.base_solver uses a module listed above it, which is the healthy direction.
engine.solvers.base_solver uses utils.data, so a change to utils.data can break engine.solvers.base_solver, while a change to engine.solvers.base_solver can't break utils.data.
Position
Below the diagonal: engine.solvers.base_solver uses a module listed above it, which is the healthy direction.
engine.solvers.base_solver uses utils.misc, so a change to utils.misc can break engine.solvers.base_solver, while a change to engine.solvers.base_solver can't break utils.misc.
Position
Below the diagonal: engine.solvers.base_solver uses a module listed above it, which is the healthy direction.
engine.solvers.base_solver uses engine.states.solvers, so a change to engine.states.solvers can break engine.solvers.base_solver, while a change to engine.solvers.base_solver can't break engine.states.solvers.
Position
Below the diagonal: engine.solvers.base_solver uses a module listed above it, which is the healthy direction.
options.sensors.options uses options.options, so a change to options.options can break options.sensors.options, while a change to options.sensors.options can't break options.options.
Position
Below the diagonal: options.sensors.options uses a module listed above it, which is the healthy direction.
options.solvers uses options.options, so a change to options.options can break options.solvers, while a change to options.solvers can't break options.options.
Position
Below the diagonal: options.solvers uses a module listed above it, which is the healthy direction.
options.surfaces uses options.options, so a change to options.options can break options.surfaces, while a change to options.surfaces can't break options.options.
Position
Below the diagonal: options.surfaces uses a module listed above it, which is the healthy direction.
engine.couplers.legacy_coupler uses repr_base, so a change to repr_base can break engine.couplers.legacy_coupler, while a change to engine.couplers.legacy_coupler can't break repr_base.
Position
Below the diagonal: engine.couplers.legacy_coupler uses a module listed above it, which is the healthy direction.
engine.couplers.legacy_coupler uses utils.data, so a change to utils.data can break engine.couplers.legacy_coupler, while a change to engine.couplers.legacy_coupler can't break utils.data.
Position
Below the diagonal: engine.couplers.legacy_coupler uses a module listed above it, which is the healthy direction.
engine.couplers.legacy_coupler uses utils.misc, so a change to utils.misc can break engine.couplers.legacy_coupler, while a change to engine.couplers.legacy_coupler can't break utils.misc.
Position
Below the diagonal: engine.couplers.legacy_coupler uses a module listed above it, which is the healthy direction.
engine.couplers.legacy_coupler uses utils.geom, so a change to utils.geom can break engine.couplers.legacy_coupler, while a change to engine.couplers.legacy_coupler can't break utils.geom.
Position
Below the diagonal: engine.couplers.legacy_coupler uses a module listed above it, which is the healthy direction.
engine.couplers.legacy_coupler uses engine.solvers.base_solver, so a change to engine.solvers.base_solver can break engine.couplers.legacy_coupler, while a change to engine.couplers.legacy_coupler can't break engine.solvers.base_solver.
Position
Below the diagonal: engine.couplers.legacy_coupler uses a module listed above it, which is the healthy direction.
engine.materials.MPM.base uses engine.materials.base, so a change to engine.materials.base can break engine.materials.MPM.base, while a change to engine.materials.MPM.base can't break engine.materials.base.
Position
Below the diagonal: engine.materials.MPM.base uses a module listed above it, which is the healthy direction.
engine.materials.PBD.base uses engine.materials.base, so a change to engine.materials.base can break engine.materials.PBD.base, while a change to engine.materials.PBD.base can't break engine.materials.base.
Position
Below the diagonal: engine.materials.PBD.base uses a module listed above it, which is the healthy direction.
engine.sensors.kinematic_tactile uses engine.sensors.base_sensor, so a change to engine.sensors.base_sensor can break engine.sensors.kinematic_tactile, while a change to engine.sensors.kinematic_tactile can't break engine.sensors.base_sensor.
Position
Below the diagonal: engine.sensors.kinematic_tactile uses a module listed above it, which is the healthy direction.
engine.sensors.kinematic_tactile uses engine.sensors.tactile_shared, so a change to engine.sensors.tactile_shared can break engine.sensors.kinematic_tactile, while a change to engine.sensors.kinematic_tactile can't break engine.sensors.tactile_shared.
Position
Below the diagonal: engine.sensors.kinematic_tactile uses a module listed above it, which is the healthy direction.
engine.solvers.fem_solver uses utils.data, so a change to utils.data can break engine.solvers.fem_solver, while a change to engine.solvers.fem_solver can't break utils.data.
Position
Below the diagonal: engine.solvers.fem_solver uses a module listed above it, which is the healthy direction.
engine.solvers.fem_solver uses engine.solvers.base_solver, so a change to engine.solvers.base_solver can break engine.solvers.fem_solver, while a change to engine.solvers.fem_solver can't break engine.solvers.base_solver.
Position
Below the diagonal: engine.solvers.fem_solver uses a module listed above it, which is the healthy direction.
engine.solvers.fem_solver uses options.solvers, so a change to options.solvers can break engine.solvers.fem_solver, while a change to engine.solvers.fem_solver can't break options.solvers.
Position
Below the diagonal: engine.solvers.fem_solver uses a module listed above it, which is the healthy direction.
engine.solvers.fem_solver uses options.surfaces, so a change to options.surfaces can break engine.solvers.fem_solver, while a change to engine.solvers.fem_solver can't break options.surfaces.
Position
Below the diagonal: engine.solvers.fem_solver uses a module listed above it, which is the healthy direction.
engine.solvers.particle_solver uses utils.data, so a change to utils.data can break engine.solvers.particle_solver, while a change to engine.solvers.particle_solver can't break utils.data.
Position
Below the diagonal: engine.solvers.particle_solver uses a module listed above it, which is the healthy direction.
engine.solvers.particle_solver uses engine.solvers.base_solver, so a change to engine.solvers.base_solver can break engine.solvers.particle_solver, while a change to engine.solvers.particle_solver can't break engine.solvers.base_solver.
Position
Below the diagonal: engine.solvers.particle_solver uses a module listed above it, which is the healthy direction.
engine.solvers.rigid.data uses constants, so a change to constants can break engine.solvers.rigid.data, while a change to engine.solvers.rigid.data can't break constants.
Position
Below the diagonal: engine.solvers.rigid.data uses a module listed above it, which is the healthy direction.
26 pairs of types, where a type in engine.solvers.rigid.data uses a type in utils.data. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
engine.solvers.rigid.data uses utils.data, so a change to utils.data can break engine.solvers.rigid.data, while a change to engine.solvers.rigid.data can't break utils.data.
Position
Below the diagonal: engine.solvers.rigid.data uses a module listed above it, which is the healthy direction.
engine.solvers.rigid.data uses engine.solvers.base_solver, so a change to engine.solvers.base_solver can break engine.solvers.rigid.data, while a change to engine.solvers.rigid.data can't break engine.solvers.base_solver.
Position
Below the diagonal: engine.solvers.rigid.data uses a module listed above it, which is the healthy direction.
engine.couplers.sap_coupler uses constants, so a change to constants can break engine.couplers.sap_coupler, while a change to engine.couplers.sap_coupler can't break constants.
Position
Below the diagonal: engine.couplers.sap_coupler uses a module listed above it, which is the healthy direction.
engine.couplers.sap_coupler uses repr_base, so a change to repr_base can break engine.couplers.sap_coupler, while a change to engine.couplers.sap_coupler can't break repr_base.
Position
Below the diagonal: engine.couplers.sap_coupler uses a module listed above it, which is the healthy direction.
engine.couplers.sap_coupler uses utils.data, so a change to utils.data can break engine.couplers.sap_coupler, while a change to engine.couplers.sap_coupler can't break utils.data.
Position
Below the diagonal: engine.couplers.sap_coupler uses a module listed above it, which is the healthy direction.
engine.couplers.sap_coupler uses utils.misc, so a change to utils.misc can break engine.couplers.sap_coupler, while a change to engine.couplers.sap_coupler can't break utils.misc.
Position
Below the diagonal: engine.couplers.sap_coupler uses a module listed above it, which is the healthy direction.
engine.couplers.sap_coupler uses engine.bvh, so a change to engine.bvh can break engine.couplers.sap_coupler, while a change to engine.couplers.sap_coupler can't break engine.bvh.
Position
Below the diagonal: engine.couplers.sap_coupler uses a module listed above it, which is the healthy direction.
engine.couplers.sap_coupler uses engine.solvers.rigid.constraint.data, so a change to engine.solvers.rigid.constraint.data can break engine.couplers.sap_coupler, while a change to engine.couplers.sap_coupler can't break engine.solvers.rigid.constraint.data.
Position
Below the diagonal: engine.couplers.sap_coupler uses a module listed above it, which is the healthy direction.
engine.couplers.sap_coupler uses engine.solvers.base_solver, so a change to engine.solvers.base_solver can break engine.couplers.sap_coupler, while a change to engine.couplers.sap_coupler can't break engine.solvers.base_solver.
Position
Below the diagonal: engine.couplers.sap_coupler uses a module listed above it, which is the healthy direction.
engine.couplers.sap_coupler uses options.solvers, so a change to options.solvers can break engine.couplers.sap_coupler, while a change to engine.couplers.sap_coupler can't break options.solvers.
Position
Below the diagonal: engine.couplers.sap_coupler uses a module listed above it, which is the healthy direction.
29 pairs of types, where a type in engine.couplers.sap_coupler uses a type in engine.solvers.fem_solver. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
engine.couplers.sap_coupler uses engine.solvers.fem_solver, so a change to engine.solvers.fem_solver can break engine.couplers.sap_coupler, while a change to engine.couplers.sap_coupler can't break engine.solvers.fem_solver.
Position
Below the diagonal: engine.couplers.sap_coupler uses a module listed above it, which is the healthy direction.
73 pairs of types, where a type in engine.couplers.sap_coupler uses a type in engine.solvers.rigid.data. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
engine.couplers.sap_coupler uses engine.solvers.rigid.data, so a change to engine.solvers.rigid.data can break engine.couplers.sap_coupler, while a change to engine.couplers.sap_coupler can't break engine.solvers.rigid.data.
Position
Below the diagonal: engine.couplers.sap_coupler uses a module listed above it, which is the healthy direction.
engine.sensors.point_cloud_tactile uses utils.data, so a change to utils.data can break engine.sensors.point_cloud_tactile, while a change to engine.sensors.point_cloud_tactile can't break utils.data.
Position
Below the diagonal: engine.sensors.point_cloud_tactile uses a module listed above it, which is the healthy direction.
engine.sensors.point_cloud_tactile uses engine.sensors.base_sensor, so a change to engine.sensors.base_sensor can break engine.sensors.point_cloud_tactile, while a change to engine.sensors.point_cloud_tactile can't break engine.sensors.base_sensor.
Position
Below the diagonal: engine.sensors.point_cloud_tactile uses a module listed above it, which is the healthy direction.
engine.sensors.point_cloud_tactile uses engine.sensors.tactile_shared, so a change to engine.sensors.tactile_shared can break engine.sensors.point_cloud_tactile, while a change to engine.sensors.point_cloud_tactile can't break engine.sensors.tactile_shared.
Position
Below the diagonal: engine.sensors.point_cloud_tactile uses a module listed above it, which is the healthy direction.
engine.sensors.point_cloud_tactile uses engine.solvers.rigid.data, so a change to engine.solvers.rigid.data can break engine.sensors.point_cloud_tactile, while a change to engine.sensors.point_cloud_tactile can't break engine.solvers.rigid.data.
Position
Below the diagonal: engine.sensors.point_cloud_tactile uses a module listed above it, which is the healthy direction.
engine.solvers.mpm_solver uses utils.data, so a change to utils.data can break engine.solvers.mpm_solver, while a change to engine.solvers.mpm_solver can't break utils.data.
Position
Below the diagonal: engine.solvers.mpm_solver uses a module listed above it, which is the healthy direction.
engine.solvers.mpm_solver uses engine.states.solvers, so a change to engine.states.solvers can break engine.solvers.mpm_solver, while a change to engine.solvers.mpm_solver can't break engine.states.solvers.
Position
Below the diagonal: engine.solvers.mpm_solver uses a module listed above it, which is the healthy direction.
engine.solvers.mpm_solver uses utils.geom, so a change to utils.geom can break engine.solvers.mpm_solver, while a change to engine.solvers.mpm_solver can't break utils.geom.
Position
Below the diagonal: engine.solvers.mpm_solver uses a module listed above it, which is the healthy direction.
engine.solvers.mpm_solver uses engine.solvers.base_solver, so a change to engine.solvers.base_solver can break engine.solvers.mpm_solver, while a change to engine.solvers.mpm_solver can't break engine.solvers.base_solver.
Position
Below the diagonal: engine.solvers.mpm_solver uses a module listed above it, which is the healthy direction.
engine.solvers.mpm_solver uses options.solvers, so a change to options.solvers can break engine.solvers.mpm_solver, while a change to engine.solvers.mpm_solver can't break options.solvers.
Position
Below the diagonal: engine.solvers.mpm_solver uses a module listed above it, which is the healthy direction.
engine.solvers.mpm_solver uses options.surfaces, so a change to options.surfaces can break engine.solvers.mpm_solver, while a change to engine.solvers.mpm_solver can't break options.surfaces.
Position
Below the diagonal: engine.solvers.mpm_solver uses a module listed above it, which is the healthy direction.
engine.solvers.mpm_solver uses engine.materials.MPM.base, so a change to engine.materials.MPM.base can break engine.solvers.mpm_solver, while a change to engine.solvers.mpm_solver can't break engine.materials.MPM.base.
Position
Below the diagonal: engine.solvers.mpm_solver uses a module listed above it, which is the healthy direction.
engine.solvers.mpm_solver uses engine.solvers.particle_solver, so a change to engine.solvers.particle_solver can break engine.solvers.mpm_solver, while a change to engine.solvers.mpm_solver can't break engine.solvers.particle_solver.
Position
Below the diagonal: engine.solvers.mpm_solver uses a module listed above it, which is the healthy direction.
engine.solvers.pbd_solver uses constants, so a change to constants can break engine.solvers.pbd_solver, while a change to engine.solvers.pbd_solver can't break constants.
Position
Below the diagonal: engine.solvers.pbd_solver uses a module listed above it, which is the healthy direction.
engine.solvers.pbd_solver uses utils.data, so a change to utils.data can break engine.solvers.pbd_solver, while a change to engine.solvers.pbd_solver can't break utils.data.
Position
Below the diagonal: engine.solvers.pbd_solver uses a module listed above it, which is the healthy direction.
engine.solvers.pbd_solver uses utils.geom, so a change to utils.geom can break engine.solvers.pbd_solver, while a change to engine.solvers.pbd_solver can't break utils.geom.
Position
Below the diagonal: engine.solvers.pbd_solver uses a module listed above it, which is the healthy direction.
engine.solvers.pbd_solver uses options.solvers, so a change to options.solvers can break engine.solvers.pbd_solver, while a change to engine.solvers.pbd_solver can't break options.solvers.
Position
Below the diagonal: engine.solvers.pbd_solver uses a module listed above it, which is the healthy direction.
engine.solvers.pbd_solver uses options.surfaces, so a change to options.surfaces can break engine.solvers.pbd_solver, while a change to engine.solvers.pbd_solver can't break options.surfaces.
Position
Below the diagonal: engine.solvers.pbd_solver uses a module listed above it, which is the healthy direction.
engine.solvers.pbd_solver uses engine.solvers.particle_solver, so a change to engine.solvers.particle_solver can break engine.solvers.pbd_solver, while a change to engine.solvers.pbd_solver can't break engine.solvers.particle_solver.
Position
Below the diagonal: engine.solvers.pbd_solver uses a module listed above it, which is the healthy direction.
engine.solvers.sph_solver uses utils.data, so a change to utils.data can break engine.solvers.sph_solver, while a change to engine.solvers.sph_solver can't break utils.data.
Position
Below the diagonal: engine.solvers.sph_solver uses a module listed above it, which is the healthy direction.
engine.solvers.sph_solver uses utils.geom, so a change to utils.geom can break engine.solvers.sph_solver, while a change to engine.solvers.sph_solver can't break utils.geom.
Position
Below the diagonal: engine.solvers.sph_solver uses a module listed above it, which is the healthy direction.
engine.solvers.sph_solver uses options.solvers, so a change to options.solvers can break engine.solvers.sph_solver, while a change to engine.solvers.sph_solver can't break options.solvers.
Position
Below the diagonal: engine.solvers.sph_solver uses a module listed above it, which is the healthy direction.
engine.solvers.sph_solver uses options.surfaces, so a change to options.surfaces can break engine.solvers.sph_solver, while a change to engine.solvers.sph_solver can't break options.surfaces.
Position
Below the diagonal: engine.solvers.sph_solver uses a module listed above it, which is the healthy direction.
engine.solvers.sph_solver uses engine.solvers.particle_solver, so a change to engine.solvers.particle_solver can break engine.solvers.sph_solver, while a change to engine.solvers.sph_solver can't break engine.solvers.particle_solver.
Position
Below the diagonal: engine.solvers.sph_solver uses a module listed above it, which is the healthy direction.
options.entities uses engine.materials.MPM.base, so a change to engine.materials.MPM.base can break options.entities, while a change to options.entities can't break engine.materials.MPM.base.
Position
Below the diagonal: options.entities uses a module listed above it, which is the healthy direction.
options.entities uses engine.materials.PBD.base, so a change to engine.materials.PBD.base can break options.entities, while a change to options.entities can't break engine.materials.PBD.base.
Position
Below the diagonal: options.entities uses a module listed above it, which is the healthy direction.
utils uses engine.solvers.rigid.data, so a change to engine.solvers.rigid.data can break utils, while a change to utils can't break engine.solvers.rigid.data.
Position
Below the diagonal: utils uses a module listed above it, which is the healthy direction.
engine.couplers uses engine.solvers.rigid.constraint.data, so a change to engine.solvers.rigid.constraint.data can break engine.couplers, while a change to engine.couplers can't break engine.solvers.rigid.constraint.data.
Position
Below the diagonal: engine.couplers uses a module listed above it, which is the healthy direction.
engine.couplers uses engine.solvers.base_solver, so a change to engine.solvers.base_solver can break engine.couplers, while a change to engine.couplers can't break engine.solvers.base_solver.
Position
Below the diagonal: engine.couplers uses a module listed above it, which is the healthy direction.
engine.couplers uses options.solvers, so a change to options.solvers can break engine.couplers, while a change to engine.couplers can't break options.solvers.
Position
Below the diagonal: engine.couplers uses a module listed above it, which is the healthy direction.
engine.couplers uses engine.couplers.legacy_coupler, so a change to engine.couplers.legacy_coupler can break engine.couplers, while a change to engine.couplers can't break engine.couplers.legacy_coupler.
Position
Below the diagonal: engine.couplers uses a module listed above it, which is the healthy direction.
engine.couplers uses engine.solvers.fem_solver, so a change to engine.solvers.fem_solver can break engine.couplers, while a change to engine.couplers can't break engine.solvers.fem_solver.
Position
Below the diagonal: engine.couplers uses a module listed above it, which is the healthy direction.
engine.couplers uses engine.solvers.rigid.data, so a change to engine.solvers.rigid.data can break engine.couplers, while a change to engine.couplers can't break engine.solvers.rigid.data.
Position
Below the diagonal: engine.couplers uses a module listed above it, which is the healthy direction.
engine.couplers uses engine.couplers.sap_coupler, so a change to engine.couplers.sap_coupler can break engine.couplers, while a change to engine.couplers can't break engine.couplers.sap_coupler.
Position
Below the diagonal: engine.couplers uses a module listed above it, which is the healthy direction.
engine.couplers uses engine.solvers.mpm_solver, so a change to engine.solvers.mpm_solver can break engine.couplers, while a change to engine.couplers can't break engine.solvers.mpm_solver.
Position
Below the diagonal: engine.couplers uses a module listed above it, which is the healthy direction.
engine.couplers uses engine.solvers.pbd_solver, so a change to engine.solvers.pbd_solver can break engine.couplers, while a change to engine.couplers can't break engine.solvers.pbd_solver.
Position
Below the diagonal: engine.couplers uses a module listed above it, which is the healthy direction.
engine.couplers uses engine.solvers.sph_solver, so a change to engine.solvers.sph_solver can break engine.couplers, while a change to engine.couplers can't break engine.solvers.sph_solver.
Position
Below the diagonal: engine.couplers uses a module listed above it, which is the healthy direction.
engine.entities.base_entity uses repr_base, so a change to repr_base can break engine.entities.base_entity, while a change to engine.entities.base_entity can't break repr_base.
Position
Below the diagonal: engine.entities.base_entity uses a module listed above it, which is the healthy direction.
engine.entities.base_entity uses utils.misc, so a change to utils.misc can break engine.entities.base_entity, while a change to engine.entities.base_entity can't break utils.misc.
Position
Below the diagonal: engine.entities.base_entity uses a module listed above it, which is the healthy direction.
engine.entities.base_entity uses engine.materials.base, so a change to engine.materials.base can break engine.entities.base_entity, while a change to engine.entities.base_entity can't break engine.materials.base.
Position
Below the diagonal: engine.entities.base_entity uses a module listed above it, which is the healthy direction.
engine.entities.base_entity uses options.surfaces, so a change to options.surfaces can break engine.entities.base_entity, while a change to engine.entities.base_entity can't break options.surfaces.
Position
Below the diagonal: engine.entities.base_entity uses a module listed above it, which is the healthy direction.
engine.entities.base_entity uses options.entities, so a change to options.entities can break engine.entities.base_entity, while a change to engine.entities.base_entity can't break options.entities.
Position
Below the diagonal: engine.entities.base_entity uses a module listed above it, which is the healthy direction.
engine.sensors uses engine.solvers.rigid.collider.data, so a change to engine.solvers.rigid.collider.data can break engine.sensors, while a change to engine.sensors can't break engine.solvers.rigid.collider.data.
Position
Below the diagonal: engine.sensors uses a module listed above it, which is the healthy direction.
engine.sensors uses engine.sensors.tactile_shared, so a change to engine.sensors.tactile_shared can break engine.sensors, while a change to engine.sensors can't break engine.sensors.tactile_shared.
Position
Below the diagonal: engine.sensors uses a module listed above it, which is the healthy direction.
engine.sensors uses engine.solvers.rigid.data, so a change to engine.solvers.rigid.data can break engine.sensors, while a change to engine.sensors can't break engine.solvers.rigid.data.
Position
Below the diagonal: engine.sensors uses a module listed above it, which is the healthy direction.
engine.sensors uses engine.sensors.point_cloud_tactile, so a change to engine.sensors.point_cloud_tactile can break engine.sensors, while a change to engine.sensors can't break engine.sensors.point_cloud_tactile.
Position
Below the diagonal: engine.sensors uses a module listed above it, which is the healthy direction.
engine.solvers uses engine.solvers.base_solver, so a change to engine.solvers.base_solver can break engine.solvers, while a change to engine.solvers can't break engine.solvers.base_solver.
Position
Below the diagonal: engine.solvers uses a module listed above it, which is the healthy direction.
engine.solvers uses engine.solvers.fem_solver, so a change to engine.solvers.fem_solver can break engine.solvers, while a change to engine.solvers can't break engine.solvers.fem_solver.
Position
Below the diagonal: engine.solvers uses a module listed above it, which is the healthy direction.
engine.solvers uses engine.solvers.particle_solver, so a change to engine.solvers.particle_solver can break engine.solvers, while a change to engine.solvers can't break engine.solvers.particle_solver.
Position
Below the diagonal: engine.solvers uses a module listed above it, which is the healthy direction.
engine.solvers uses engine.solvers.rigid.data, so a change to engine.solvers.rigid.data can break engine.solvers, while a change to engine.solvers can't break engine.solvers.rigid.data.
Position
Below the diagonal: engine.solvers uses a module listed above it, which is the healthy direction.
engine.solvers uses engine.solvers.mpm_solver, so a change to engine.solvers.mpm_solver can break engine.solvers, while a change to engine.solvers can't break engine.solvers.mpm_solver.
Position
Below the diagonal: engine.solvers uses a module listed above it, which is the healthy direction.
engine.solvers uses engine.solvers.pbd_solver, so a change to engine.solvers.pbd_solver can break engine.solvers, while a change to engine.solvers can't break engine.solvers.pbd_solver.
Position
Below the diagonal: engine.solvers uses a module listed above it, which is the healthy direction.
engine.solvers uses engine.solvers.sph_solver, so a change to engine.solvers.sph_solver can break engine.solvers, while a change to engine.solvers can't break engine.solvers.sph_solver.
Position
Below the diagonal: engine.solvers uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.description uses constants, so a change to constants can break engine.entities.rigid_entity.description, while a change to engine.entities.rigid_entity.description can't break constants.
Position
Below the diagonal: engine.entities.rigid_entity.description uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.description uses options.options, so a change to options.options can break engine.entities.rigid_entity.description, while a change to engine.entities.rigid_entity.description can't break options.options.
Position
Below the diagonal: engine.entities.rigid_entity.description uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.description uses engine.materials.base, so a change to engine.materials.base can break engine.entities.rigid_entity.description, while a change to engine.entities.rigid_entity.description can't break engine.materials.base.
Position
Below the diagonal: engine.entities.rigid_entity.description uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.description uses options.surfaces, so a change to options.surfaces can break engine.entities.rigid_entity.description, while a change to engine.entities.rigid_entity.description can't break options.surfaces.
Position
Below the diagonal: engine.entities.rigid_entity.description uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.description uses options.entities, so a change to options.entities can break engine.entities.rigid_entity.description, while a change to engine.entities.rigid_entity.description can't break options.entities.
Position
Below the diagonal: engine.entities.rigid_entity.description uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.description uses engine.entities.base_entity, so a change to engine.entities.base_entity can break engine.entities.rigid_entity.description, while a change to engine.entities.rigid_entity.description can't break engine.entities.base_entity.
Position
Below the diagonal: engine.entities.rigid_entity.description uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.rigid_entity uses constants, so a change to constants can break engine.entities.rigid_entity.rigid_entity, while a change to engine.entities.rigid_entity.rigid_entity can't break constants.
Position
Below the diagonal: engine.entities.rigid_entity.rigid_entity uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.rigid_entity uses engine.entities.base_entity, so a change to engine.entities.base_entity can break engine.entities.rigid_entity.rigid_entity, while a change to engine.entities.rigid_entity.rigid_entity can't break engine.entities.base_entity.
Position
Below the diagonal: engine.entities.rigid_entity.rigid_entity uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.rigid_entity uses engine.entities.rigid_entity.description, so a change to engine.entities.rigid_entity.description can break engine.entities.rigid_entity.rigid_entity, while a change to engine.entities.rigid_entity.rigid_entity can't break engine.entities.rigid_entity.description.
Position
Below the diagonal: engine.entities.rigid_entity.rigid_entity uses a module listed above it, which is the healthy direction.
engine.scene uses engine.states.solvers, so a change to engine.states.solvers can break engine.scene, while a change to engine.scene can't break engine.states.solvers.
Position
Below the diagonal: engine.scene uses a module listed above it, which is the healthy direction.
engine.scene uses options.entities, so a change to options.entities can break engine.scene, while a change to engine.scene can't break options.entities.
Position
Below the diagonal: engine.scene uses a module listed above it, which is the healthy direction.
engine.scene uses engine.entities.rigid_entity.rigid_entity, so a change to engine.entities.rigid_entity.rigid_entity can break engine.scene, while a change to engine.scene can't break engine.entities.rigid_entity.rigid_entity.
Position
Below the diagonal: engine.scene uses a module listed above it, which is the healthy direction.
engine.solvers.rigid.rigid_solver uses constants, so a change to constants can break engine.solvers.rigid.rigid_solver, while a change to engine.solvers.rigid.rigid_solver can't break constants.
Position
Below the diagonal: engine.solvers.rigid.rigid_solver uses a module listed above it, which is the healthy direction.
engine.solvers.rigid.rigid_solver uses engine.states.solvers, so a change to engine.states.solvers can break engine.solvers.rigid.rigid_solver, while a change to engine.solvers.rigid.rigid_solver can't break engine.states.solvers.
Position
Below the diagonal: engine.solvers.rigid.rigid_solver uses a module listed above it, which is the healthy direction.
engine.solvers.rigid.rigid_solver uses engine.solvers.base_solver, so a change to engine.solvers.base_solver can break engine.solvers.rigid.rigid_solver, while a change to engine.solvers.rigid.rigid_solver can't break engine.solvers.base_solver.
Position
Below the diagonal: engine.solvers.rigid.rigid_solver uses a module listed above it, which is the healthy direction.
engine.solvers.rigid.rigid_solver uses options.solvers, so a change to options.solvers can break engine.solvers.rigid.rigid_solver, while a change to engine.solvers.rigid.rigid_solver can't break options.solvers.
Position
Below the diagonal: engine.solvers.rigid.rigid_solver uses a module listed above it, which is the healthy direction.
engine.solvers.rigid.rigid_solver uses engine.entities.rigid_entity.rigid_entity, so a change to engine.entities.rigid_entity.rigid_entity can break engine.solvers.rigid.rigid_solver, while a change to engine.solvers.rigid.rigid_solver can't break engine.entities.rigid_entity.rigid_entity.
Position
Below the diagonal: engine.solvers.rigid.rigid_solver uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 52% · Adequate · gated by D1, D2, X4 ·
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
79
High / Critical
A03:2025 — Software Supply Chain Failures
9
Medium
Roadmap
Top priorities: Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing; Resolve the 1 Banned license finding(s) in License Compliance; Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Banned license finding(s) in License Compliance.
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
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.
Bring the 483 bodies over 15 down to 15 or less in Cognitive Complexity — start with narrowphase.func_add_polytope_vertex_contacts_sdf (cognitive 570), narrowphase.func_contact_overlap_axes (cognitive 557), contact.func_clamp_prune_contacts_coop (cognitive 403).
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 — 52
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 — 1669
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 — 93
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 16
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 50 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, 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 — 50 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, 1803 of 1814 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.
D8 Code Coverage — 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. Coverage NOT MEASURED: test source is present (.py) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
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 source is present (.py) and this repository declares a Python test suite (repository root, 60 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
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 — 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. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming 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. 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.
D21 Naming 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. 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 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict.
D24 Comment Value — 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 the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D26 Project Cohesion — 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. `(repository root)` (143454 LoC, 1027 module-visible types across 54 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
D32 Data Compliance (PII/GDPR) — 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. `genesis/datatypes.py`, `REDACTED`, `genesis/engine/materials/PBD/base.py`, `genesis/engine/materials/base.py`, `genesis/engine/materials/kinematic.py`, … (+11 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AX1 Captive dependencies — 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 reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in genesis/vis/keybindings.py, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXB1 Runtime evidence locked — no reproducible boot — 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. Subject: 2 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
C1 Data Protection — 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. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
GD1 Unfinished & placeholder code — 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 reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala and Rust source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala or Rust was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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 reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby, Scala or Rust was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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.
S1 Web-Security Posture — 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. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
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 reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala, Kotlin and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala, Kotlin or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — 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 reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala, PHP and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala, PHP or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — 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 reads C# syntax, and JavaScript/TypeScript (Vue and Svelte components included), Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — 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 reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, Kotlin source, and Rust source only, and no C# was loaded, no TypeScript was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
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.
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.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
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.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
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").
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.
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.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
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.
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.
+ 241 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 15 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with narrowphase.func_add_polytope_vertex_contacts_sdf (cyclomatic 137), narrowphase.func_contact_overlap_axes (cyclomatic 132), box_contact.func_box_box_contact (cyclomatic 129). — 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 15 together lifts Cyclomatic Complexity from 3.3 to about 5.0/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.
+ 478 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 483 bodies over 15 down to 15 or less in Cognitive Complexity — start with narrowphase.func_add_polytope_vertex_contacts_sdf (cognitive 570), narrowphase.func_contact_overlap_axes (cognitive 557), contact.func_clamp_prune_contacts_coop (cognitive 403). — 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 483 together lifts Cognitive Complexity from 2.0 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.0 / 10Strong✓ 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.
Resolve the 58 FileTooLong finding(s) in God Classes — start with misc.py (2), REDACTED (2), camera.py (2). — One of this dimension's main actionable groups (58 warning-level).
Resolve the 8 TooManyMethods finding(s) in God Classes — start with rigid_entity.py (2), rigid_solver.py, rasterizer_context.py. — One of this dimension's main actionable groups (8 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.
381 duplicated block group(s) detected. 8.2 % of the production lines (11,705 of 143,454) are in a reported copy. A further 151 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 84 of the 532 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.
+ 192 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 40 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with forward_dynamics.py (4), box_contact.py (3), linesearch.py (3). — One of this dimension's main actionable groups (40 warning-level).
Resolve the 29 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with sap_coupler.py (3), forward_dynamics.py (3), contact.py (2). — One of this dimension's main actionable groups (29 warning-level).
Resolve the 20 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with sap_coupler.py (2), contact.py (2), narrowphase.py (2). — One of this dimension's main actionable groups (20 warning-level).
Detailed fixes: d4_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 5 Low cohesion finding(s) in Cohesion (LCOM4) — start with rigid_entity.py, rigid_solver.py, kinematic_solver.py. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
1 outdated, 0 yanked pinned Python distributions. 2 of 32 shipped distributions were graded against pypi.org (0 not published there, 30 declared without an exact pin, which installs the newest release the declaration admits and so cannot be behind one). Only EXACT pins are graded for currency: a floor or a range already installs the newest release it admits, so reporting one would report this repository for being current. Whether a deliberate upper cap has itself gone stale is a different and weaker question, and is not asked. Whether any distribution is UNMAINTAINED is not graded — PyPI publishes no maintenance status, and release age does not stand in for one. Lockfiles are not read (poetry.lock, uv.lock, Pipfile.lock, pdm.lock), so a lock-resolved install is outside this verdict. Known CVEs in this dependency graph are D30's question.
Outdated: gs-madrona
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
1 of 77 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 32 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (45 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. ★ This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. 8 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged.
Banned license: frozendict
What to do
Resolve the 1 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.
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: genesis/engine/solvers/rigid/collider/narrowphase.py (40×137=5480); genesis/engine/solvers/rigid/rigid_solver.py (78×59=4602); genesis/engine/solvers/rigid/constraint/solver.py (53×68=3604) Repeated repair below the complexity floor: genesis/utils/simt.py (4 of 7 changes were fixes); genesis/vis/viewer.py (4 of 6 changes were fixes); REDACTED (4 of 6 changes were fixes)
Resolve the 62 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (2), narrowphase.py, rigid_solver.py. — One of this dimension's main actionable groups (62 warning-level).
Resolve the 6 Repeated repair finding(s) in Churn × Complexity Hotspots — start with simt.py, viewer.py, REDACTED. — One of this dimension's main actionable groups (6 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.9 / 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.
22 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is genesis/engine/couplers/sap_coupler.py. Counted over 194 of the 260 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
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).
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.
201 deducted task-comment markers across 143454 LoC (0.1/KLoC) → score 9.7. 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.
FixmeComment · ×146tests/conftest.py:402
TodoComment · ×53tests/utils/assets.py:158
XxxCommentgenesis/logging/time_elapser.py:26
HackCommentREDACTED:80
What to do
Resolve the 146 FixmeComment finding(s) in Explicit Debt — start with misc.py (13), test_collision_nonconvex.py (8), REDACTED (8). — One of this dimension's main actionable groups (146 warning-level).
Resolve the 53 TodoComment finding(s) in Explicit Debt — start with usd_rigid_entity.py (4), solver.py (4), texture.py (3). — One of this dimension's main actionable groups (53 warning-level).
Resolve the 1 XxxComment finding(s) in Explicit Debt — start with time_elapser.py. — One of this dimension's main actionable groups (1 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.
1 of 1 documentation facets pass in full. 4 document(s) read across 1 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 REDACTED. — 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: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
92 % of calls cross a namespace and 0 % go through an interface, but 88 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
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).
79 finding(s): 0 critical, 46 high, 32 medium, 1 low. 34 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 16 file(s) — `genesis/datatypes.py` (line 16), `REDACTED` (line 360, lines 366–369, line 369, …), `genesis/engine/materials/PBD/base.py` (line 9), `genesis/engine/materials/base.py` (line 11), `genesis/engine/materials/kinematic.py` (line 9), … (+11 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 3 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
+ 9 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
No action in Static Analysis (SAST) — all 34 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 (34 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 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.
15 of 194 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is genesis/ext/pyrender/material.py. Counted over 194 of the 260 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with material.py. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 14 Orphaned file finding(s) in Knowledge Freshness — start with terrain_utils.py, force_fields.py, light.py. — One of this dimension's main actionable groups (14 recommendation-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 1 Change coupling finding(s) in Change Coupling — start with diff_gjk.py. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 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 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
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 32 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.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives1.0 / 10Critical✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×2) — genesis/assets/urdf/3763/tree_hier.html:2, genesis/assets/urdf/3763/tree_hier_after_merging.html:2
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Do you agree with this assessment?
AC3 · Page structure3.9 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×2) — genesis/assets/urdf/3763/tree_hier.html:1, genesis/assets/urdf/3763/tree_hier_after_merging.html:1
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — genesis/assets/urdf/3763/tree_hier.html:1, genesis/assets/urdf/3763/tree_hier_after_merging.html:1
A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×2) — genesis/assets/urdf/3763/tree_hier.html:2, genesis/assets/urdf/3763/tree_hier_after_merging.html:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
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.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
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.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
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.
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 · Observability7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
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.
No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 6 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:4
`REDACTED` 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`. — REDACTED:11
What to do
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
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 · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document3.5 / 10Weak✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`get_written_paths` is public and takes `owner: object | None` from its caller, and it calls itself at line 115 (`get_written_paths`) with a piece of `owner` — and nowhere in `get_written_paths` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `get_written_paths` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — genesis/grad/kernel_writes.py:115
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
`init_context` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `DISPLAY` environment variable (set at line 227, put back at line 231) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path. — genesis/ext/pyrender/platforms/egl.py:140
What to do
Each finding names the statement that changes the process-global value and the statement that puts it back. Confirm from the two that nothing between them is protected — then prefer removing the mutation over widening the restore: a working directory or an environment passed to the operation that needs it (the `cwd=` and `env=` arguments of `subprocess.run`/`Popen`) is scoped to that operation, which is what the save-and-restore was trying to approximate. Where the global genuinely must move, `contextlib.chdir`, `contextlib.redirect_stdout` or a `try`/`finally` is the least that makes the restore unconditional.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
`debug` at line 155 is called with an argument built by `"…".join(traceback.format())` (line 155), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — genesis/vis/viewer.py:155
`debug` at line 404 is called with an argument built by `"…".join(commands)` (line 404), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — genesis/utils/usd/usd_context.py:404
`debug` at line 491 is called with an argument built by `set(self._coup_type_by_entity.values())` (line 491), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — genesis/engine/couplers/ipc_coupler/coupler.py:491
What to do
In Python, put the construction behind the logger's own check (`if logger.isEnabledFor(logging.DEBUG):`), or pass the collection itself with a `%s` placeholder (`logger.debug("Items %s", items)`) so the logging module renders it only when the record is emitted. The placeholder alone is not the fix when the argument is still built first: it defers the formatting, not a `json.dumps`, a `join` or a comprehension in the argument, and an f-string defers nothing at all.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×3) — genesis/repr_base.py:81, genesis/utils/misc.py:790, genesis/ext/pyrender/overlay/plugin.py:239
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×17) — genesis/vis/viewer.py:203, genesis/ext/_trimesh_patch.py:516, genesis/ext/_trimesh_patch.py:521, …
An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `__del__()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch. (×3) — genesis/ext/pyrender/offscreen.py:228, genesis/ext/pyrender/platforms/base.py:46, genesis/engine/sensors/base_sensor.py:71
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`warning` at line 104 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/__init__.py:104
`error` at line 457 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — genesis/__init__.py:457
`warning` at line 121 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/misc.py:121
`debug` at line 180 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/video_encoder.py:180
`warning` at line 58 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:58
`info` at line 60 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:60
`info` at line 147 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:147
`warning` at line 316 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:316
`debug` at line 404 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:404
`warning` at line 418 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:418
`warning` at line 425 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:425
`warning` at line 436 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:436
`warning` at line 475 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/utils/usd/usd_context.py:475
`warning` at line 81 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/recorders/file_writers.py:81
`warning` at line 192 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/recorders/plotters.py:192
`info` at line 260 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — genesis/recorders/plotters.py:260
`info` at line 420 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — genesis/recorders/plotters.py:420
`warning` at line 539 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/recorders/trajectory.py:539
`debug` at line 316 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:316
`debug` at line 328 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:328
`debug` at line 334 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:334
`debug` at line 341 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:341
`debug` at line 491 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:491
`debug` at line 518 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:518
`debug` at line 686 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:686
`debug` at line 768 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:768
`debug` at line 874 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:874
`warning` at line 887 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — genesis/engine/couplers/ipc_coupler/coupler.py:887
`info` at line 293 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — genesis/assets/tower/generate_tower.py:293
`info` at line 320 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — genesis/assets/tower/generate_tower.py:320
`info` at line 402 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — genesis/assets/tower/generate_tower.py:402
Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 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 — 32 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 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 — 64 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.
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 — not analysed — these correctness checks read a source model 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
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads.
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
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository registers no route and starts no server another machine can reach (no Flask/FastAPI/Starlette route, Django urlpatterns or class-based view, Tornado handler). Access control is therefore N/A here — a library or command-line tool is authorized by the application that serves it, 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 a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or MongoEngine model, a migration or a SQL schema — and no database or data-store client (Django ORM, SQLAlchemy, psycopg, PyMongo, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~43644 lines of test source are present (.py) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — the .py suite was found but not re-run
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.
D21 Naming Consistency — Naming consistency does not read html yet; not measured.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
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. 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"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .py, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python REDACTED/requirements.txt (pip/uv/Poetry) — not scanned yet).
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) — 16 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
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.
D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python REDACTED/requirements.txt (pip/uv/Poetry) — not scanned yet).
D5 Coupling — Not applicable — this Python build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
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 included — suite not readable by the collector
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (93 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala and Rust, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model 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
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 Python 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
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.
PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
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
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 — not analysed — these correctness checks read a source model 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
X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model 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
X2 Cancellation propagation — no C# was loaded; this repository's Python was read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
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
X24 Document value interpolated into markup unescaped — 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
X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model 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
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X5 Nullable reference types — not analysed — these correctness checks read a source model 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
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.
AC1 · Text alternatives· <img> without a text alternative · ×2
<img> without a text alternative genesis/assets/urdf/3763/tree_hier.html:2— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative genesis/assets/urdf/3763/tree_hier_after_merging.html:2— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<html> without a lang genesis/assets/urdf/3763/tree_hier.html:1— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang genesis/assets/urdf/3763/tree_hier_after_merging.html:1— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
Banned license: frozendict — `frozendict` 2.5.1 is published on PyPI under `LGPL-3.0-only`, which this policy bans, and it is in the SHIPPED closure of this repository — so it is installed by everything that depends on this repository, not just by its test environment. A distribution offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Orphaned knowledge genesis/ext/pyrender/material.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
FixmeComment tests/conftest.py:402— # FIXME: Enabling multi-threading in benchmark is making compile time estimation unreliable — 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 tests/conftest.py:543— # FIXME: There is no easy way for Intel ARC device. Ignore device visibility issue for now... — 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 tests/conftest.py:1070— # FIXME: Must set temporary cache even if caching is forcibly disabled because this flag is not always honored — 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 tests/utils/mujoco_parity.py:160— # FIXME: only supporting 1DoF per actuator — 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 tests/utils/mujoco_parity.py:474— # FIXME: Masking geometries and equality constraints is not supported for now — 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 tests/utils/mujoco_parity.py:713— # FIXME: For some reason, mujoco is sometimes (seemingful) wrongly reporting 0... — 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 tests/utils/simulators.py:62— # FIXME: Genesis gives every contact at least the sliding-friction basis, so a geom asking for a frictionless — 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 tests/utils/simulators.py:67— # FIXME: Genesis has no tendons, so a tendon's range contributes no constraint row on its side. Releasing the range — 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 tests/sensors/test_camera.py:430— # FIXME: This test fails without any entities in the scene. — 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 tests/sensors/test_contact.py:165— # FIXME: Adding CoM offset on box is disturbing contact force computations on box_2 for some reason... — 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 tests/rigid/test_api.py:380— # FIXME: Not sure why tolerance must be increased for tests to pass — 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 tests/rigid/test_api.py:770— # FIXME: pytorch#TBD - 'any' over an empty dimension returns uninitialized memory on MPS, so the contacts — 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 tests/rigid/test_api.py:1338— # FIXME: quadrants#1086 - the replay drifts in the last bits, which contacts amplify to the tolerance in fp32.
FixmeComment tests/rigid/test_asset_loading.py:1091— # FIXME: The tolerance must be very high when using 32bits precision. This means that our computation of the — 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 tests/rigid/test_collision.py:1507— # FIXME: The top ball is slightly rotating around z-axis (~0.5degree) — 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 tests/rigid/test_collision_nonconvex.py:226— # FIXME: The box test only checks that the body wedges at the L-corner equilibrium (position + zero velocity). — 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 tests/rigid/test_collision_nonconvex.py:338— # FIXME: The total energy should be not strictly decreasing but is not... relaxing the condition — 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 tests/rigid/test_collision_nonconvex.py:796— # FIXME: There is spurious residual motion on both paths that prevents the objects from truly settling — 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 tests/rigid/test_collision_nonconvex.py:807— # FIXME: The cup is falling on Windows OS because the convex decomposition provided by CoACD is different than — 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 tests/rigid/test_collision_nonconvex.py:947— # FIXME: Rare (~5% of initial-pose draws) stem-through-wall traps exceed this bound by design: a thin feature — 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 tests/rigid/test_collision_nonconvex.py:981— # FIXME: Why the angular velocity threshold has to be so large without any visual effect?! — 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 tests/rigid/test_collision_nonconvex.py:987— # FIXME: Both path pumps net positive contact energy over this window. — 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 tests/rigid/test_collision_nonconvex.py:991— # FIXME: Both paths suffer from fictitious energy injection. — 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 tests/rigid/test_control.py:52— # FIXME: We do NOT raise exception anymore when setting control targets that would have no effect — 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 tests/rigid/test_heterogeneous.py:157— # The arms stop against each other instead of swinging through each other. FIXME: pytorch#TBD - 'any' over an — 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.
Hotspot: genesis/engine/solvers/rigid/collider/narrowphase.py genesis/engine/solvers/rigid/collider/narrowphase.py:71— genesis/engine/solvers/rigid/collider/narrowphase.py changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 137 in narrowphase.func_add_polytope_vertex_contacts_sdf at line 71. 12 of those changes were fix/bug commits, and the other 28 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/collider/narrowphase.py`: 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: genesis/engine/solvers/rigid/rigid_solver.py genesis/engine/solvers/rigid/rigid_solver.py:519— genesis/engine/solvers/rigid/rigid_solver.py changed 78 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in RigidSolver._build_config at line 519. 25 of those changes were fix/bug commits, and the other 53 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/rigid_solver.py`: 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: genesis/engine/solvers/rigid/constraint/solver.py genesis/engine/solvers/rigid/constraint/solver.py:2894— genesis/engine/solvers/rigid/constraint/solver.py changed 53 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in solver.func_island_assemble_factor_solve_tiled at line 2894. 17 of those changes were fix/bug commits, and the other 36 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/constraint/solver.py`: 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: genesis/engine/couplers/sap_coupler.py genesis/engine/couplers/sap_coupler.py:1331— genesis/engine/couplers/sap_coupler.py changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 75 in SAPCoupler.build at line 1331. 19 of those changes were fix/bug commits, and the other 24 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/couplers/sap_coupler.py`: 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: genesis/engine/solvers/rigid/collider/contact.py genesis/engine/solvers/rigid/collider/contact.py:1556— genesis/engine/solvers/rigid/collider/contact.py changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in contact.func_clamp_prune_contacts_coop at line 1556. 13 of those changes were fix/bug commits, and the other 20 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/collider/contact.py`: 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: genesis/utils/misc.py genesis/utils/misc.py:1588— genesis/utils/misc.py changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in misc.assign_indexed_tensor at line 1588. 17 of those changes were fix/bug commits, and the other 20 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/utils/misc.py`: 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: genesis/engine/solvers/rigid/collider/collider.py genesis/engine/solvers/rigid/collider/collider.py:942— genesis/engine/solvers/rigid/collider/collider.py changed 38 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in Collider.get_contacts at line 942. 6 of those changes were fix/bug commits, and the other 32 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/collider/collider.py`: 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: REDACTED REDACTED:915— REDACTED changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 98 in KinematicEntityDescription._parse_scene at line 915. 9 of those changes were fix/bug commits, and the other 11 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- REDACTED`: 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: genesis/engine/couplers/legacy_coupler.py genesis/engine/couplers/legacy_coupler.py:2453— genesis/engine/couplers/legacy_coupler.py changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in legacy_coupler.kernel_sph_boundaries_impulse at line 2453. 15 of those changes were fix/bug commits, and the other 15 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/couplers/legacy_coupler.py`: 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: genesis/utils/mesh.py genesis/utils/mesh.py:677— genesis/utils/mesh.py changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in mesh._postprocess_collision_geoms_impl at line 677. 11 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/utils/mesh.py`: 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: genesis/engine/solvers/fem_solver.py genesis/engine/solvers/fem_solver.py:2175— genesis/engine/solvers/fem_solver.py changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in fem_solver.func_accumulate_vertex at line 2175. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/solvers/fem_solver.py`: 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: genesis/engine/entities/rigid_entity/rigid_entity.py genesis/engine/entities/rigid_entity/rigid_entity.py:371— genesis/engine/entities/rigid_entity/rigid_entity.py changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in KinematicEntity.attach at line 371. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/entities/rigid_entity/rigid_entity.py`: 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: genesis/engine/solvers/rigid/abd/forward_dynamics.py genesis/engine/solvers/rigid/abd/forward_dynamics.py:882— genesis/engine/solvers/rigid/abd/forward_dynamics.py changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in forward_dynamics.func_factor_mass_tree_shared at line 882. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/abd/forward_dynamics.py`: 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: genesis/__init__.py genesis/__init__.py:59— genesis/__init__.py changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in genesis.init at line 59. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/__init__.py`: 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: genesis/engine/solvers/rigid/constraint/linesearch.py genesis/engine/solvers/rigid/constraint/linesearch.py:1176— genesis/engine/solvers/rigid/constraint/linesearch.py changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in linesearch.func_linesearch_islands_coop at line 1176. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/constraint/linesearch.py`: 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: genesis/engine/solvers/mpm_solver.py genesis/engine/solvers/mpm_solver.py:949— genesis/engine/solvers/mpm_solver.py changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in mpm_solver.kernel_transfer_particles_to_grid at line 949. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/solvers/mpm_solver.py`: 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: genesis/engine/simulator.py genesis/engine/simulator.py:199— genesis/engine/simulator.py changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in Simulator.build at line 199. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/simulator.py`: 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: genesis/engine/solvers/kinematic_solver.py genesis/engine/solvers/kinematic_solver.py:239— genesis/engine/solvers/kinematic_solver.py changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in KinematicSolver.build at line 239. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/solvers/kinematic_solver.py`: 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: genesis/engine/solvers/rigid/collider/box_contact.py genesis/engine/solvers/rigid/collider/box_contact.py:187— genesis/engine/solvers/rigid/collider/box_contact.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 129 in box_contact.func_box_box_contact at line 187. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/collider/box_contact.py`: 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: genesis/engine/solvers/rigid/collider/mpr.py genesis/engine/solvers/rigid/collider/mpr.py:465— genesis/engine/solvers/rigid/collider/mpr.py changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in mpr.func_mpr_contact_from_centers at line 465. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/collider/mpr.py`: 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: genesis/engine/solvers/rigid/constraint/backward.py genesis/engine/solvers/rigid/constraint/backward.py:751— genesis/engine/solvers/rigid/constraint/backward.py changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in backward.kernel_manual_add_equality_constraints_bw at line 751. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/constraint/backward.py`: 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: genesis/engine/solvers/rigid/constraint/island.py genesis/engine/solvers/rigid/constraint/island.py:474— genesis/engine/solvers/rigid/constraint/island.py changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in island.func_build_islands_coop at line 474. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/constraint/island.py`: 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: REDACTED REDACTED:409— REDACTED changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 79 in Data.__init__ at line 409. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- REDACTED`: 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: genesis/engine/solvers/rigid/abd/forward_kinematics.py genesis/engine/solvers/rigid/abd/forward_kinematics.py:1060— genesis/engine/solvers/rigid/abd/forward_kinematics.py changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in forward_kinematics.func_sweep_links_by_level at line 1060. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/solvers/rigid/abd/forward_kinematics.py`: 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: REDACTED REDACTED:292— REDACTED changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in mjcf.parse_link at line 292. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- REDACTED`: 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.
FileTooLong: couplers/sap_coupler.py genesis/engine/couplers/sap_coupler.py— FileTooLong — 5736 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5236 over it, 11.47× 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: constraint/solver.py genesis/engine/solvers/rigid/constraint/solver.py— FileTooLong — 4408 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3908 over it, 8.82× 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: collider/narrowphase.py genesis/engine/solvers/rigid/collider/narrowphase.py— FileTooLong — 3984 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3484 over it, 7.97× 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: rigid/rigid_solver.py genesis/engine/solvers/rigid/rigid_solver.py— FileTooLong — 2377 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1877 over it, 4.75× 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: solvers/fem_solver.py genesis/engine/solvers/fem_solver.py— FileTooLong — 2304 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1804 over it, 4.61× 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: REDACTED REDACTED— FileTooLong — 2111 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1611 over it, 4.22× 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: couplers/legacy_coupler.py genesis/engine/couplers/legacy_coupler.py— FileTooLong — 2056 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1556 over it, 4.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: abd/forward_dynamics.py genesis/engine/solvers/rigid/abd/forward_dynamics.py— FileTooLong — 1760 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1260 over it, 3.52× 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: utils/geom.py genesis/utils/geom.py— FileTooLong — 1689 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1189 over it, 3.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: sensors/point_cloud_tactile.py genesis/engine/sensors/point_cloud_tactile.py— FileTooLong — 1527 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1027 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: rigid_entity/rigid_entity.py genesis/engine/entities/rigid_entity/rigid_entity.py— FileTooLong — 1470 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 970 over it, 2.94× 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: collider/contact.py genesis/engine/solvers/rigid/collider/contact.py— FileTooLong — 1389 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 889 over it, 2.78× 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: REDACTED REDACTED— FileTooLong — 1316 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 816 over it, 2.63× 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: constraint/linesearch.py genesis/engine/solvers/rigid/constraint/linesearch.py— FileTooLong — 1297 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 797 over it, 2.59× 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: pyrender/jit_render.py genesis/ext/pyrender/jit_render.py— FileTooLong — 1195 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 695 over it, 2.39× 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: solvers/mpm_solver.py genesis/engine/solvers/mpm_solver.py— FileTooLong — 1158 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 658 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: utils/misc.py genesis/utils/misc.py— FileTooLong — 1156 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 656 over it, 2.31× 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: solvers/kinematic_solver.py genesis/engine/solvers/kinematic_solver.py— FileTooLong — 1131 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 631 over it, 2.26× 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: utils/mesh.py genesis/utils/mesh.py— FileTooLong — 1125 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 625 over it, 2.25× 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: collider/gjk.py genesis/engine/solvers/rigid/collider/gjk.py— FileTooLong — 1120 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 620 over it, 2.24× 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: collider/collider.py genesis/engine/solvers/rigid/collider/collider.py— FileTooLong — 1059 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 559 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: vis/rasterizer_context.py genesis/vis/rasterizer_context.py— FileTooLong — 1026 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 526 over it, 2.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: abd/forward_kinematics.py genesis/engine/solvers/rigid/abd/forward_kinematics.py— FileTooLong — 948 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 448 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: pyrender/viewer.py genesis/ext/pyrender/viewer.py— FileTooLong — 948 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 448 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: collider/epa.py genesis/engine/solvers/rigid/collider/epa.py— FileTooLong — 946 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 446 over it, 1.89× 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.
TodoComment tests/utils/assets.py:158— # TODO: Validating mesh files is more tricky. Ignoring them for now. — 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 tests/utils/mujoco_parity.py:439— # TODO: 1 stiffness per joint in Mujoco, 1 stiffness per DoF in Genesis — 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 tests/rigid/test_asset_loading.py:1109— # TODO: None of the robots being tested for now have linear 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.
TodoComment tests/rigid/test_asset_loading.py:1110— # TODO: Scaling of bounds depending on the type of joint should be explicitly checked. — 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 tests/rigid/test_dynamics.py:154— # TODO: Cannot afford GPU test for this one — 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 tests/benchmarks/test_rigid.py:407— # TODO: Entire scene reset is still slow currently because 'partial=False' by default. — 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 genesis/vis/batch_renderer.py:167— # TODO: support batch rgba — 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 genesis/vis/rasterizer_context.py:997— # TODO: need to support multi-env visulaization for tet mode (it's using static node) — 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 genesis/vis/raytracer.py:734— # TODO: make this more principled — 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 REDACTED:189— # TODO: Parse occlusion — 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 REDACTED:303— # TODO: Parse them! — 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 genesis/utils/usd/usd_bake.py:44— # TODO: set portable root to avoid extension conflicts — 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 genesis/utils/usd/usd_context.py:358— # TODO: material_id is also reserved for group_by_material option. — 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 genesis/utils/usd/usd_geometry.py:170— # TODO: discard degenerated faces — 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 genesis/utils/usd/usd_rigid_entity.py:283— # TODO: use attribute "state:<INSTANCE_NAME>:physics:positiion" to parse init_qpos (but it is IsaacSim specific) — 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 genesis/utils/usd/usd_rigid_entity.py:443— # TODO: use drive.GetTypeAttr().Get() to parse force or velocity. — 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 genesis/utils/usd/usd_rigid_entity.py:455— # TODO: Implement target solving in rigid solver. (GetTargetPositionAttr()) — 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 genesis/utils/usd/usd_rigid_entity.py:481— # TODO: parse actuator in USD articulation, now all joints are considered to have actuators — 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 genesis/options/surfaces.py:257— # TODO: Identical pixels loaded from distinct files are not shared, since 'image_path' is part of the key. Sharing — 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 genesis/ext/_trimesh_patch.py:281— # TODO : should this be removed to always return a scene? — 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 genesis/ext/_trimesh_patch.py:417— # TODO: probably need to support 8 and 12 columns for quads — 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 genesis/ext/pyrender/font.py:287— # TODO MAKE THIS MORE EFFICIENT, glBufferSubData is broken — 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 genesis/ext/pyrender/material.py:132— # TODO TMP — 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 genesis/ext/pyrender/primitive.py:440— # TODO JOINTS AND WEIGHTS — 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 genesis/ext/pyrender/texture.py:251— # TODO OPENGL BUG? — 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.
Duplicated block (6 lines × 2) genesis/engine/couplers/sap_coupler.py:4286— genesis/engine/couplers/sap_coupler.py:4286-4291 | genesis/engine/couplers/sap_coupler.py:4344-4349 — 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 (6 lines × 2) genesis/engine/couplers/sap_coupler.py:6557— genesis/engine/couplers/sap_coupler.py:6557-6565 | genesis/engine/couplers/sap_coupler.py:7452-7457 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/couplers/sap_coupler.py:6554` calls `dot` and `genesis/engine/couplers/sap_coupler.py:7449` 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 × 2) REDACTED:1223— REDACTED:1223-1228 | REDACTED:1785-1790 — 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 (6 lines × 2) REDACTED:1428— REDACTED:1428-1433 | REDACTED:1977-1982 — 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 (6 lines × 2) genesis/engine/solvers/fem_solver.py:2666— genesis/engine/solvers/fem_solver.py:2666-2671 | genesis/engine/solvers/fem_solver.py:2788-2793 — 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 (6 lines × 2) genesis/engine/solvers/rigid/abd/accessor.py:47— genesis/engine/solvers/rigid/abd/accessor.py:47-52 | genesis/engine/solvers/rigid/abd/accessor.py:214-219 — 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 (6 lines × 2) genesis/engine/solvers/rigid/abd/accessor.py:75— genesis/engine/solvers/rigid/abd/accessor.py:75-80 | genesis/engine/solvers/rigid/abd/accessor.py:258-263 — 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 (6 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1066— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1066-1071 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1124-1129 — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:1066` 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) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1723— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1723-1729 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:2205-2210 — 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 (6 lines × 2) genesis/engine/solvers/rigid/abd/misc.py:523— genesis/engine/solvers/rigid/abd/misc.py:523-528 | genesis/engine/solvers/rigid/abd/misc.py:564-569 — 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 (6 lines × 2) genesis/engine/solvers/rigid/collider/box_contact.py:457— genesis/engine/solvers/rigid/collider/box_contact.py:457-462 | genesis/engine/solvers/rigid/collider/box_contact.py:745-754 — 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 `genesis/engine/solvers/rigid/collider/box_contact.py:457` 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) genesis/engine/solvers/rigid/collider/box_contact.py:688— genesis/engine/solvers/rigid/collider/box_contact.py:688-693 | genesis/engine/solvers/rigid/collider/box_contact.py:698-703 — 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 (6 lines × 2) genesis/engine/solvers/rigid/collider/capsule_contact.py:43— genesis/engine/solvers/rigid/collider/capsule_contact.py:43-50 | genesis/engine/solvers/rigid/collider/capsule_contact.py:188-193 — 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 (6 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:4295— genesis/engine/solvers/rigid/collider/narrowphase.py:4295-4300 | genesis/engine/solvers/rigid/collider/narrowphase.py:4985-4999 — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:4985` 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) genesis/engine/solvers/rigid/constraint/linesearch.py:686— genesis/engine/solvers/rigid/constraint/linesearch.py:686-691 | genesis/engine/solvers/rigid/constraint/linesearch.py:731-737 — 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 `genesis/engine/solvers/rigid/constraint/linesearch.py:731` 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) genesis/engine/solvers/rigid/constraint/linesearch.py:1291— genesis/engine/solvers/rigid/constraint/linesearch.py:1291-1296 | genesis/engine/solvers/rigid/constraint/linesearch.py:1417-1422 — 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 `genesis/engine/solvers/rigid/constraint/linesearch.py:1291` 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, `genesis/engine/solvers/rigid/constraint/linesearch.py:1423` calls `Vector` and `genesis/engine/solvers/rigid/constraint/linesearch.py:1297` 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 (6 lines × 2) genesis/utils/sdf.py:355— genesis/utils/sdf.py:355-360 | genesis/utils/sdf.py:455-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. Read the line range as the matched WINDOW rather than a finished unit: at `genesis/utils/sdf.py: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/utils/sdf.py:354` calls `qd_float` and `genesis/utils/sdf.py:454` 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 × 2) REDACTED:338— REDACTED:338-344 | REDACTED:356-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.
Duplicated block (6 lines × 2) genesis/engine/couplers/legacy_coupler.py:2663— genesis/engine/couplers/legacy_coupler.py:2663-2668 | genesis/engine/solvers/sph_solver.py:761-766 — 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 `genesis/engine/couplers/legacy_coupler.py: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.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1059— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1059-1064 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1117-1122 — 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 (6 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1784— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1784-1789 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1226-1231 — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:1784` 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) genesis/engine/solvers/rigid/collider/box_contact.py:511— genesis/engine/solvers/rigid/collider/box_contact.py:511-516 | genesis/engine/solvers/rigid/collider/box_contact.py:792-797 — 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 (6 lines × 2) genesis/engine/solvers/rigid/collider/epa.py:699— genesis/engine/solvers/rigid/collider/epa.py:699-704 | genesis/engine/solvers/rigid/collider/epa.py:759-764 — 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 (6 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:943— genesis/engine/solvers/rigid/constraint/linesearch.py:943-948 | genesis/engine/solvers/rigid/constraint/linesearch.py:1137-1142 — 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 (6 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:2595— genesis/engine/solvers/rigid/constraint/solver.py:2595-2600 | genesis/engine/solvers/rigid/constraint/solver.py:2751-2756 — 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) genesis/engine/bvh.py:527— genesis/engine/bvh.py:527-533 | genesis/engine/bvh.py:545-551 — 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 `genesis/engine/bvh.py:527` 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) genesis/engine/couplers/sap_coupler.py:3813— genesis/engine/couplers/sap_coupler.py:3813-3819 | genesis/engine/couplers/sap_coupler.py:4798-4805 — 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 `genesis/engine/couplers/sap_coupler.py:3813` 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) genesis/engine/couplers/sap_coupler.py:4520— genesis/engine/couplers/sap_coupler.py:4520-4526 | genesis/engine/couplers/sap_coupler.py:4709-4715 — 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 `genesis/engine/couplers/sap_coupler.py:4520` 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) genesis/engine/couplers/sap_coupler.py:6441— genesis/engine/couplers/sap_coupler.py:6441-6447 | genesis/engine/couplers/sap_coupler.py:6992-6998 — 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) genesis/engine/solvers/rigid/abd/forward_dynamics.py:214— genesis/engine/solvers/rigid/abd/forward_dynamics.py:214-220 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1799-1805 — 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) genesis/engine/solvers/rigid/abd/forward_dynamics.py:630— genesis/engine/solvers/rigid/abd/forward_dynamics.py:630-639 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:971-977 — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:630` 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) genesis/engine/solvers/rigid/abd/forward_dynamics.py:780— genesis/engine/solvers/rigid/abd/forward_dynamics.py:780-786 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:856-862 — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:780` 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) genesis/engine/solvers/rigid/collider/contact.py:1429— genesis/engine/solvers/rigid/collider/contact.py:1429-1435 | genesis/engine/solvers/rigid/collider/contact.py:1793-1799 — 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) genesis/engine/solvers/rigid/collider/narrowphase.py:2802— genesis/engine/solvers/rigid/collider/narrowphase.py:2802-2811 | genesis/engine/solvers/rigid/collider/narrowphase.py:4283-4289 — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:2802` 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) genesis/engine/solvers/rigid/constraint/linesearch.py:239— genesis/engine/solvers/rigid/constraint/linesearch.py:239-245 | genesis/engine/solvers/rigid/constraint/solver.py:4837-4843 — 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 (7 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:1125— genesis/engine/solvers/rigid/constraint/linesearch.py:1125-1131 | genesis/engine/solvers/rigid/constraint/linesearch.py:1605-1611 — 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) genesis/engine/solvers/rigid/rigid_solver.py:1822— genesis/engine/solvers/rigid/rigid_solver.py:1822-1830 | genesis/engine/solvers/rigid/rigid_solver.py:1962-1968 — 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) REDACTED:351— REDACTED:351-359 | REDACTED:363-369 — 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 `REDACTED:351` 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) genesis/vis/rasterizer_context.py:1055— genesis/vis/rasterizer_context.py:1055-1061 | genesis/vis/rasterizer_context.py:1078-1084 — 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 (7 lines × 2) genesis/engine/solvers/pbd_solver.py:786— genesis/engine/solvers/pbd_solver.py:786-792 | genesis/engine/solvers/sph_solver.py:802-808 — 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 (7 lines × 2) genesis/engine/solvers/rigid/abd/forward_kinematics.py:614— genesis/engine/solvers/rigid/abd/forward_kinematics.py:614-620 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:694-700 — 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) genesis/engine/solvers/rigid/constraint/backward.py:817— genesis/engine/solvers/rigid/constraint/backward.py:817-823 | genesis/engine/solvers/rigid/constraint/solver.py:1517-1523 — 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 (7 lines × 2) genesis/utils/path_planning.py:587— genesis/utils/path_planning.py:587-593 | genesis/utils/path_planning.py:976-982 — 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 before the matched lines, `genesis/utils/path_planning.py:973` calls `info` and `genesis/utils/path_planning.py:583` 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 lines × 2) genesis/engine/entities/rigid_entity/rigid_geom.py:282— genesis/engine/entities/rigid_entity/rigid_geom.py:282-288 | genesis/engine/entities/rigid_entity/rigid_link.py:509-515 — 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. 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 (7 lines × 2) genesis/engine/solvers/kinematic_solver.py:819— genesis/engine/solvers/kinematic_solver.py:819-825 | genesis/engine/solvers/rigid/rigid_solver.py:1256-1262 — 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 `genesis/engine/solvers/kinematic_solver.py:819` 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) genesis/engine/solvers/rigid/collider/contact.py:353— genesis/engine/solvers/rigid/collider/contact.py:353-359 | genesis/engine/solvers/rigid/collider/contact.py:376-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.
Duplicated block (7 lines × 2) genesis/engine/solvers/rigid/abd/forward_kinematics.py:363— genesis/engine/solvers/rigid/abd/forward_kinematics.py:363-369 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:387-393 — 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) genesis/engine/solvers/rigid/abd/manual_bw.py:107— genesis/engine/solvers/rigid/abd/manual_bw.py:107-113 | genesis/engine/solvers/rigid/abd/manual_bw.py:130-136 — 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) genesis/engine/solvers/rigid/collider/epa.py:892— genesis/engine/solvers/rigid/collider/epa.py:892-898 | genesis/engine/solvers/rigid/collider/epa.py:1324-1330 — 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) genesis/engine/solvers/rigid/collider/narrowphase.py:2349— genesis/engine/solvers/rigid/collider/narrowphase.py:2349-2355 | genesis/engine/solvers/rigid/collider/narrowphase.py:2371-2377 — 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) genesis/engine/couplers/sap_coupler.py:1994— genesis/engine/couplers/sap_coupler.py:1994-2001 | genesis/engine/couplers/sap_coupler.py:2054-2061 — 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) genesis/engine/couplers/sap_coupler.py:6463— genesis/engine/couplers/sap_coupler.py:6463-6470 | genesis/engine/couplers/sap_coupler.py:7363-7371 — 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 `genesis/engine/couplers/sap_coupler.py:6463` 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. 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 (8 lines × 2) REDACTED:343— REDACTED:343-350 | REDACTED:715-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.
Duplicated block (8 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1233— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1233-1240 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1266-1273 — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:1233` 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) genesis/engine/solvers/rigid/abd/forward_kinematics.py:339— genesis/engine/solvers/rigid/abd/forward_kinematics.py:339-346 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:370-377 — 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) genesis/engine/solvers/rigid/collider/box_contact.py:467— genesis/engine/solvers/rigid/collider/box_contact.py:467-474 | genesis/engine/solvers/rigid/collider/box_contact.py:758-765 — 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 `genesis/engine/solvers/rigid/collider/box_contact.py:467` 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) genesis/engine/solvers/rigid/collider/contact.py:1453— genesis/engine/solvers/rigid/collider/contact.py:1453-1460 | genesis/engine/solvers/rigid/collider/contact.py:1826-1833 — 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, `genesis/engine/solvers/rigid/collider/contact.py:1836` calls `qd_block_max` and `genesis/engine/solvers/rigid/collider/contact.py:1462` 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 × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:162— genesis/engine/solvers/rigid/collider/narrowphase.py:162-169 | genesis/engine/solvers/rigid/collider/narrowphase.py:930-937 — 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) genesis/engine/solvers/rigid/collider/narrowphase.py:1163— genesis/engine/solvers/rigid/collider/narrowphase.py:1163-1176 | genesis/engine/solvers/rigid/collider/narrowphase.py:1181-1188 — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:1163` 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) genesis/engine/solvers/rigid/constraint/backward.py:804— genesis/engine/solvers/rigid/constraint/backward.py:804-811 | genesis/engine/solvers/rigid/constraint/solver.py:1507-1514 — 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) genesis/engine/solvers/rigid/constraint/linesearch.py:783— genesis/engine/solvers/rigid/constraint/linesearch.py:783-790 | genesis/engine/solvers/rigid/constraint/linesearch.py:912-919 — 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) genesis/engine/solvers/rigid/constraint/solver.py:2541— genesis/engine/solvers/rigid/constraint/solver.py:2541-2548 | genesis/engine/solvers/rigid/constraint/solver.py:5566-5576 — 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) genesis/ext/pyrender/camera.py:181— genesis/ext/pyrender/camera.py:181-188 | genesis/ext/pyrender/camera.py: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. 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 (8 lines × 2) genesis/utils/geom.py:2257— genesis/utils/geom.py:2257-2264 | genesis/utils/geom.py:2293-2300 — 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) genesis/utils/particle.py:194— genesis/utils/particle.py:194-201 | genesis/utils/particle.py:787-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.
Duplicated block (8 lines × 2) genesis/vis/rasterizer_context.py:1164— genesis/vis/rasterizer_context.py:1164-1171 | genesis/vis/rasterizer_context.py:1187-1194 — 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 (8 lines × 2) genesis/vis/raytracer.py:276— genesis/vis/raytracer.py:276-283 | genesis/vis/raytracer.py:290-297 — 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) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:862— genesis/engine/solvers/rigid/abd/inverse_kinematics.py:862-869 | genesis/engine/solvers/rigid/abd/inverse_kinematics.py:882-889 — 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) genesis/engine/solvers/rigid/abd/manual_bw.py:253— genesis/engine/solvers/rigid/abd/manual_bw.py:253-260 | genesis/engine/solvers/rigid/abd/manual_bw.py:422-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. Read the line range as the matched WINDOW rather than a finished unit: at `genesis/engine/solvers/rigid/abd/manual_bw.py:253` 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) genesis/engine/solvers/rigid/collider/contact.py:568— genesis/engine/solvers/rigid/collider/contact.py:568-575 | genesis/engine/solvers/rigid/collider/diff_gjk.py:340-347 — 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) genesis/engine/solvers/pbd_solver.py:1009— genesis/engine/solvers/pbd_solver.py:1009-1013 | genesis/engine/solvers/sph_solver.py:1169-1173 — 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 `genesis/engine/solvers/pbd_solver.py:1009` 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) genesis/engine/solvers/rigid/abd/forward_dynamics.py:597— genesis/engine/solvers/rigid/abd/forward_dynamics.py:597-601 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:619-623 — 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) genesis/engine/solvers/rigid/collider/box_contact.py:425— genesis/engine/solvers/rigid/collider/box_contact.py:425-429 | genesis/engine/solvers/rigid/collider/box_contact.py:682-686 — 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) genesis/engine/solvers/rigid/collider/mpr.py:612— genesis/engine/solvers/rigid/collider/mpr.py:612-616 | genesis/engine/solvers/rigid/collider/mpr.py:620-624 — 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) genesis/engine/solvers/rigid/constraint/backward.py:554— genesis/engine/solvers/rigid/constraint/backward.py:554-558 | genesis/engine/solvers/rigid/constraint/solver.py:878-882 — 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) genesis/ext/pyrender/font.py:22— genesis/ext/pyrender/font.py:22-26 | genesis/ext/pyrender/shader_program.py:20-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 (5 lines × 2) genesis/engine/bvh.py:316— genesis/engine/bvh.py:316-320 | genesis/engine/bvh.py:387-391 — 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) genesis/engine/sensors/tactile_shared.py:644— genesis/engine/sensors/tactile_shared.py:644-648 | genesis/engine/sensors/tactile_shared.py:653-657 — 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) genesis/engine/solvers/kinematic_solver.py:1074— genesis/engine/solvers/kinematic_solver.py:1074-1078 | genesis/engine/solvers/rigid/rigid_solver.py:2431-2435 — 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, `genesis/engine/solvers/rigid/rigid_solver.py:2428` calls `_wake_dofs` and `genesis/engine/solvers/kinematic_solver.py:1071` 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 × 2) genesis/engine/solvers/mpm_solver.py:1318— genesis/engine/solvers/mpm_solver.py:1318-1322 | genesis/engine/solvers/mpm_solver.py:1435-1439 — 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) genesis/engine/solvers/particle_solver.py:369— genesis/engine/solvers/particle_solver.py:369-373 | genesis/engine/solvers/particle_solver.py:400-404 — 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) genesis/engine/solvers/rigid/abd/misc.py:822— genesis/engine/solvers/rigid/abd/misc.py:822-826 | genesis/engine/solvers/rigid/abd/misc.py:853-857 — 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) genesis/engine/solvers/rigid/collider/narrowphase.py:136— genesis/engine/solvers/rigid/collider/narrowphase.py:136-140 | genesis/engine/solvers/rigid/collider/narrowphase.py:922-926 — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:136` 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) genesis/engine/solvers/rigid/collider/narrowphase.py:4499— genesis/engine/solvers/rigid/collider/narrowphase.py:4499-4503 | genesis/engine/solvers/rigid/collider/narrowphase.py:4795-4799 — 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) genesis/engine/solvers/rigid/constraint/backward.py:687— genesis/engine/solvers/rigid/constraint/backward.py:687-691 | genesis/engine/solvers/rigid/constraint/backward.py:738-742 — 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, `genesis/engine/solvers/rigid/constraint/backward.py:744` calls `dot` and `genesis/engine/solvers/rigid/constraint/backward.py:692` 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 × 2) genesis/engine/solvers/rigid/constraint/backward.py:1054— genesis/engine/solvers/rigid/constraint/backward.py:1054-1058 | genesis/engine/solvers/rigid/constraint/backward.py:1437-1441 — 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) genesis/engine/solvers/rigid/constraint/island.py:419— genesis/engine/solvers/rigid/constraint/island.py:419-423 | genesis/engine/solvers/rigid/constraint/island.py:444-448 — 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) genesis/engine/solvers/rigid/constraint/linesearch.py:652— genesis/engine/solvers/rigid/constraint/linesearch.py:652-656 | genesis/engine/solvers/rigid/constraint/linesearch.py:1166-1170 — 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) genesis/vis/rasterizer_context.py:913— genesis/vis/rasterizer_context.py:913-917 | genesis/vis/rasterizer_context.py:1048-1052 — 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 `genesis/vis/rasterizer_context.py:913` 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. 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) examples/tutorials/position_control_comparison.py:77— examples/tutorials/position_control_comparison.py:77-81 | examples/tutorials/position_control_comparison.py:89-93 — 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, `examples/tutorials/position_control_comparison.py:94` calls `cos` and `examples/tutorials/position_control_comparison.py:83` 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.
Swallowed exception (empty catch) genesis/vis/viewer.py:203— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/_trimesh_patch.py:516— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/_trimesh_patch.py:521— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/_trimesh_patch.py:606— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/offscreen.py:216— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/offscreen.py:228— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `__del__()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:663— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:697— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:701— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:705— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:709— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:1229— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:1233— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/viewer.py:1315— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/platforms/base.py:46— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `__del__()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
Swallowed exception (empty catch) genesis/ext/pyrender/platforms/pyglet_platform.py:24— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/platforms/pyglet_platform.py:75— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/platforms/pyglet_platform.py:99— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/ext/pyrender/overlay/plugin.py:245— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) genesis/engine/sensors/base_sensor.py:71— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `__del__()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
Duplicated block (12 lines × 2) genesis/engine/force_fields.py:103— genesis/engine/force_fields.py:103-114 | genesis/engine/force_fields.py:297-308 — 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) genesis/engine/solvers/pbd_solver.py:770— genesis/engine/solvers/pbd_solver.py:770-781 | genesis/engine/solvers/sph_solver.py:786-797 — 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) genesis/engine/solvers/rigid/collider/epa.py:244— genesis/engine/solvers/rigid/collider/epa.py:244-255 | genesis/engine/solvers/rigid/collider/epa.py:1249-1260 — 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) genesis/engine/solvers/rigid/constraint/linesearch.py:1360— genesis/engine/solvers/rigid/constraint/linesearch.py:1360-1371 | genesis/engine/solvers/rigid/constraint/linesearch.py:1491-1502 — 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) genesis/engine/solvers/rigid/rigid_solver.py:1863— genesis/engine/solvers/rigid/rigid_solver.py:1863-1874 | genesis/engine/solvers/rigid/rigid_solver.py:1997-2008 — 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 `genesis/engine/solvers/rigid/rigid_solver.py:1863` 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) genesis/utils/geom.py:1110— genesis/utils/geom.py:1110-1121 | genesis/utils/geom.py:2079-2090 — 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 `genesis/utils/geom.py:1110` 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) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1644— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1644-1655 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1692-1703 — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:1644` 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) genesis/engine/solvers/rigid/constraint/solver.py:2446— genesis/engine/solvers/rigid/constraint/solver.py:2446-2457 | genesis/engine/solvers/rigid/constraint/solver.py:2616-2627 — 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) genesis/engine/couplers/sap_coupler.py:6526— genesis/engine/couplers/sap_coupler.py:6526-6537 | genesis/engine/couplers/sap_coupler.py:7425-7436 — 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 (12 lines × 2) genesis/engine/solvers/rigid/collider/box_contact.py:626— genesis/engine/solvers/rigid/collider/box_contact.py:626-637 | genesis/engine/solvers/rigid/collider/box_contact.py:641-652 — 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 `genesis/engine/solvers/rigid/collider/box_contact.py:626` 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) genesis/engine/solvers/fem_solver.py:1147— genesis/engine/solvers/fem_solver.py:1147-1158 | genesis/engine/solvers/mpm_solver.py:664-675 — 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) genesis/engine/solvers/fem_solver.py:1162— genesis/engine/solvers/fem_solver.py:1162-1173 | genesis/engine/solvers/mpm_solver.py:683-694 — 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) examples/coupling/grasp_soft_cube.py:15— examples/coupling/grasp_soft_cube.py:15-26 | examples/coupling/sand_wheel.py:16-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 both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples/coupling/grasp_soft_cube.py: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 (12 lines × 2) examples/ipc/ipc_robot_cloth_teleop.py:101— examples/ipc/ipc_robot_cloth_teleop.py:101-112 | examples/ipc/ipc_robot_cloth_teleop.py:120-131 — 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 `examples/ipc/ipc_robot_cloth_teleop.py:101` 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) examples/locomotion/go2_env.py:243— examples/locomotion/go2_env.py:243-254 | examples/manipulation/grasp_env.py:238-249 — 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 (12 lines × 2) examples/rendering/demo.py:70— examples/rendering/demo.py:70-81 | examples/rendering/demo.py:118-129 — 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 `examples/rendering/demo.py: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 (12 lines × 2) examples/rigid/ik_franka_batched.py:35— examples/rigid/ik_franka_batched.py:35-46 | examples/rigid/ik_shadow_hand.py:32-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 `examples/rigid/ik_franka_batched.py:35` 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) genesis/engine/solvers/rigid/abd/forward_dynamics.py:994— genesis/engine/solvers/rigid/abd/forward_dynamics.py:994-1002 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1009-1017 — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:994` 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) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1456— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1456-1464 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1542-1551 — 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) genesis/engine/solvers/rigid/collider/narrowphase.py:1369— genesis/engine/solvers/rigid/collider/narrowphase.py:1369-1377 | genesis/engine/solvers/rigid/collider/narrowphase.py:4295-4303 — 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) genesis/engine/solvers/rigid/constraint/linesearch.py:1212— genesis/engine/solvers/rigid/constraint/linesearch.py:1212-1220 | genesis/engine/solvers/rigid/constraint/linesearch.py:1566-1574 — 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 `genesis/engine/solvers/rigid/constraint/linesearch.py:1212` 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) genesis/engine/solvers/rigid/constraint/noslip.py:210— genesis/engine/solvers/rigid/constraint/noslip.py:210-218 | genesis/engine/solvers/rigid/constraint/noslip.py:486-494 — 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 `genesis/engine/solvers/rigid/constraint/noslip.py:210` 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) genesis/engine/solvers/rigid/constraint/solver.py:2423— genesis/engine/solvers/rigid/constraint/solver.py:2423-2431 | genesis/engine/solvers/rigid/constraint/solver.py:2488-2496 — 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 `genesis/engine/solvers/rigid/constraint/solver.py:2423` 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, `genesis/engine/solvers/rigid/constraint/solver.py:2432` calls `static` and `genesis/engine/solvers/rigid/constraint/solver.py:2497` 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) genesis/engine/solvers/rigid/constraint/solver.py:2494— genesis/engine/solvers/rigid/constraint/solver.py:2494-2502 | genesis/engine/solvers/rigid/constraint/solver.py:2754-2762 — 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) genesis/engine/solvers/rigid/constraint/solver.py:3292— genesis/engine/solvers/rigid/constraint/solver.py:3292-3300 | genesis/engine/solvers/rigid/constraint/solver.py:3340-3348 — 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) REDACTED:658— REDACTED:658-666 | genesis/ext/urdfpy/utils.py:259-267 — 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 (9 lines × 2) genesis/vis/rasterizer_context.py:349— genesis/vis/rasterizer_context.py:349-357 | genesis/vis/rasterizer_context.py:666-674 — 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) genesis/engine/solvers/rigid/constraint/noslip.py:145— genesis/engine/solvers/rigid/constraint/noslip.py:145-153 | genesis/engine/solvers/rigid/constraint/noslip.py:196-204 — 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 `genesis/engine/solvers/rigid/constraint/noslip.py:145` 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) genesis/options/solvers.py:801— genesis/options/solvers.py:801-809 | genesis/options/solvers.py:879-887 — 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) genesis/engine/solvers/rigid/collider/narrowphase.py:4561— genesis/engine/solvers/rigid/collider/narrowphase.py:4561-4569 | genesis/engine/solvers/rigid/collider/narrowphase.py:4619-4627 — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:4561` 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) genesis/engine/solvers/rigid/constraint/linesearch.py:871— genesis/engine/solvers/rigid/constraint/linesearch.py:871-879 | genesis/engine/solvers/rigid/constraint/linesearch.py:1073-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.
Duplicated block (9 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:5119— genesis/engine/solvers/rigid/constraint/solver.py:5119-5127 | genesis/engine/solvers/rigid/constraint/solver.py:5232-5240 — 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) genesis/engine/entities/rigid_entity/rigid_entity.py:805— genesis/engine/entities/rigid_entity/rigid_entity.py:805-813 | genesis/engine/entities/rigid_entity/rigid_link.py:190-198 — 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. 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 (9 lines × 2) examples/deformable/pbd_liquid.py:10— examples/deformable/pbd_liquid.py:10-18 | examples/rigid/domain_randomization.py:11-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 `examples/deformable/pbd_liquid.py:10` 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) genesis/engine/solvers/kinematic_solver.py:941— genesis/engine/solvers/kinematic_solver.py:941-950 | genesis/engine/solvers/kinematic_solver.py:989-998 — 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 `genesis/engine/solvers/kinematic_solver.py:941` 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) genesis/engine/solvers/rigid/abd/forward_dynamics.py:82— genesis/engine/solvers/rigid/abd/forward_dynamics.py:82-91 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:2377-2386 — 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) genesis/engine/solvers/rigid/constraint/linesearch.py:1293— genesis/engine/solvers/rigid/constraint/linesearch.py:1293-1302 | genesis/engine/solvers/rigid/constraint/linesearch.py:1583-1592 — 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 `genesis/engine/solvers/rigid/constraint/linesearch.py:1293` 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) genesis/engine/solvers/rigid/constraint/solver.py:5325— genesis/engine/solvers/rigid/constraint/solver.py:5325-5334 | genesis/engine/solvers/rigid/constraint/solver.py:5571-5580 — 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 `genesis/engine/solvers/rigid/constraint/solver.py:5325` 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) genesis/engine/solvers/rigid/rigid_solver.py:2479— genesis/engine/solvers/rigid/rigid_solver.py:2479-2488 | genesis/engine/solvers/rigid/rigid_solver.py:2499-2508 — 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 (10 lines × 2) genesis/ext/pyrender/jit_render.py:477— genesis/ext/pyrender/jit_render.py:477-486 | genesis/ext/pyrender/jit_render.py:497-506 — 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) genesis/ext/pyrender/scene.py:73— genesis/ext/pyrender/scene.py:73-82 | genesis/ext/pyrender/scene.py:535-544 — 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) genesis/utils/sdf.py:333— genesis/utils/sdf.py:333-342 | genesis/utils/sdf.py:415-426 — 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) genesis/engine/sensors/kinematic_tactile.py:757— genesis/engine/sensors/kinematic_tactile.py:757-766 | genesis/engine/sensors/kinematic_tactile.py:1016-1025 — 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) genesis/engine/solvers/mpm_solver.py:1385— genesis/engine/solvers/mpm_solver.py:1385-1394 | genesis/engine/solvers/mpm_solver.py:1485-1494 — 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 first that the copies are not typed on the same thing: the declarations holding them bind `i_p` to `int` in one and `is_g2p_backward=True) for` 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 (10 lines × 2) genesis/engine/bvh.py:334— genesis/engine/bvh.py:334-343 | genesis/engine/bvh.py:405-414 — 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) genesis/engine/solvers/rigid/constraint/solver.py:3184— genesis/engine/solvers/rigid/constraint/solver.py:3184-3193 | genesis/engine/solvers/rigid/constraint/solver.py:3199-3208 — 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) examples/rendering/demo.py:44— examples/rendering/demo.py:44-55 | examples/rendering/demo.py:141-150 — 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 `examples/rendering/demo.py: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 (10 lines × 2) examples/rigid/ik_duck.py:41— examples/rigid/ik_duck.py:41-50 | examples/rigid/ik_franka.py:38-47 — before extracting anything, compare `examples/rigid/ik_duck.py` and `examples/rigid/ik_franka.py` as WHOLE FILES: this scan already matched 4 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 `examples/rigid/ik_duck.py: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 (10 lines × 2) examples/rigid/rolling_coast.py:47— examples/rigid/rolling_coast.py:47-56 | examples/rigid/torsional_grasp.py:48-57 — 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 `examples/rigid/rolling_coast.py:47` 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) genesis/engine/solvers/rigid/abd/forward_kinematics.py:115— genesis/engine/solvers/rigid/abd/forward_kinematics.py:115-119 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:160-164 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:198-202 — 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 (5 lines × 3) genesis/engine/solvers/rigid/collider/narrowphase.py:1154— genesis/engine/solvers/rigid/collider/narrowphase.py:1154-1158 | genesis/engine/solvers/rigid/collider/narrowphase.py:1175-1179 | genesis/engine/solvers/rigid/collider/narrowphase.py:1187-1191 — 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 (5 lines × 3) genesis/engine/solvers/rigid/constraint/backward.py:551— genesis/engine/solvers/rigid/constraint/backward.py:551-555 | genesis/engine/solvers/rigid/constraint/backward.py:1283-1288 | genesis/engine/solvers/rigid/constraint/solver.py:1082-1087 — 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 (5 lines × 3) genesis/engine/solvers/rigid/constraint/linesearch.py:1242— genesis/engine/solvers/rigid/constraint/linesearch.py:1242-1246 | genesis/engine/solvers/rigid/constraint/linesearch.py:1366-1370 | genesis/engine/solvers/rigid/constraint/linesearch.py:1497-1501 — 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 (5 lines × 3) genesis/utils/watertighten.py:361— genesis/utils/watertighten.py:361-365 | genesis/utils/watertighten.py:373-377 | genesis/utils/watertighten.py:385-389 — 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 (5 lines × 3) genesis/vis/rasterizer_context.py:768— genesis/vis/rasterizer_context.py:768-772 | genesis/vis/rasterizer_context.py:851-855 | genesis/vis/rasterizer_context.py:934-939 — 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 `genesis/vis/rasterizer_context.py:768` 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 × 3) genesis/vis/rasterizer_context.py:1165— genesis/vis/rasterizer_context.py:1165-1169 | genesis/vis/rasterizer_context.py:1188-1192 | genesis/vis/rasterizer_context.py:1202-1208 — 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 `genesis/vis/rasterizer_context.py:1165` 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. 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 × 3) genesis/vis/camera.py:642— genesis/vis/camera.py:642-646 | genesis/vis/camera.py:648-652 | genesis/vis/camera.py:653-657 — 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 before the matched lines, `genesis/vis/camera.py:642` calls `raise_exception` and `genesis/vis/camera.py:653` 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 × 3) genesis/engine/solvers/rigid/abd/forward_kinematics.py:442— genesis/engine/solvers/rigid/abd/forward_kinematics.py:442-446 | genesis/engine/solvers/rigid/abd/inverse_kinematics.py:145-149 | genesis/engine/solvers/rigid/abd/manual_bw.py:38-42 — 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.
Duplicated block (5 lines × 3) genesis/vis/rasterizer_context.py:690— genesis/vis/rasterizer_context.py:690-694 | genesis/vis/rasterizer_context.py:1013-1017 | genesis/vis/rasterizer_context.py:1021-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.
Duplicated block (5 lines × 3) examples/rigid/diffik_controller.py:71— examples/rigid/diffik_controller.py:71-75 | examples/rigid/ik_duck.py:54-58 | examples/rigid/ik_franka.py:52-56 — before extracting anything, compare `examples/rigid/diffik_controller.py` and `examples/rigid/ik_franka.py` 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. 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 (13 lines × 2) genesis/engine/couplers/sap_coupler.py:2892— genesis/engine/couplers/sap_coupler.py:2892-2904 | genesis/engine/solvers/fem_solver.py:2821-2833 — 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 lines × 2) genesis/engine/couplers/sap_coupler.py:6572— genesis/engine/couplers/sap_coupler.py:6572-6584 | genesis/engine/couplers/sap_coupler.py:7101-7113 — 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 `genesis/engine/couplers/sap_coupler.py:6572` 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) genesis/engine/solvers/rigid/collider/narrowphase.py:1706— genesis/engine/solvers/rigid/collider/narrowphase.py:1706-1718 | genesis/engine/solvers/rigid/collider/narrowphase.py:4436-4448 — 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 (13 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:2627— genesis/engine/solvers/rigid/constraint/solver.py:2627-2639 | genesis/engine/solvers/rigid/constraint/solver.py:2832-2844 — 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 (13 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:3107— genesis/engine/solvers/rigid/constraint/solver.py:3107-3119 | genesis/engine/solvers/rigid/constraint/solver.py:3136-3148 — 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 (13 lines × 2) examples/coupling/cloth_on_rigid.py:19— examples/coupling/cloth_on_rigid.py:19-31 | examples/coupling/water_wheel.py:31-43 — 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 `examples/coupling/cloth_on_rigid.py:19` 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) REDACTED:47— REDACTED:47-59 | REDACTED:36-48 — before extracting anything, compare `REDACTED` and `REDACTED` 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 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. 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 `REDACTED:47` 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) examples/rigid/apply_external_wrench.py:8— examples/rigid/apply_external_wrench.py:8-20 | examples/rigid/merge_entities.py:18-30 — 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 `examples/rigid/apply_external_wrench.py: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 before the matched lines, `examples/rigid/merge_entities.py:17` calls `add_argument` and `examples/rigid/apply_external_wrench.py:7` 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 (13 lines × 2) examples/rigid/screw_constraint.py:28— examples/rigid/screw_constraint.py:28-40 | examples/tutorials/position_control_comparison.py:18-30 — 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 `examples/rigid/screw_constraint.py: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/rigid/screw_constraint.py:27` calls `add_argument` and `examples/tutorials/position_control_comparison.py:17` 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 (13 lines × 2) examples/sap_coupling/fem_fixed_constraint.py:14— examples/sap_coupling/fem_fixed_constraint.py:14-26 | examples/sap_coupling/fem_sphere_and_cube.py:8-20 — before extracting anything, compare `examples/sap_coupling/fem_fixed_constraint.py` and `examples/sap_coupling/fem_sphere_and_cube.py` as WHOLE FILES: this scan already matched 3 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/sap_coupling/fem_fixed_constraint.py:28` calls `Elastic` and `examples/sap_coupling/fem_sphere_and_cube.py:22` 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.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×9
Edited copy of a member (13 corresponding lines) genesis/engine/solvers/rigid/abd/accessor.py:45— genesis/engine/solvers/rigid/abd/accessor.py:45-57 | genesis/engine/solvers/rigid/abd/accessor.py:212-224 — 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) genesis/vis/rasterizer_context.py:798— genesis/vis/rasterizer_context.py:798-810 | genesis/vis/rasterizer_context.py:881-893 — 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) genesis/options/solvers.py:795— genesis/options/solvers.py:795-809 | genesis/options/solvers.py:875-887 — 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) genesis/utils/geom.py:2200— genesis/utils/geom.py:2200-2215 | genesis/utils/geom.py:2220-2232 — 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) genesis/engine/couplers/sap_coupler.py:7193— genesis/engine/couplers/sap_coupler.py:7193-7210 | genesis/engine/couplers/sap_coupler.py:7543-7555 — 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) genesis/engine/entities/rigid_entity/rigid_geom.py:276— genesis/engine/entities/rigid_entity/rigid_geom.py:276-288 | genesis/engine/entities/rigid_entity/rigid_link.py:499-515 — 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) genesis/utils/geom.py:1416— genesis/utils/geom.py:1416-1430 | genesis/utils/geom.py:1464-1476 — 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) genesis/engine/entities/pbd_entity.py:508— genesis/engine/entities/pbd_entity.py:508-520 | genesis/engine/entities/pbd_entity.py:573-585 — 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) genesis/ext/pyrender/renderer.py:903— genesis/ext/pyrender/renderer.py:903-915 | genesis/ext/pyrender/renderer.py:918-931 — 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.
TooManyMethods: RigidSolver genesis/engine/solvers/rigid/rigid_solver.py:201— TooManyMethods — 115 methods. The bar is 30 methods; this is 85 over it, 3.83× 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: RigidEntity genesis/engine/entities/rigid_entity/rigid_entity.py:1638— TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.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: RasterizerContext genesis/vis/rasterizer_context.py:174— TooManyMethods — 69 methods. The bar is 30 methods; this is 39 over it, 2.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.
TooManyMethods: Scene genesis/engine/scene.py:143— TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.17× 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: KinematicSolver genesis/engine/solvers/kinematic_solver.py:137— TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× 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: Viewer genesis/ext/pyrender/viewer.py:58— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× 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: KinematicEntity genesis/engine/entities/rigid_entity/rigid_entity.py:189— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× 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: Renderer genesis/ext/pyrender/renderer.py:38— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 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.
Duplicated block (11 lines × 2) genesis/engine/couplers/sap_coupler.py:6568— genesis/engine/couplers/sap_coupler.py:6568-6579 | genesis/engine/couplers/sap_coupler.py:7460-7470 — 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 (11 lines × 2) genesis/engine/couplers/sap_coupler.py:6569— genesis/engine/couplers/sap_coupler.py:6569-6580 | genesis/engine/couplers/sap_coupler.py:6899-6909 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/couplers/sap_coupler.py:6910` calls `u64` and `genesis/engine/couplers/sap_coupler.py:6581` 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) REDACTED:450— REDACTED:450-460 | REDACTED:537-547 — 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 (11 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:1208— genesis/engine/sensors/point_cloud_tactile.py:1208-1218 | genesis/engine/sensors/point_cloud_tactile.py:1454-1464 — 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 `genesis/engine/sensors/point_cloud_tactile.py:1208` 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) genesis/engine/solvers/rigid/constraint/backward.py:970— genesis/engine/solvers/rigid/constraint/backward.py:970-980 | genesis/engine/solvers/rigid/constraint/backward.py:1175-1185 — 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 before the matched lines, `genesis/engine/solvers/rigid/constraint/backward.py:1171` calls `Vector` and `genesis/engine/solvers/rigid/constraint/backward.py:968` 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) genesis/engine/solvers/rigid/constraint/solver.py:4099— genesis/engine/solvers/rigid/constraint/solver.py:4099-4109 | genesis/engine/solvers/rigid/constraint/solver.py:4174-4184 — 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) genesis/ext/pyrender/overlay/plugin.py:1125— genesis/ext/pyrender/overlay/plugin.py:1125-1135 | genesis/ext/pyrender/overlay/plugin.py:1215-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.
Duplicated block (11 lines × 2) examples/rigid/apply_external_wrench.py:16— examples/rigid/apply_external_wrench.py:16-26 | examples/rigid/diffik_controller.py:24-34 — 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 `examples/rigid/apply_external_wrench.py:16` 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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×7
Members sharing a duplicated core (4 members, 50+ identical tokens) genesis/engine/couplers/sap_coupler.py:6438— genesis/engine/couplers/sap_coupler.py:6438-6595 | genesis/engine/couplers/sap_coupler.py:6873-6915 | genesis/engine/couplers/sap_coupler.py:6989-7124 | genesis/engine/couplers/sap_coupler.py:7323-7484 — 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) genesis/engine/entities/rigid_entity/rigid_entity.py:2616— genesis/engine/entities/rigid_entity/rigid_entity.py:2616-2634 | genesis/engine/entities/rigid_entity/rigid_entity.py:2638-2656 | genesis/engine/entities/rigid_entity/rigid_entity.py:2660-2679 | genesis/engine/entities/rigid_entity/rigid_entity.py:2683-2703 — 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) genesis/engine/sensors/camera.py:101— genesis/engine/sensors/camera.py:101-114 | genesis/engine/sensors/camera.py:283-305 | genesis/engine/sensors/camera.py:518-535 | genesis/engine/sensors/camera.py:583-665 — 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) genesis/engine/sensors/kinematic_tactile.py:323— genesis/engine/sensors/kinematic_tactile.py:323-428 | genesis/engine/sensors/kinematic_tactile.py:450-496 | genesis/engine/sensors/kinematic_tactile.py:555-594 | genesis/engine/sensors/kinematic_tactile.py:622-701 — 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) genesis/engine/solvers/rigid/abd/forward_kinematics.py:85— genesis/engine/solvers/rigid/abd/forward_kinematics.py:85-102 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:142-148 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:178-184 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1301-1309 — 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) genesis/engine/solvers/rigid/collider/epa.py:443— genesis/engine/solvers/rigid/collider/epa.py:443-570 | genesis/engine/solvers/rigid/collider/epa.py:590-716 | genesis/engine/solvers/rigid/collider/epa.py:721-799 | genesis/engine/solvers/rigid/collider/epa.py:1267-1309 — 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) genesis/utils/mesh.py:1258— genesis/utils/mesh.py:1258-1263 | genesis/utils/mesh.py:1279-1284 | genesis/utils/mesh.py:1300-1305 | genesis/utils/mesh.py:1366-1371 — 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.
Repeated repair: genesis/utils/simt.py genesis/utils/simt.py:151— genesis/utils/simt.py 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 9 (its worst body is simt.qd_lane_local_set at line 151), 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: “[BREAKING][BUG FIX] Fix SPH liquids seeping into rigid bodies and pushing on them with the wrong force. (#3778)”; “[BUG FIX] Add support for deterministic mode to coupling rigid vs SPH or MPM. (#3776)”; “[BUG FIX] Fix rigid simulation crashing or hanging on AMD RDNA4 GPUs. (#3580)”; “[BUG FIX] Fix the incremental Hessian update of the rigid constraint solver on AMDGPU. (#3537)”. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/utils/simt.py`: 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: genesis/vis/viewer.py genesis/vis/viewer.py:79— genesis/vis/viewer.py 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 15 (its worst body is Viewer.build at line 79), 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: “[BREAKING][BUG FIX] Fix crashes using scene objects before build or after destroy. (#3831)”; “[BUG FIX] Fix setters paced at simulation rate when the interactive viewer is open. (#3591)”; “[BUG FIX] Fix rendered views depending on the precision of the simulation. (#3571)”; “[BUG FIX] Support offscreen rendering with OSMesa. (#3302)”. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/vis/viewer.py`: 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: REDACTED REDACTED:429— REDACTED 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 15 (its worst body is cache.get_hashkey at line 429), 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: “[BUG FIX] Fix watertighten wrap resolution of meshes smaller than 10 cm. (#3826)”; “[CHANGING][BUG FIX] Fix the SDF grid of thin-walled non-convex meshes being sized from a biased wall thickness. (#3815)”; “[BUG FIX] Make the signed distance fields of meshes reproducible. (#3659)”; “[BUG FIX] Fix setters paced at simulation rate when the interactive viewer is open. (#3591)”. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- REDACTED`: 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: genesis/engine/entities/rigid_entity/inertial.py genesis/engine/entities/rigid_entity/inertial.py:194— genesis/engine/entities/rigid_entity/inertial.py changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is inertial.finalize_inertial at line 194), 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: “[BUG FIX] Fix dynamics of attached entities and resolve assets identically in every precision. (#3311)”; “[BUG FIX] Recover a usable inertia for URDF links stating a zero mass or inertia. (#3261)”; “[BUG FIX] Fix COM frames of fixed links on aligned bodies breaking thrust points. (#3283)”. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/entities/rigid_entity/inertial.py`: 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: genesis/engine/sensors/imu.py genesis/engine/sensors/imu.py:24— genesis/engine/sensors/imu.py changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is imu._kernel_update_imu_raw_data at line 24), 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: “[BREAKING][BUG FIX] Fix crashes using scene objects before build or after destroy. (#3831)”; “[BUG FIX] Fix setters paced at simulation rate when the interactive viewer is open. (#3591)”; “[BUG FIX] Apply scalar cross-axis coupling to IMU readings. (#3436)”. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/sensors/imu.py`: 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: genesis/engine/sensors/contact_force.py genesis/engine/sensors/contact_force.py:62— genesis/engine/sensors/contact_force.py changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is contact_force._kernel_get_contacts_forces at line 62), 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: “[BREAKING][BUG FIX] Fix crashes using scene objects before build or after destroy. (#3831)”; “[BUG FIX] Fix kernel caching of the legacy coupler, MPM, sensors and rigid queries. (#3818)”; “[BUG FIX] Fix setters paced at simulation rate when the interactive viewer is open. (#3591)”. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 23:32:13 +01:00' --until='2026-11-15 23:32:13 +01:00' --full-history --no-merges -- genesis/engine/sensors/contact_force.py`: 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.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×6
Edited copy of a member (12 corresponding lines) genesis/engine/sensors/kinematic_tactile.py:755— genesis/engine/sensors/kinematic_tactile.py:755-766 | genesis/engine/sensors/kinematic_tactile.py:993-1025 — 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) genesis/engine/solvers/rigid/rigid_solver.py:1121— genesis/engine/solvers/rigid/rigid_solver.py:1121-1132 | genesis/engine/solvers/rigid/rigid_solver.py:1272-1286 — 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) genesis/vis/rasterizer_context.py:1183— genesis/vis/rasterizer_context.py:1183-1194 | genesis/vis/rasterizer_context.py:1197-1213 — 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) REDACTED:343— REDACTED:343-354 | REDACTED:715-726 — 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) genesis/utils/sdf.py:333— genesis/utils/sdf.py:333-344 | genesis/utils/sdf.py:415-429 — 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) REDACTED:23— REDACTED:23-34 | REDACTED:38-49 — 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 (22 corresponding lines) · ×6
Edited copy of a member (22 corresponding lines) genesis/engine/entities/rigid_entity/rigid_entity.py:2015— genesis/engine/entities/rigid_entity/rigid_entity.py:2015-2057 | genesis/engine/entities/rigid_entity/rigid_link.py:519-540 — 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.
Edited copy of a member (22 corresponding lines) genesis/vis/rasterizer_context.py:896— genesis/vis/rasterizer_context.py:896-917 | genesis/vis/rasterizer_context.py:1030-1052 — 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.
Edited copy of a member (22 corresponding lines) genesis/engine/solvers/rigid/constraint/island.py:411— genesis/engine/solvers/rigid/constraint/island.py:411-432 | genesis/engine/solvers/rigid/constraint/island.py:439-461 — 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.
Edited copy of a member (22 corresponding lines) genesis/engine/sensors/point_cloud_tactile.py:1073— genesis/engine/sensors/point_cloud_tactile.py:1073-1094 | genesis/engine/sensors/point_cloud_tactile.py:1112-1144 — 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.
Edited copy of a member (22 corresponding lines) genesis/ext/pyrender/material.py:378— genesis/ext/pyrender/material.py:378-399 | genesis/ext/pyrender/material.py:587-610 — 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.
Edited copy of a member (22 corresponding lines) REDACTED:1108— REDACTED:1108-1129 | REDACTED:1216-1238 — 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 copy of a member (16 corresponding lines) · ×6
Edited copy of a member (16 corresponding lines) genesis/engine/solvers/mpm_solver.py:1385— genesis/engine/solvers/mpm_solver.py:1385-1402 | genesis/engine/solvers/mpm_solver.py:1485-1500 — 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) genesis/engine/solvers/kinematic_solver.py:1067— genesis/engine/solvers/kinematic_solver.py:1067-1082 | genesis/engine/solvers/rigid/rigid_solver.py:2420-2443 — 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) genesis/engine/solvers/rigid/collider/multi_contact.py:553— genesis/engine/solvers/rigid/collider/multi_contact.py:553-568 | genesis/engine/solvers/rigid/collider/multi_contact.py:732-757 — 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) genesis/engine/couplers/sap_coupler.py:3312— genesis/engine/couplers/sap_coupler.py:3312-3330 | genesis/engine/couplers/sap_coupler.py:6187-6202 — 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) genesis/engine/entities/fem_entity.py:218— genesis/engine/entities/fem_entity.py:218-239 | genesis/engine/entities/particle_entity.py:304-319 — 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) genesis/engine/entities/mpm_entity.py:113— genesis/engine/entities/mpm_entity.py:113-128 | genesis/engine/entities/pbd_entity.py:40-55 — 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 (7 corresponding lines) · ×6
Edited copy of a member (7 corresponding lines) genesis/engine/solvers/kinematic_solver.py:1154— genesis/engine/solvers/kinematic_solver.py:1154-1160 | genesis/engine/solvers/rigid/rigid_solver.py:2744-2750 — 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) genesis/engine/solvers/pbd_solver.py:759— genesis/engine/solvers/pbd_solver.py:759-765 | genesis/engine/solvers/sph_solver.py:774-781 — 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) REDACTED:1223— REDACTED:1223-1229 | REDACTED:1785-1794 — 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) genesis/utils/path_planning.py:345— genesis/utils/path_planning.py:345-351 | genesis/utils/path_planning.py:689-696 — 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) genesis/engine/materials/FEM/elastic.py:73— genesis/engine/materials/FEM/elastic.py:73-79 | genesis/engine/materials/FEM/elastic.py:160-170 — 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) REDACTED:506— REDACTED:506-515 | genesis/utils/usd/usd_rigid_entity.py:578-584 — 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 (16 lines × 2) genesis/engine/couplers/sap_coupler.py:5192— genesis/engine/couplers/sap_coupler.py:5192-5207 | genesis/engine/couplers/sap_coupler.py:5233-5248 — 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 (16 lines × 2) genesis/engine/solvers/rigid/collider/collider.py:1323— genesis/engine/solvers/rigid/collider/collider.py:1323-1338 | genesis/engine/solvers/rigid/collider/collider.py:1379-1394 — 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 `genesis/engine/solvers/rigid/collider/collider.py:1323` 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) genesis/ext/pyrender/material.py:378— genesis/ext/pyrender/material.py:378-393 | genesis/ext/pyrender/material.py:587-602 — 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, `genesis/ext/pyrender/material.py:604` calls `ones` and `genesis/ext/pyrender/material.py:395` 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 (16 lines × 2) genesis/engine/solvers/rigid/rigid_solver.py:2812— genesis/engine/solvers/rigid/rigid_solver.py:2812-2827 | genesis/engine/solvers/rigid/rigid_solver.py:2831-2846 — 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 (16 lines × 2) genesis/ext/isaacgym/terrain_utils.py:355— genesis/ext/isaacgym/terrain_utils.py:355-370 | REDACTED:264-279 — 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 (16 lines × 2) examples/drone/fly.py:17— examples/drone/fly.py:17-32 | examples/rigid/control_franka.py:17-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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/drone/fly.py: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.
Duplicated block (15 lines × 2) genesis/engine/couplers/legacy_coupler.py:1190— genesis/engine/couplers/legacy_coupler.py:1190-1204 | genesis/engine/couplers/legacy_coupler.py:1431-1445 — 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) genesis/engine/solvers/rigid/collider/diff_gjk.py:449— genesis/engine/solvers/rigid/collider/diff_gjk.py:449-463 | genesis/engine/solvers/rigid/collider/epa.py:1051-1065 — 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. 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 (15 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:3739— genesis/engine/solvers/rigid/collider/narrowphase.py:3739-3753 | genesis/engine/solvers/rigid/collider/narrowphase.py:3960-3974 — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:3739` 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 × 2) examples/coupling/flush_cubes.py:22— examples/coupling/flush_cubes.py:22-36 | examples/coupling/sand_wheel.py:24-38 — before extracting anything, compare `examples/coupling/flush_cubes.py` and `examples/coupling/sand_wheel.py` as WHOLE FILES: this scan already matched 5 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. 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 `examples/coupling/flush_cubes.py: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 (15 lines × 2) examples/rigid/control_franka.py:15— examples/rigid/control_franka.py:15-29 | examples/rigid/grasp_bottle.py:17-31 — before extracting anything, compare `examples/rigid/control_franka.py` and `examples/rigid/grasp_bottle.py` 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. 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 `examples/rigid/control_franka.py: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/rigid/grasp_bottle.py:11` calls `add_argument` and `examples/rigid/control_franka.py:10` 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 × 2) examples/sap_coupling/franka_grasp_fem_sphere.py:61— examples/sap_coupling/franka_grasp_fem_sphere.py:61-75 | examples/sap_coupling/franka_grasp_rigid_cube.py:55-69 — before extracting anything, compare `examples/sap_coupling/franka_grasp_fem_sphere.py` and `examples/sap_coupling/franka_grasp_rigid_cube.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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 `examples/sap_coupling/franka_grasp_fem_sphere.py:61` 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) genesis/engine/solvers/kinematic_solver.py:925— genesis/engine/solvers/kinematic_solver.py:925-938 | genesis/engine/solvers/rigid/rigid_solver.py:1809-1822 — 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 lines × 2) genesis/engine/solvers/rigid/collider/epa.py:67— genesis/engine/solvers/rigid/collider/epa.py:67-80 | genesis/engine/solvers/rigid/collider/epa.py:991-1004 — 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) REDACTED:3040— REDACTED:3040-3053 | REDACTED:3124-3137 — 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) genesis/engine/solvers/kinematic_solver.py:1002— genesis/engine/solvers/kinematic_solver.py:1002-1015 | genesis/engine/solvers/rigid/rigid_solver.py:2198-2211 — 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 lines × 2) examples/coupling/sand_wheel.py:61— examples/coupling/sand_wheel.py:61-74 | examples/coupling/sand_wheel.py:85-98 — 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 `examples/coupling/sand_wheel.py:61` 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) examples/sap_coupling/fem_fixed_constraint.py:46— examples/sap_coupling/fem_fixed_constraint.py:46-59 | examples/sap_coupling/fem_sphere_and_cube.py:50-63 — before extracting anything, compare `examples/sap_coupling/fem_fixed_constraint.py` and `examples/sap_coupling/fem_sphere_and_cube.py` as WHOLE FILES: this scan already matched 3 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 `examples/sap_coupling/fem_fixed_constraint.py:46` 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 × 3) genesis/engine/solvers/rigid/abd/forward_dynamics.py:545— genesis/engine/solvers/rigid/abd/forward_dynamics.py:545-552 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:750-757 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:905-912 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/solvers/rigid/abd/forward_dynamics.py:913` calls `SharedArray` and `genesis/engine/solvers/rigid/abd/forward_dynamics.py:555` 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 × 3) genesis/engine/solvers/rigid/abd/forward_kinematics.py:650— genesis/engine/solvers/rigid/abd/forward_kinematics.py:650-657 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:888-896 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1044-1051 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/solvers/rigid/abd/forward_kinematics.py:1040` calls `template` and `genesis/engine/solvers/rigid/abd/forward_kinematics.py:646` 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 × 3) genesis/engine/solvers/rigid/constraint/solver.py:2630— genesis/engine/solvers/rigid/constraint/solver.py:2630-2637 | genesis/engine/solvers/rigid/constraint/solver.py:2698-2705 | genesis/engine/solvers/rigid/constraint/solver.py:2835-2842 — 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 (8 lines × 3) genesis/engine/solvers/rigid/constraint/solver.py:5114— genesis/engine/solvers/rigid/constraint/solver.py:5114-5121 | genesis/engine/solvers/rigid/constraint/solver.py:5182-5189 | genesis/engine/solvers/rigid/constraint/solver.py:5227-5234 — 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 (8 lines × 3) genesis/engine/solvers/rigid/constraint/solver.py:4094— genesis/engine/solvers/rigid/constraint/solver.py:4094-4101 | genesis/engine/solvers/rigid/constraint/solver.py:4169-4176 | genesis/engine/solvers/rigid/constraint/solver.py:4607-4614 — 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 (8 lines × 3) genesis/utils/watertighten.py:101— genesis/utils/watertighten.py:101-108 | genesis/utils/watertighten.py:110-117 | genesis/utils/watertighten.py:119-126 — 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.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×5
Edited copy of a member (9 corresponding lines) genesis/engine/solvers/rigid/abd/misc.py:822— genesis/engine/solvers/rigid/abd/misc.py:822-838 | genesis/engine/solvers/rigid/abd/misc.py:853-862 — 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) genesis/utils/geom.py:1153— genesis/utils/geom.py:1153-1162 | genesis/utils/geom.py:1305-1313 — 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) genesis/engine/solvers/rigid/abd/forward_kinematics.py:534— genesis/engine/solvers/rigid/abd/forward_kinematics.py:534-544 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:650-658 — 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) genesis/engine/solvers/rigid/constraint/solver.py:5141— genesis/engine/solvers/rigid/constraint/solver.py:5141-5149 | genesis/engine/solvers/rigid/constraint/solver.py:5347-5357 — 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) genesis/engine/entities/rigid_entity/rigid_equality.py:17— genesis/engine/entities/rigid_entity/rigid_equality.py:17-25 | genesis/engine/entities/rigid_entity/rigid_joint.py:20-28 — 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.
Duplicated block (7 lines × 3) genesis/engine/solvers/rigid/constraint/solver.py:2092— genesis/engine/solvers/rigid/constraint/solver.py:2092-2098 | genesis/engine/solvers/rigid/constraint/solver.py:5327-5333 | genesis/engine/solvers/rigid/constraint/solver.py:5573-5579 — 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 `genesis/engine/solvers/rigid/constraint/solver.py:2092` 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) genesis/engine/solvers/rigid/constraint/solver.py:3254— genesis/engine/solvers/rigid/constraint/solver.py:3254-3260 | genesis/engine/solvers/rigid/constraint/solver.py:3308-3315 | genesis/engine/solvers/rigid/constraint/solver.py:3385-3391 — 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 `genesis/engine/solvers/rigid/constraint/solver.py:3254` 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 × 3) genesis/engine/solvers/rigid/collider/narrowphase.py:2807— genesis/engine/solvers/rigid/collider/narrowphase.py:2807-2813 | genesis/engine/solvers/rigid/collider/narrowphase.py:3478-3484 | genesis/engine/solvers/rigid/collider/narrowphase.py:4285-4291 — 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 (7 lines × 3) examples/collision/pyramid.py:24— examples/collision/pyramid.py:24-30 | examples/sap_coupling/franka_grasp_fem_sphere.py:14-21 | examples/sap_coupling/franka_grasp_rigid_cube.py:13-20 — before extracting anything, compare `examples/sap_coupling/franka_grasp_fem_sphere.py` and `examples/sap_coupling/franka_grasp_rigid_cube.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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 `examples/collision/pyramid.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 (7 lines × 3) examples/sensors/lidar_teleop.py:150— examples/sensors/lidar_teleop.py:150-156 | examples/sensors/surface_distance_shadowhand.py:138-144 | examples/sensors/temperature_grid.py:200-206 — 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 `examples/sensors/lidar_teleop.py:150` 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, `examples/sensors/temperature_grid.py:209` calls `Keybind` and `examples/sensors/surface_distance_shadowhand.py:147` 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.
Low cohesion: RigidEntity (LCOM4 58) genesis/engine/entities/rigid_entity/rigid_entity.py:1638— RigidEntity's methods fall into 58 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 58 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: RigidSolver (LCOM4 35) genesis/engine/solvers/rigid/rigid_solver.py:201— RigidSolver's methods fall into 35 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 35 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: KinematicSolver (LCOM4 14) genesis/engine/solvers/kinematic_solver.py:137— KinematicSolver's methods fall into 14 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 14 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: Solver (LCOM4 6) genesis/engine/solvers/base_solver.py:548— Solver's methods fall into 6 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 6 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: UsdContext (LCOM4 5) genesis/utils/usd/usd_context.py:98— UsdContext'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.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×4
Edited copy of a member (19 corresponding lines) genesis/utils/raycast_qd.py:452— genesis/utils/raycast_qd.py:452-474 | genesis/utils/raycast_qd.py:487-505 — 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) genesis/engine/solvers/rigid/abd/accessor.py:871— genesis/engine/solvers/rigid/abd/accessor.py:871-889 | genesis/engine/solvers/rigid/abd/accessor.py:903-921 — 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) genesis/utils/simt.py:123— genesis/utils/simt.py:123-147 | genesis/utils/simt.py:174-192 — 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) genesis/engine/sensors/camera.py:673— genesis/engine/sensors/camera.py:673-691 | genesis/engine/sensors/camera.py:825-845 — 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 copy of a member (18 corresponding lines) · ×4
Edited copy of a member (18 corresponding lines) genesis/engine/entities/rigid_entity/rigid_entity.py:1260— genesis/engine/entities/rigid_entity/rigid_entity.py:1260-1279 | genesis/engine/entities/rigid_entity/rigid_geom.py:710-727 — 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) genesis/engine/force_fields.py:103— genesis/engine/force_fields.py:103-120 | genesis/engine/force_fields.py:297-319 — 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) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1225— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1225-1253 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1264-1281 — 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) genesis/engine/solvers/fem_solver.py:853— genesis/engine/solvers/fem_solver.py:853-871 | genesis/engine/solvers/mpm_solver.py:493-510 — 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 (10 corresponding lines) · ×4
Edited copy of a member (10 corresponding lines) genesis/engine/solvers/rigid/abd/forward_dynamics.py:45— genesis/engine/solvers/rigid/abd/forward_dynamics.py:45-54 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:59-68 — 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) genesis/engine/solvers/rigid/collider/contact.py:350— genesis/engine/solvers/rigid/collider/contact.py:350-359 | genesis/engine/solvers/rigid/collider/contact.py:373-382 — 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) genesis/engine/entities/mpm_entity.py:150— genesis/engine/entities/mpm_entity.py:150-159 | genesis/engine/entities/particle_entity.py:393-407 — 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) genesis/engine/entities/mpm_entity.py:207— genesis/engine/entities/mpm_entity.py:207-216 | genesis/engine/entities/particle_entity.py:457-471 — 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 (8 corresponding lines) · ×4
Edited copy of a member (8 corresponding lines) genesis/engine/solvers/base_solver.py:915— genesis/engine/solvers/base_solver.py:915-926 | genesis/engine/solvers/particle_solver.py:301-308 — 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) genesis/utils/mesh.py:1267— genesis/utils/mesh.py:1267-1274 | genesis/utils/mesh.py:1288-1295 — 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) genesis/engine/solvers/base_solver.py:967— genesis/engine/solvers/base_solver.py:967-975 | genesis/engine/solvers/base_solver.py:980-987 — 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) genesis/engine/solvers/kinematic_solver.py:1273— genesis/engine/solvers/kinematic_solver.py:1273-1280 | genesis/engine/solvers/rigid/rigid_solver.py:2698-2705 — 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.
D4 · Code Duplication· Edited copy of a member (2 corresponding lines) · ×4
Edited copy of a member (2 corresponding lines) genesis/engine/solvers/kinematic_solver.py:1146— genesis/engine/solvers/kinematic_solver.py:1146-1147 | genesis/engine/solvers/rigid/rigid_solver.py:2694-2695 — 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.
Edited copy of a member (2 corresponding lines) genesis/engine/solvers/kinematic_solver.py:1150— genesis/engine/solvers/kinematic_solver.py:1150-1151 | genesis/engine/solvers/rigid/rigid_solver.py:2740-2741 — 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.
Edited copy of a member (2 corresponding lines) genesis/engine/solvers/fem_solver.py:1107— genesis/engine/solvers/fem_solver.py:1107-1109 | genesis/engine/solvers/kinematic_solver.py:1215-1216 — 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.
Edited copy of a member (2 corresponding lines) genesis/engine/entities/mpm_entity.py:131— genesis/engine/entities/mpm_entity.py:131-132 | genesis/engine/entities/particle_entity.py:342-356 — 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.
Duplicated block (20 lines × 2) genesis/engine/solvers/rigid/collider/gjk.py:1619— genesis/engine/solvers/rigid/collider/gjk.py:1619-1638 | genesis/engine/solvers/rigid/collider/gjk_support.py:151-170 — 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 `genesis/engine/solvers/rigid/collider/gjk.py:1619` 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 (20 lines × 2) genesis/utils/path_planning.py:389— genesis/utils/path_planning.py:389-408 | genesis/utils/path_planning.py:738-757 — 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) genesis/engine/solvers/fem_solver.py:1124— genesis/engine/solvers/fem_solver.py:1124-1143 | genesis/engine/solvers/mpm_solver.py:636-655 — 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 (20 lines × 2) examples/sap_coupling/franka_grasp_fem_sphere.py:8— examples/sap_coupling/franka_grasp_fem_sphere.py:8-27 | examples/sap_coupling/franka_grasp_rigid_cube.py:7-26 — before extracting anything, compare `examples/sap_coupling/franka_grasp_fem_sphere.py` and `examples/sap_coupling/franka_grasp_rigid_cube.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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 `examples/sap_coupling/franka_grasp_fem_sphere.py: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, `examples/sap_coupling/franka_grasp_fem_sphere.py:28` calls `FEMOptions` and `examples/sap_coupling/franka_grasp_rigid_cube.py:27` 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) genesis/ext/pyrender/jit_render.py:1400— genesis/ext/pyrender/jit_render.py:1400-1417 | genesis/ext/pyrender/jit_render.py:1425-1442 — 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 `genesis/ext/pyrender/jit_render.py:1400` 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) genesis/utils/path_planning.py:477— genesis/utils/path_planning.py:477-494 | genesis/utils/path_planning.py:844-861 — 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 (18 lines × 2) genesis/utils/path_planning.py:417— genesis/utils/path_planning.py:417-434 | genesis/utils/path_planning.py:779-796 — 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 (18 lines × 2) genesis/utils/path_planning.py:531— genesis/utils/path_planning.py:531-548 | genesis/utils/path_planning.py:913-930 — 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 (13–14 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:547— genesis/engine/solvers/rigid/abd/forward_dynamics.py:547-560 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:752-764 — 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 (13–14 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1044— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1044-1057 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1103-1115 — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:1044` 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) genesis/engine/solvers/rigid/collider/narrowphase.py:3240— genesis/engine/solvers/rigid/collider/narrowphase.py:3240-3252 | genesis/engine/solvers/rigid/collider/narrowphase.py:3838-3851 — 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 (13–14 lines × 2) genesis/engine/solvers/rigid/abd/forward_kinematics.py:934— genesis/engine/solvers/rigid/abd/forward_kinematics.py:934-946 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1247-1260 — 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 `genesis/engine/solvers/rigid/abd/forward_kinematics.py: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.
Duplicated block (10–11 lines × 2) genesis/engine/solvers/rigid/collider/epa.py:128— genesis/engine/solvers/rigid/collider/epa.py:128-138 | genesis/engine/solvers/rigid/collider/epa.py:1059-1068 — 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 `genesis/engine/solvers/rigid/collider/epa.py: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. 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 (10–11 lines × 2) genesis/engine/solvers/rigid/collider/mpr.py:108— genesis/engine/solvers/rigid/collider/mpr.py:108-117 | genesis/engine/solvers/rigid/collider/utils.py:24-34 — 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–11 lines × 2) genesis/engine/solvers/rigid/constraint/backward.py:546— genesis/engine/solvers/rigid/constraint/backward.py:546-555 | genesis/engine/solvers/rigid/constraint/solver.py:1077-1087 — 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–11 lines × 2) genesis/engine/solvers/rigid/constraint/island.py:284— genesis/engine/solvers/rigid/constraint/island.py:284-294 | genesis/engine/solvers/rigid/constraint/island.py:501-510 — 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 (6 lines × 3) genesis/engine/solvers/rigid/abd/accessor.py:284— genesis/engine/solvers/rigid/abd/accessor.py:284-290 | genesis/engine/solvers/rigid/abd/accessor.py:330-335 | genesis/engine/solvers/rigid/abd/accessor.py:373-378 — 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 `genesis/engine/solvers/rigid/abd/accessor.py:284` 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) genesis/utils/geom.py:1064— genesis/utils/geom.py:1064-1069 | genesis/utils/geom.py:1175-1180 | genesis/utils/geom.py:1250-1256 — 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 (6 lines × 3) genesis/engine/solvers/rigid/abd/accessor.py:74— genesis/engine/solvers/rigid/abd/accessor.py:74-79 | genesis/engine/solvers/rigid/abd/accessor.py:181-186 | genesis/engine/solvers/rigid/abd/accessor.py:257-262 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/solvers/rigid/abd/accessor.py:188` calls `static` and `genesis/engine/solvers/rigid/abd/accessor.py:80` 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 × 3) genesis/engine/solvers/rigid/collider/epa.py:232— genesis/engine/solvers/rigid/collider/epa.py:232-237 | genesis/engine/solvers/rigid/collider/epa.py:1159-1164 | genesis/engine/solvers/rigid/collider/epa.py:1213-1218 — 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 lines × 3) examples/coupling/cloth_attached_to_rigid.py:36— examples/coupling/cloth_attached_to_rigid.py:36-46 | examples/coupling/cloth_on_rigid.py:22-32 | examples/coupling/water_wheel.py:34-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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples/coupling/cloth_attached_to_rigid.py: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 (11 lines × 3) examples/coupling/cut_dragon.py:9— examples/coupling/cut_dragon.py:9-19 | examples/coupling/flush_cubes.py:10-20 | examples/coupling/sand_wheel.py:12-22 — before extracting anything, compare `examples/coupling/cut_dragon.py` and `examples/coupling/flush_cubes.py` as WHOLE FILES: this scan already matched 4 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. 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 `examples/coupling/cut_dragon.py: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 (11 lines × 3) examples/rendering/demo.py:82— examples/rendering/demo.py:82-92 | examples/rendering/demo.py:94-104 | examples/rendering/demo.py:106-116 — 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 `examples/rendering/demo.py:82` 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 × 3) examples/rendering/moving_camera.py:10— examples/rendering/moving_camera.py:10-20 | examples/rigid/closed_loop.py:24-34 | examples/usd/import_stage.py:50-60 — before extracting anything, compare `examples/rendering/moving_camera.py` and `examples/rigid/closed_loop.py` 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. 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 `examples/rendering/moving_camera.py:10` 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, `examples/usd/import_stage.py:49` calls `add_argument` and `examples/rigid/closed_loop.py:23` 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.
Near-duplicate member pair (62 shared lines) genesis/engine/solvers/rigid/collider/diff_gjk.py:382— genesis/engine/solvers/rigid/collider/diff_gjk.py:382-571 | genesis/engine/solvers/rigid/collider/epa.py:967-1202 — 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 (62 shared lines) genesis/utils/path_planning.py:389— genesis/utils/path_planning.py:389-464 | genesis/utils/path_planning.py:738-829 — 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 (62 shared lines) examples/sap_coupling/franka_grasp_fem_sphere.py:8— examples/sap_coupling/franka_grasp_fem_sphere.py:8-89 | examples/sap_coupling/franka_grasp_rigid_cube.py:7-83 — 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.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×3
Edited copy of a member (14 corresponding lines) genesis/engine/entities/rigid_entity/rigid_entity.py:782— genesis/engine/entities/rigid_entity/rigid_entity.py:782-814 | genesis/engine/entities/rigid_entity/rigid_link.py:178-199 — 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) genesis/engine/solvers/rigid/abd/forward_dynamics.py:665— genesis/engine/solvers/rigid/abd/forward_dynamics.py:665-701 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:714-727 — 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) genesis/utils/path_planning.py:1102— genesis/utils/path_planning.py:1102-1115 | genesis/utils/path_planning.py:1119-1132 — 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.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×3
Edited copy of a member (15 corresponding lines) genesis/utils/path_planning.py:362— genesis/utils/path_planning.py:362-377 | genesis/utils/path_planning.py:708-724 — 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) genesis/utils/path_planning.py:327— genesis/utils/path_planning.py:327-342 | genesis/utils/path_planning.py:672-686 — 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) genesis/engine/solvers/particle_solver.py:360— genesis/engine/solvers/particle_solver.py:360-377 | genesis/engine/solvers/particle_solver.py:393-407 — 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 (36 corresponding lines) · ×3
Edited copy of a member (36 corresponding lines) genesis/engine/solvers/rigid/constraint/solver.py:5257— genesis/engine/solvers/rigid/constraint/solver.py:5257-5299 | genesis/engine/solvers/rigid/constraint/solver_breakdown.py:24-59 — These two members are one piece of code written twice and then edited apart: 36 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 (36 corresponding lines) genesis/vis/rasterizer_context.py:760— genesis/vis/rasterizer_context.py:760-795 | genesis/vis/rasterizer_context.py:843-878 — These two members are one piece of code written twice and then edited apart: 36 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 (36 corresponding lines) REDACTED:3216— REDACTED:3216-3252 | REDACTED:3255-3290 — These two members are one piece of code written twice and then edited apart: 36 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) genesis/engine/solvers/rigid/collider/contact.py:393— genesis/engine/solvers/rigid/collider/contact.py:393-424 | genesis/engine/solvers/rigid/constraint/solver.py:595-633 — 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) genesis/engine/solvers/rigid/constraint/linesearch.py:671— genesis/engine/solvers/rigid/constraint/linesearch.py:671-703 | genesis/engine/solvers/rigid/constraint/linesearch.py:720-751 — 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) genesis/engine/entities/rigid_entity/rigid_entity.py:581— genesis/engine/entities/rigid_entity/rigid_entity.py:581-612 | genesis/engine/entities/rigid_entity/rigid_entity.py:615-646 — 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 copy of a member (11 corresponding lines) · ×3
Edited copy of a member (11 corresponding lines) genesis/engine/couplers/sap_coupler.py:6627— genesis/engine/couplers/sap_coupler.py:6627-6637 | genesis/engine/couplers/sap_coupler.py:6685-6698 — 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) genesis/recorders/plotters.py:264— genesis/recorders/plotters.py:264-274 | genesis/recorders/plotters.py:434-451 — 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) REDACTED:2953— REDACTED:2953-2969 | REDACTED:2973-2983 — 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.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×3
Edited copy of a member (3 corresponding lines) genesis/engine/solvers/rigid/abd/accessor.py:692— genesis/engine/solvers/rigid/abd/accessor.py:692-694 | genesis/engine/solvers/rigid/abd/accessor.py:701-703 — 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) genesis/utils/geom.py:1145— genesis/utils/geom.py:1145-1147 | genesis/utils/geom.py:1458-1460 — 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) genesis/engine/solvers/fem_solver.py:1102— genesis/engine/solvers/fem_solver.py:1102-1104 | genesis/engine/solvers/kinematic_solver.py:1219-1221 — 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.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×3
Edited copy of a member (5 corresponding lines) genesis/engine/solvers/kinematic_solver.py:1163— genesis/engine/solvers/kinematic_solver.py:1163-1167 | genesis/engine/solvers/rigid/rigid_solver.py:2753-2757 — 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) genesis/engine/solvers/rigid/abd/forward_kinematics.py:954— genesis/engine/solvers/rigid/abd/forward_kinematics.py:954-960 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:995-999 — 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) genesis/ext/pyrender/primitive.py:171— genesis/ext/pyrender/primitive.py:171-177 | genesis/ext/pyrender/primitive.py:186-190 — 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 (24 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1172— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1172-1195 | genesis/engine/solvers/rigid/constraint/noslip.py:24-47 — 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. 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 (24 lines × 2) genesis/engine/solvers/rigid/collider/box_contact.py:520— genesis/engine/solvers/rigid/collider/box_contact.py:520-543 | genesis/engine/solvers/rigid/collider/box_contact.py:801-824 — 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 (24 lines × 2) genesis/utils/path_planning.py:441— genesis/utils/path_planning.py:441-464 | genesis/utils/path_planning.py:806-829 — 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 (22 lines × 2) genesis/engine/solvers/rigid/collider/contact.py:1322— genesis/engine/solvers/rigid/collider/contact.py:1322-1365 | genesis/engine/solvers/rigid/collider/contact.py:1564-1585 — 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 before the matched lines, `genesis/engine/solvers/rigid/collider/contact.py:1318` calls `template` and `genesis/engine/solvers/rigid/collider/contact.py:1561` 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 lines × 2) REDACTED:3017— REDACTED:3017-3038 | REDACTED:3101-3122 — 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 (22 lines × 2) examples/sap_coupling/franka_grasp_fem_sphere.py:30— examples/sap_coupling/franka_grasp_fem_sphere.py:30-51 | examples/sap_coupling/franka_grasp_rigid_cube.py:26-47 — before extracting anything, compare `examples/sap_coupling/franka_grasp_fem_sphere.py` and `examples/sap_coupling/franka_grasp_rigid_cube.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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 `examples/sap_coupling/franka_grasp_fem_sphere.py: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 (21 lines × 2) genesis/engine/entities/emitter.py:151— genesis/engine/entities/emitter.py:151-171 | genesis/engine/entities/emitter.py:217-237 — 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 (21 lines × 2) examples/rigid/single_franka.py:17— examples/rigid/single_franka.py:17-37 | examples/rigid/single_franka_envs.py:28-48 — 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 `examples/rigid/single_franka.py: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.
Duplicated block (21 lines × 2) examples/rigid/terrain_height_field.py:13— examples/rigid/terrain_height_field.py:13-33 | examples/rigid/terrain_subterrain.py:12-32 — before extracting anything, compare `examples/rigid/terrain_height_field.py` and `examples/rigid/terrain_subterrain.py` as WHOLE FILES: this scan already matched 4 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/rigid/terrain_height_field.py:34` calls `zeros`, `arange`, `choice` and `examples/rigid/terrain_subterrain.py:33` 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 (19 lines × 2) genesis/ext/pyrender/jit_render.py:978— genesis/ext/pyrender/jit_render.py:978-996 | genesis/ext/pyrender/jit_render.py:1115-1133 — 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 `genesis/ext/pyrender/jit_render.py:978` 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) genesis/ext/pyrender/jit_render.py:999— genesis/ext/pyrender/jit_render.py:999-1017 | genesis/ext/pyrender/jit_render.py:1136-1154 — 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 `genesis/ext/pyrender/jit_render.py:999` 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. 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 (19 lines × 2) examples/kinematic/go2_kinematic.py:54— examples/kinematic/go2_kinematic.py:54-73 | examples/sensors/depth_camera_custom_vverts.py:137-155 — 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 lines × 3) genesis/engine/solvers/rigid/constraint/backward.py:1003— genesis/engine/solvers/rigid/constraint/backward.py:1003-1015 | genesis/engine/solvers/rigid/constraint/backward.py:1201-1213 | genesis/engine/solvers/rigid/constraint/solver.py:1901-1913 — 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 (13 lines × 3) examples/drone/fly.py:17— examples/drone/fly.py:17-29 | examples/rigid/control_franka.py:17-29 | examples/rigid/grasp_bottle.py:19-31 — before extracting anything, compare `examples/rigid/control_franka.py` and `examples/rigid/grasp_bottle.py` 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. 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 `examples/drone/fly.py: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.
Duplicated block (13 lines × 3) examples/rigid/ik_custom_chain.py:15— examples/rigid/ik_custom_chain.py:15-27 | examples/rigid/ik_shadow_hand.py:15-27 | examples/rigid/nonconvex_mesh.py:14-26 — before extracting anything, compare `examples/rigid/ik_custom_chain.py` and `examples/rigid/ik_shadow_hand.py` 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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/ik_custom_chain.py: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 (11–13 lines × 2) REDACTED:793— REDACTED:793-805 | REDACTED:2031-2041 — 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 `REDACTED:793` 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–13 lines × 2) genesis/engine/solvers/rigid/collider/diff_gjk.py:559— genesis/engine/solvers/rigid/collider/diff_gjk.py:559-569 | genesis/engine/solvers/rigid/collider/epa.py:1190-1202 — 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. 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 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–13 lines × 2) examples/sap_coupling/fem_fixed_constraint.py:30— examples/sap_coupling/fem_fixed_constraint.py:30-42 | examples/sap_coupling/fem_sphere_and_cube.py:22-32 — before extracting anything, compare `examples/sap_coupling/fem_fixed_constraint.py` and `examples/sap_coupling/fem_sphere_and_cube.py` as WHOLE FILES: this scan already matched 3 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 `examples/sap_coupling/fem_fixed_constraint.py: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 (10–13 lines × 2) genesis/engine/solvers/kinematic_solver.py:954— genesis/engine/solvers/kinematic_solver.py:954-963 | genesis/engine/solvers/rigid/rigid_solver.py:1884-1896 — 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, `genesis/engine/solvers/rigid/rigid_solver.py:1882` calls `reset` and `genesis/engine/solvers/kinematic_solver.py:953` 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–13 lines × 2) genesis/engine/solvers/rigid/constraint/backward.py:640— genesis/engine/solvers/rigid/constraint/backward.py:640-649 | genesis/engine/solvers/rigid/constraint/solver.py:2174-2186 — 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–13 lines × 2) examples/coupling/cloth_attached_to_rigid.py:37— examples/coupling/cloth_attached_to_rigid.py:37-46 | examples/coupling/cloth_on_rigid.py:23-35 — 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 `examples/coupling/cloth_attached_to_rigid.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. 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) genesis/engine/solvers/rigid/collider/box_contact.py:444— genesis/engine/solvers/rigid/collider/box_contact.py:444-452 | genesis/engine/solvers/rigid/collider/box_contact.py:715-724 — 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–10 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:679— genesis/engine/solvers/rigid/constraint/solver.py:679-688 | genesis/engine/solvers/rigid/constraint/solver.py:706-714 — 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–10 lines × 2) genesis/utils/path_planning.py:362— genesis/utils/path_planning.py:362-371 | genesis/utils/path_planning.py:708-716 — 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 × 4) genesis/engine/solvers/pbd_solver.py:841— genesis/engine/solvers/pbd_solver.py:841-845 | genesis/engine/solvers/pbd_solver.py:905-909 | genesis/engine/solvers/pbd_solver.py:939-943 | genesis/engine/solvers/pbd_solver.py:975-979 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/solvers/pbd_solver.py:902` calls `qd_float` and `genesis/engine/solvers/pbd_solver.py:973` 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 × 4) genesis/engine/solvers/rigid/abd/forward_kinematics.py:86— genesis/engine/solvers/rigid/abd/forward_kinematics.py:86-90 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:143-147 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:179-183 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1302-1306 — 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.
Duplicated block (5 lines × 4) genesis/utils/mesh.py:1259— genesis/utils/mesh.py:1259-1263 | genesis/utils/mesh.py:1280-1284 | genesis/utils/mesh.py:1301-1305 | genesis/utils/mesh.py:1367-1371 — 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. 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.
Swallowed exception (caught, then discarded) genesis/repr_base.py:81— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) genesis/utils/misc.py:790— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) genesis/ext/pyrender/overlay/plugin.py:239— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
AC3 · Page structure· Page without a main landmark · ×2
Page without a main landmark genesis/assets/urdf/3763/tree_hier.html:1— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark genesis/assets/urdf/3763/tree_hier_after_merging.html:1— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC3 · Page structure· Data table has no header cells · ×2
Data table has no header cells genesis/assets/urdf/3763/tree_hier.html:2— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells genesis/assets/urdf/3763/tree_hier_after_merging.html:2— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×2
Edited copy of a member (33 corresponding lines) genesis/utils/tools.py:78— genesis/utils/tools.py:78-110 | genesis/utils/tools.py:113-146 — 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.
Edited copy of a member (33 corresponding lines) genesis/ext/pyrender/renderer.py:231— genesis/ext/pyrender/renderer.py:231-291 | genesis/ext/pyrender/renderer.py:294-326 — 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 copy of a member (24 corresponding lines) · ×2
Edited copy of a member (24 corresponding lines) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1155— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1155-1195 | genesis/engine/solvers/rigid/constraint/noslip.py:12-47 — 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) genesis/engine/couplers/sap_coupler.py:1981— genesis/engine/couplers/sap_coupler.py:1981-2004 | genesis/engine/couplers/sap_coupler.py:2036-2064 — 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· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (5 members, 50+ identical tokens) genesis/engine/solvers/rigid/abd/forward_kinematics.py:356— genesis/engine/solvers/rigid/abd/forward_kinematics.py:356-394 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:908-947 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1206-1270 | genesis/engine/solvers/rigid/abd/manual_bw.py:237-261 | genesis/engine/solvers/rigid/abd/manual_bw.py:411-430 — 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) genesis/engine/solvers/rigid/constraint/backward.py:422— genesis/engine/solvers/rigid/constraint/backward.py:422-609 | genesis/engine/solvers/rigid/constraint/backward.py:758-1443 | genesis/engine/solvers/rigid/constraint/solver.py:797-955 | genesis/engine/solvers/rigid/constraint/solver.py:1012-1176 | genesis/engine/solvers/rigid/constraint/solver.py:1885-1937 — 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 (53 corresponding lines) · ×2
Edited copy of a member (53 corresponding lines) genesis/engine/solvers/rigid/abd/forward_dynamics.py:370— genesis/engine/solvers/rigid/abd/forward_dynamics.py:370-428 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:441-493 — These two members are one piece of code written twice and then edited apart: 53 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 (53 corresponding lines) examples/rigid/rolling_coast.py:47— examples/rigid/rolling_coast.py:47-101 | examples/rigid/torsional_grasp.py:48-100 — These two members are one piece of code written twice and then edited apart: 53 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 (29 corresponding lines) · ×2
Edited copy of a member (29 corresponding lines) genesis/engine/solvers/fem_solver.py:1760— genesis/engine/solvers/fem_solver.py:1760-1788 | genesis/engine/solvers/mpm_solver.py:1691-1723 — These two members are one piece of code written twice and then edited apart: 29 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 (29 corresponding lines) genesis/engine/solvers/kinematic_solver.py:1002— genesis/engine/solvers/kinematic_solver.py:1002-1030 | genesis/engine/solvers/kinematic_solver.py:1034-1063 — These two members are one piece of code written twice and then edited apart: 29 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, 9+ corresponding lines) · ×2
Edited copies of one member (3 members, 9+ corresponding lines) genesis/engine/solvers/rigid/abd/accessor.py:557— genesis/engine/solvers/rigid/abd/accessor.py:557-567 | genesis/engine/solvers/rigid/abd/accessor.py:579-589 | genesis/engine/solvers/rigid/abd/accessor.py:673-681 — 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) genesis/options/surfaces.py:508— genesis/options/surfaces.py:508-516 | genesis/options/surfaces.py:598-606 | genesis/options/surfaces.py:695-704 — 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 copy of a member (21 corresponding lines) · ×2
Edited copy of a member (21 corresponding lines) genesis/engine/solvers/fem_solver.py:1382— genesis/engine/solvers/fem_solver.py:1382-1408 | genesis/engine/solvers/fem_solver.py:1422-1442 — 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) genesis/utils/sdf.py:185— genesis/utils/sdf.py:185-205 | genesis/utils/sdf.py:568-592 — 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 (27 corresponding lines) · ×2
Edited copy of a member (27 corresponding lines) genesis/engine/solvers/rigid/collider/collider.py:1323— genesis/engine/solvers/rigid/collider/collider.py:1323-1349 | genesis/engine/solvers/rigid/collider/collider.py:1379-1405 — 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.
Edited copy of a member (27 corresponding lines) REDACTED:403— REDACTED:403-429 | REDACTED:484-510 — 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, 4+ corresponding lines) · ×2
Edited copies of one member (4 members, 4+ corresponding lines) genesis/engine/solvers/rigid/abd/accessor.py:780— genesis/engine/solvers/rigid/abd/accessor.py:780-783 | genesis/engine/solvers/rigid/abd/accessor.py:794-800 | genesis/engine/solvers/rigid/abd/accessor.py:811-818 | genesis/engine/solvers/rigid/abd/accessor.py:830-837 — 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.
Edited copies of one member (4 members, 4+ corresponding lines) genesis/engine/solvers/rigid/rigid_solver.py:2708— genesis/engine/solvers/rigid/rigid_solver.py:2708-2712 | genesis/engine/solvers/rigid/rigid_solver.py:2720-2724 | genesis/engine/solvers/rigid/rigid_solver.py:2727-2731 | genesis/engine/solvers/rigid/rigid_solver.py:2734-2737 — 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.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×2
Edited copies of one member (3 members, 7+ corresponding lines) genesis/engine/solvers/rigid/abd/forward_kinematics.py:114— genesis/engine/solvers/rigid/abd/forward_kinematics.py:114-131 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:159-165 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:197-203 — 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.
Edited copies of one member (3 members, 7+ corresponding lines) genesis/vis/camera.py:841— genesis/vis/camera.py:841-847 | genesis/vis/camera.py:850-856 | genesis/vis/camera.py:871-880 — 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 (3 members, 6+ corresponding lines) · ×2
Edited copies of one member (3 members, 6+ corresponding lines) genesis/engine/solvers/kinematic_solver.py:1224— genesis/engine/solvers/kinematic_solver.py:1224-1229 | genesis/engine/solvers/rigid/rigid_solver.py:2856-2861 | genesis/engine/solvers/rigid/rigid_solver.py:2864-2869 — 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) genesis/engine/solvers/pbd_solver.py:1086— genesis/engine/solvers/pbd_solver.py:1086-1091 | genesis/engine/solvers/pbd_solver.py:1104-1111 | genesis/engine/solvers/pbd_solver.py:1124-1129 — 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 copy of a member (30 corresponding lines) · ×2
Edited copy of a member (30 corresponding lines) genesis/engine/entities/rigid_entity/rigid_entity.py:2307— genesis/engine/entities/rigid_entity/rigid_entity.py:2307-2336 | genesis/engine/entities/rigid_entity/rigid_entity.py:2340-2369 — 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.
Edited copy of a member (30 corresponding lines) REDACTED:115— REDACTED:115-157 | REDACTED:143-172 — 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, 4+ corresponding lines) · ×2
Edited copies of one member (3 members, 4+ corresponding lines) genesis/engine/solvers/fem_solver.py:1718— genesis/engine/solvers/fem_solver.py:1718-1721 | genesis/engine/solvers/fem_solver.py:1726-1736 | genesis/engine/solvers/fem_solver.py:3024-3027 — 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.
Edited copies of one member (3 members, 4+ corresponding lines) genesis/engine/materials/MPM/base.py:98— genesis/engine/materials/MPM/base.py:98-101 | genesis/engine/materials/MPM/elastic.py:54-57 | genesis/engine/materials/MPM/liquid.py:49-52 — 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 copy of a member (6 corresponding lines) · ×2
Edited copy of a member (6 corresponding lines) genesis/engine/solvers/pbd_solver.py:1136— genesis/engine/solvers/pbd_solver.py:1136-1141 | genesis/engine/solvers/sph_solver.py:1413-1418 — 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) genesis/engine/solvers/fem_solver.py:1082— genesis/engine/solvers/fem_solver.py:1082-1099 | genesis/engine/solvers/particle_solver.py:158-163 — 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 (4 corresponding lines) · ×2
Edited copy of a member (4 corresponding lines) REDACTED:4031— REDACTED:4031-4034 | genesis/ext/urdfpy/utils.py:118-133 — 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) genesis/ext/pyrender/camera.py:308— genesis/ext/pyrender/camera.py:308-313 | genesis/ext/pyrender/light.py:305-308 — 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 (14–17 lines × 2) genesis/engine/solvers/rigid/collider/diff_gjk.py:471— genesis/engine/solvers/rigid/collider/diff_gjk.py:471-487 | genesis/engine/solvers/rigid/collider/epa.py:1073-1086 — 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 `genesis/engine/solvers/rigid/collider/diff_gjk.py:471` 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. 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 (14–17 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:610— genesis/engine/solvers/rigid/collider/narrowphase.py:610-626 | genesis/engine/solvers/rigid/collider/narrowphase.py:1040-1053 — 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 (17 lines × 2) genesis/utils/particle.py:353— genesis/utils/particle.py:353-369 | genesis/utils/particle.py:377-393 — 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 (17 lines × 2) examples/rigid/hibernation.py:102— examples/rigid/hibernation.py:102-118 | examples/rigid/wrecking_ball.py:223-239 — 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 `examples/rigid/hibernation.py: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 (14–15 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:2346— genesis/engine/solvers/rigid/constraint/solver.py:2346-2359 | genesis/engine/solvers/rigid/constraint/solver.py:2713-2727 — 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, `genesis/engine/solvers/rigid/constraint/solver.py:2730` calls `static` and `genesis/engine/solvers/rigid/constraint/solver.py:2360` 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–15 lines × 2) genesis/utils/geom.py:1055— genesis/utils/geom.py:1055-1069 | genesis/utils/geom.py:1167-1180 — 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–14 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:804— genesis/engine/solvers/rigid/constraint/linesearch.py:804-817 | genesis/engine/solvers/rigid/constraint/linesearch.py:1013-1024 — 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 `genesis/engine/solvers/rigid/constraint/linesearch.py:804` 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 × 2) genesis/engine/solvers/rigid/constraint/solver.py:5304— genesis/engine/solvers/rigid/constraint/solver.py:5304-5317 | genesis/engine/solvers/rigid/constraint/solver_breakdown.py:77-88 — 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 `genesis/engine/solvers/rigid/constraint/solver.py:5304` 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 (22–23 lines × 2) genesis/engine/solvers/rigid/rigid_solver.py:1793— genesis/engine/solvers/rigid/rigid_solver.py:1793-1815 | genesis/engine/solvers/rigid/rigid_solver.py:1919-1940 — 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 (22–23 lines × 2) examples/sensors/imu_franka.py:19— examples/sensors/imu_franka.py:19-40 | examples/sensors/joint_torque_franka.py:35-57 — 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 `examples/sensors/imu_franka.py: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. 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 lines × 4) genesis/engine/solvers/rigid/collider/epa.py:479— genesis/engine/solvers/rigid/collider/epa.py:479-490 | genesis/engine/solvers/rigid/collider/epa.py:614-625 | genesis/engine/solvers/rigid/collider/epa.py:733-744 | genesis/engine/solvers/rigid/collider/epa.py:1275-1286 — 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.
Duplicated block (12 lines × 4) genesis/engine/solvers/rigid/collider/epa.py:529— genesis/engine/solvers/rigid/collider/epa.py:529-540 | genesis/engine/solvers/rigid/collider/epa.py:683-694 | genesis/engine/solvers/rigid/collider/epa.py:749-760 | genesis/engine/solvers/rigid/collider/epa.py:1288-1299 — 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.
Duplicated block (10–11 lines × 3) genesis/engine/couplers/sap_coupler.py:6536— genesis/engine/couplers/sap_coupler.py:6536-6546 | genesis/engine/couplers/sap_coupler.py:7075-7084 | genesis/engine/couplers/sap_coupler.py:7435-7445 — 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. 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 after the matched lines, `genesis/engine/couplers/sap_coupler.py:6547` calls `tet_barycentric` and `genesis/engine/couplers/sap_coupler.py:7446` 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 (10–11 lines × 3) genesis/engine/solvers/rigid/constraint/backward.py:535— genesis/engine/solvers/rigid/constraint/backward.py:535-545 | genesis/engine/solvers/rigid/constraint/backward.py:983-992 | genesis/engine/solvers/rigid/constraint/backward.py:1190-1199 — 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) genesis/engine/couplers/sap_coupler.py:6571— genesis/engine/couplers/sap_coupler.py:6571-6580 | genesis/engine/couplers/sap_coupler.py:6900-6909 | genesis/engine/couplers/sap_coupler.py:7100-7109 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/couplers/sap_coupler.py:6910` calls `u64` and `genesis/engine/couplers/sap_coupler.py:6581` 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 × 3) examples/collision/contype.py:37— examples/collision/contype.py:37-46 | examples/collision/contype.py:49-58 | examples/collision/contype.py:61-70 — 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 `examples/collision/contype.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 (8–9 lines × 2) genesis/utils/usd/usd_rigid_entity.py:507— genesis/utils/usd/usd_rigid_entity.py:507-515 | genesis/utils/usd/usd_rigid_entity.py:610-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.
Duplicated block (8–9 lines × 2) genesis/engine/solvers/rigid/collider/collider.py:1048— genesis/engine/solvers/rigid/collider/collider.py:1048-1056 | genesis/engine/solvers/rigid/constraint/solver.py:433-440 — 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, `genesis/engine/solvers/rigid/collider/collider.py:1045` calls `tolist` and `genesis/engine/solvers/rigid/constraint/solver.py:431` 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 × 2) genesis/engine/solvers/rigid/constraint/noslip.py:224— genesis/engine/solvers/rigid/constraint/noslip.py:224-231 | genesis/engine/solvers/rigid/constraint/noslip.py:239-245 — 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 `genesis/engine/solvers/rigid/constraint/noslip.py:224` 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–8 lines × 2) genesis/utils/geom.py:825— genesis/utils/geom.py:825-832 | genesis/utils/geom.py:855-861 — 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 (2–6 lines × 3) genesis/utils/geom.py:263— genesis/utils/geom.py:263-268 | genesis/utils/geom.py:293-298 | genesis/utils/geom.py:1189-1190 — 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 (2–6 lines × 3) examples/ipc/ipc_robot_grasp_cube.py:99— examples/ipc/ipc_robot_grasp_cube.py:99-100 | examples/ipc/ipc_robot_grasp_cube.py:101-106 | examples/ipc/ipc_robot_grasp_cube.py:113-118 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/ipc/ipc_robot_grasp_cube.py:100` calls `control_dofs_position` and `examples/ipc/ipc_robot_grasp_cube.py:99` 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 (18–19 lines × 2) examples/coupling/fem_cube_linked_with_arm.py:22— examples/coupling/fem_cube_linked_with_arm.py:22-40 | examples/deformable/fem_hard_and_soft_constraint.py:24-41 — 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 (18–19 lines × 2) examples/rigid/ik_franka.py:23— examples/rigid/ik_franka.py:23-41 | examples/rigid/ik_franka_batched.py:29-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 `examples/rigid/ik_franka.py: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.
Duplicated block (12 lines × 3) examples/rendering/moving_camera.py:14— examples/rendering/moving_camera.py:14-25 | examples/rigid/gravity_compensation.py:14-25 | examples/rigid/single_franka.py:14-25 — before extracting anything, compare `examples/rendering/moving_camera.py` and `examples/rigid/single_franka.py` as WHOLE FILES: this scan already matched 3 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. 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 × 3) examples/rigid/ik_duck.py:14— examples/rigid/ik_duck.py:14-25 | examples/rigid/ik_franka.py:14-25 | examples/rigid/ik_franka_batched.py:15-26 — before extracting anything, compare `examples/rigid/ik_duck.py` and `examples/rigid/ik_franka.py` as WHOLE FILES: this scan already matched 4 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 `examples/rigid/ik_duck.py: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 (10 lines × 4) examples/rendering/moving_camera.py:10— examples/rendering/moving_camera.py:10-19 | examples/rigid/closed_loop.py:23-33 | examples/usd/import_stage.py:50-59 | examples/viewer_plugin/mouse_interaction.py:18-27 — before extracting anything, compare `examples/rendering/moving_camera.py` and `examples/rigid/closed_loop.py` 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. 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 `examples/rendering/moving_camera.py:10` 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, `examples/usd/import_stage.py:49` calls `add_argument`, `parse_args` and `examples/rigid/closed_loop.py:23` 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 × 4) examples/rigid/apply_external_wrench.py:12— examples/rigid/apply_external_wrench.py:12-21 | examples/rigid/merge_entities.py:22-31 | examples/rigid/screw_constraint.py:32-41 | examples/tutorials/position_control_comparison.py:22-31 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/apply_external_wrench.py:12` 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, `examples/rigid/merge_entities.py:17` calls `add_argument` and `examples/rigid/apply_external_wrench.py:7` 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.
narrowphase.func_add_polytope_vertex_contacts_sdf (cyclomatic 137) genesis/engine/solvers/rigid/collider/narrowphase.py:71— narrowphase.func_add_polytope_vertex_contacts_sdf has cyclomatic complexity 137 (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.func_contact_overlap_axes (cyclomatic 132) genesis/engine/solvers/rigid/collider/narrowphase.py:2187— narrowphase.func_contact_overlap_axes has cyclomatic complexity 132 (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.
box_contact.func_box_box_contact (cyclomatic 129) genesis/engine/solvers/rigid/collider/box_contact.py:187— box_contact.func_box_box_contact has cyclomatic complexity 129 (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.
KinematicEntityDescription._parse_scene (cyclomatic 98) REDACTED:915— KinematicEntityDescription._parse_scene has cyclomatic complexity 98 (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.
contact.func_clamp_prune_contacts_coop (cyclomatic 80) genesis/engine/solvers/rigid/collider/contact.py:1556— contact.func_clamp_prune_contacts_coop has cyclomatic complexity 80 (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.
Data.__init__ (cyclomatic 79) REDACTED:409— Data.__init__ has cyclomatic complexity 79 (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.
usd_geometry.parse_prim_geoms (cyclomatic 78) genesis/utils/usd/usd_geometry.py:38— usd_geometry.parse_prim_geoms has cyclomatic complexity 78 (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.
SAPCoupler.build (cyclomatic 75) genesis/engine/couplers/sap_coupler.py:1331— SAPCoupler.build has cyclomatic complexity 75 (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.
linesearch.func_linesearch_islands_coop (cyclomatic 70) genesis/engine/solvers/rigid/constraint/linesearch.py:1176— linesearch.func_linesearch_islands_coop has cyclomatic complexity 70 (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.func_add_polytope_vertex_contacts_sdf_shell (cyclomatic 69) genesis/engine/solvers/rigid/collider/narrowphase.py:820— narrowphase.func_add_polytope_vertex_contacts_sdf_shell has cyclomatic complexity 69 (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.
solver.func_island_assemble_factor_solve_tiled (cyclomatic 68) genesis/engine/solvers/rigid/constraint/solver.py:2894— solver.func_island_assemble_factor_solve_tiled 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.
mesh._postprocess_collision_geoms_impl (cyclomatic 67) genesis/utils/mesh.py:677— mesh._postprocess_collision_geoms_impl has cyclomatic complexity 67 (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.
misc.assign_indexed_tensor (cyclomatic 66) genesis/utils/misc.py:1588— misc.assign_indexed_tensor has cyclomatic complexity 66 (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.
genesis.init (cyclomatic 64) genesis/__init__.py:59— genesis.init has cyclomatic complexity 64 (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.
multi_contact.func_multi_contact (cyclomatic 64) genesis/engine/solvers/rigid/collider/multi_contact.py:20— multi_contact.func_multi_contact has cyclomatic complexity 64 (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.
Collider.get_contacts (cyclomatic 60) genesis/engine/solvers/rigid/collider/collider.py:942— Collider.get_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.
usd_rigid_entity._parse_link (cyclomatic 60) genesis/utils/usd/usd_rigid_entity.py:166— usd_rigid_entity._parse_link 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.
narrowphase.func_recompute_perturbed_contact (cyclomatic 59) genesis/engine/solvers/rigid/collider/narrowphase.py:1796— narrowphase.func_recompute_perturbed_contact 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.
RigidSolver._build_config (cyclomatic 59) genesis/engine/solvers/rigid/rigid_solver.py:519— RigidSolver._build_config 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.
island.func_build_islands_coop (cyclomatic 58) genesis/engine/solvers/rigid/constraint/island.py:474— island.func_build_islands_coop has cyclomatic complexity 58 (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.
urdf.parse_urdf (cyclomatic 58) REDACTED:135— urdf.parse_urdf has cyclomatic complexity 58 (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.func_convex_convex_contact (cyclomatic 56) genesis/engine/solvers/rigid/collider/narrowphase.py:2781— narrowphase.func_convex_convex_contact has cyclomatic complexity 56 (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.
backward.kernel_manual_add_equality_constraints_bw (cyclomatic 54) genesis/engine/solvers/rigid/constraint/backward.py:751— backward.kernel_manual_add_equality_constraints_bw has cyclomatic complexity 54 (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.
Collider._compute_collision_pair_idx (cyclomatic 52) genesis/engine/solvers/rigid/collider/collider.py:429— Collider._compute_collision_pair_idx has cyclomatic complexity 52 (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.
inverse_kinematics.func_inverse_kinematics (cyclomatic 51) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:448— inverse_kinematics.func_inverse_kinematics has cyclomatic complexity 51 (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.
legacy_coupler.kernel_sph_boundaries_impulse (cyclomatic 48) genesis/engine/couplers/legacy_coupler.py:2453— legacy_coupler.kernel_sph_boundaries_impulse has cyclomatic complexity 48 (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.func_narrowphase_multicontact (cyclomatic 48) genesis/engine/solvers/rigid/collider/narrowphase.py:3995— narrowphase.func_narrowphase_multicontact has cyclomatic complexity 48 (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._func_multicontact_detect (cyclomatic 47) genesis/engine/solvers/rigid/collider/narrowphase.py:3426— narrowphase._func_multicontact_detect has cyclomatic complexity 47 (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.
bvh.func_build_bvh (cyclomatic 46) genesis/engine/bvh.py:425— bvh.func_build_bvh has cyclomatic complexity 46 (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.
solver.func_hessian_direct_batch (cyclomatic 46) genesis/engine/solvers/rigid/constraint/solver.py:2710— solver.func_hessian_direct_batch 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.
mjcf.parse_link (cyclomatic 46) REDACTED:292— mjcf.parse_link 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.
contact.func_contact_support_hull (cyclomatic 44) genesis/engine/solvers/rigid/collider/contact.py:1110— contact.func_contact_support_hull has cyclomatic complexity 44 (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.
ImGuiOverlayPlugin._render_entity_browser (cyclomatic 44) genesis/ext/pyrender/overlay/plugin.py:1001— ImGuiOverlayPlugin._render_entity_browser has cyclomatic complexity 44 (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.
misc.indices_to_mask (cyclomatic 44) genesis/utils/misc.py:794— misc.indices_to_mask has cyclomatic complexity 44 (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.
usd_collision.apply_collision_filtering (cyclomatic 44) genesis/utils/usd/usd_collision.py:16— usd_collision.apply_collision_filtering has cyclomatic complexity 44 (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.
sap_coupler.kernel_order_constraints (cyclomatic 43) genesis/engine/couplers/sap_coupler.py:2212— sap_coupler.kernel_order_constraints has cyclomatic complexity 43 (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.
KinematicEntity.attach (cyclomatic 43) genesis/engine/entities/rigid_entity/rigid_entity.py:371— KinematicEntity.attach has cyclomatic complexity 43 (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.
solver._add_collision_constraints_per_contact (cyclomatic 43) genesis/engine/solvers/rigid/constraint/solver.py:1004— solver._add_collision_constraints_per_contact has cyclomatic complexity 43 (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.
Camera.set_pose (cyclomatic 43) genesis/vis/camera.py:591— Camera.set_pose has cyclomatic complexity 43 (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.
mpr.func_mpr_contact_from_centers (cyclomatic 42) genesis/engine/solvers/rigid/collider/mpr.py:465— mpr.func_mpr_contact_from_centers has cyclomatic complexity 42 (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.func_contact_mpr_terrain (cyclomatic 42) genesis/engine/solvers/rigid/collider/narrowphase.py:1489— narrowphase.func_contact_mpr_terrain has cyclomatic complexity 42 (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.
forward_dynamics.func_factor_mass_tree_shared (cyclomatic 40) genesis/engine/solvers/rigid/abd/forward_dynamics.py:882— forward_dynamics.func_factor_mass_tree_shared has cyclomatic complexity 40 (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.
ImGuiOverlayPlugin._render_scene_editor (cyclomatic 40) genesis/ext/pyrender/overlay/plugin.py:811— ImGuiOverlayPlugin._render_scene_editor has cyclomatic complexity 40 (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.
epa.func_safe_epa (cyclomatic 39) genesis/engine/solvers/rigid/collider/epa.py:950— epa.func_safe_epa has cyclomatic complexity 39 (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.
solver.func_island_hessian_assemble_block (cyclomatic 39) genesis/engine/solvers/rigid/constraint/solver.py:3221— solver.func_island_hessian_assemble_block has cyclomatic complexity 39 (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.
serialization._load_value (cyclomatic 39) REDACTED:468— serialization._load_value has cyclomatic complexity 39 (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.
legacy_coupler.kernel_place_sph_boundary_segments (cyclomatic 38) genesis/engine/couplers/legacy_coupler.py:2090— legacy_coupler.kernel_place_sph_boundary_segments has cyclomatic complexity 38 (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.
gltf.parse_glb_material (cyclomatic 38) REDACTED:164— gltf.parse_glb_material has cyclomatic complexity 38 (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.
forward_dynamics.func_midpoint_free_body (cyclomatic 37) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1916— forward_dynamics.func_midpoint_free_body 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.
contact.func_clamp_prune_contacts (cyclomatic 37) genesis/engine/solvers/rigid/collider/contact.py:1313— contact.func_clamp_prune_contacts 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.
island.func_build_islands (cyclomatic 37) genesis/engine/solvers/rigid/constraint/island.py:262— island.func_build_islands 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.
kernel_writes.get_written_paths (cyclomatic 37) genesis/grad/kernel_writes.py:36— kernel_writes.get_written_paths 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.
mjcf.build_model (cyclomatic 37) REDACTED:63— mjcf.build_model 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.
IPCCoupler._add_rigid_geoms_to_ipc (cyclomatic 36) genesis/engine/couplers/ipc_coupler/coupler.py:483— IPCCoupler._add_rigid_geoms_to_ipc 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.
forward_dynamics.func_torque_and_passive_force (cyclomatic 36) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1605— forward_dynamics.func_torque_and_passive_force 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.
solver.func_solve_init (cyclomatic 36) genesis/engine/solvers/rigid/constraint/solver.py:5613— solver.func_solve_init 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.
gltf.parse_mesh_glb (cyclomatic 36) REDACTED:371— gltf.parse_mesh_glb 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.
island.func_reorder_island_dofs (cyclomatic 35) genesis/engine/solvers/rigid/constraint/island.py:751— island.func_reorder_island_dofs has cyclomatic complexity 35 (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.
LegacyCoupler._build_sph_boundaries (cyclomatic 34) genesis/engine/couplers/legacy_coupler.py:494— LegacyCoupler._build_sph_boundaries 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.
legacy_coupler.func_project_on_bounds (cyclomatic 34) genesis/engine/couplers/legacy_coupler.py:2351— legacy_coupler.func_project_on_bounds 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.
sap_coupler.func_update_envs_active (cyclomatic 34) genesis/engine/couplers/sap_coupler.py:3167— sap_coupler.func_update_envs_active 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.
solver._add_friction_constraint (cyclomatic 34) genesis/engine/solvers/rigid/constraint/solver.py:786— solver._add_friction_constraint 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.
Renderer._get_primitive_program (cyclomatic 34) genesis/ext/pyrender/renderer.py:749— Renderer._get_primitive_program 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.
Viewer._render (cyclomatic 34) genesis/ext/pyrender/viewer.py:1065— Viewer._render has cyclomatic complexity 34 (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.
Raytracer.build (cyclomatic 34) genesis/vis/raytracer.py:215— Raytracer.build 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.
Mesh.from_trimesh (cyclomatic 33) REDACTED:443— Mesh.from_trimesh has cyclomatic complexity 33 (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.
fem_solver.func_accumulate_vertex (cyclomatic 33) genesis/engine/solvers/fem_solver.py:2175— fem_solver.func_accumulate_vertex has cyclomatic complexity 33 (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.
multi_contact.func_clip_polygon (cyclomatic 33) genesis/engine/solvers/rigid/collider/multi_contact.py:873— multi_contact.func_clip_polygon has cyclomatic complexity 33 (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.
RigidSolver.build (cyclomatic 33) genesis/engine/solvers/rigid/rigid_solver.py:319— RigidSolver.build has cyclomatic complexity 33 (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.
RigidSolver.set_base_links_quat (cyclomatic 33) genesis/engine/solvers/rigid/rigid_solver.py:1880— RigidSolver.set_base_links_quat has cyclomatic complexity 33 (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.
data._allocate (cyclomatic 33) REDACTED:689— data._allocate has cyclomatic complexity 33 (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.parse_geom (cyclomatic 33) REDACTED:518— mjcf.parse_geom has cyclomatic complexity 33 (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.
Entity._get_global_idx (cyclomatic 32) genesis/engine/entities/base_entity.py:167— Entity._get_global_idx 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.
KinematicEntityDescription._load_heterogeneous_morphs (cyclomatic 32) REDACTED:491— KinematicEntityDescription._load_heterogeneous_morphs 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.
RigidSolver._jacobi_mass_spread_bound (cyclomatic 32) genesis/engine/solvers/rigid/rigid_solver.py:832— RigidSolver._jacobi_mass_spread_bound 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.
_trimesh_patch.load_obj (cyclomatic 32) genesis/ext/_trimesh_patch.py:38— _trimesh_patch.load_obj 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.
TrajectoryFileWriter.build (cyclomatic 32) genesis/recorders/trajectory.py:524— TrajectoryFileWriter.build 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.
diff_gjk.func_gjk_contact (cyclomatic 31) genesis/engine/solvers/rigid/collider/diff_gjk.py:12— diff_gjk.func_gjk_contact 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.
gjk.func_gjk_contact (cyclomatic 31) genesis/engine/solvers/rigid/collider/gjk.py:130— gjk.func_gjk_contact 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.
RigidSolver._set_links_info (cyclomatic 31) genesis/engine/solvers/rigid/rigid_solver.py:2011— RigidSolver._set_links_info 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.
JITRenderer.set_primitive (cyclomatic 31) genesis/ext/pyrender/jit_render.py:517— JITRenderer.set_primitive 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.
Simulator.build (cyclomatic 30) genesis/engine/simulator.py:199— Simulator.build 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.
narrowphase.func_narrowphase_contact0 (cyclomatic 30) genesis/engine/solvers/rigid/collider/narrowphase.py:4226— narrowphase.func_narrowphase_contact0 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.
linesearch.func_ls_state_advance (cyclomatic 30) genesis/engine/solvers/rigid/constraint/linesearch.py:380— linesearch.func_ls_state_advance 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.
RigidSolver.set_base_links_pos (cyclomatic 30) genesis/engine/solvers/rigid/rigid_solver.py:1756— RigidSolver.set_base_links_pos 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.
Viewer.start (cyclomatic 30) genesis/ext/pyrender/viewer.py:1161— Viewer.start 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.
KinematicEntityDescription._align_free_roots (cyclomatic 29) REDACTED:1231— KinematicEntityDescription._align_free_roots 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.
RigidEntityDescription._describe_link (cyclomatic 29) REDACTED:1860— RigidEntityDescription._describe_link 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.
CheckpointMixin.save_checkpoint (cyclomatic 29) genesis/engine/solvers/base_solver.py:304— CheckpointMixin.save_checkpoint 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.
_trimesh_patch.export_obj (cyclomatic 29) genesis/ext/_trimesh_patch.py:756— _trimesh_patch.export_obj 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.
Renderer.render (cyclomatic 29) genesis/ext/pyrender/renderer.py:118— Renderer.render 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.
usd_material.parse_preview_surface (cyclomatic 29) genesis/utils/usd/usd_material.py:57— usd_material.parse_preview_surface 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.
sap_coupler.func_link_point_delassus (cyclomatic 28) genesis/engine/couplers/sap_coupler.py:3434— sap_coupler.func_link_point_delassus has cyclomatic complexity 28 (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.
sap_coupler.func_compute_vertices_dofs (cyclomatic 28) genesis/engine/couplers/sap_coupler.py:3831— sap_coupler.func_compute_vertices_dofs has cyclomatic complexity 28 (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.
fem_solver.func_build_coarse (cyclomatic 28) genesis/engine/solvers/fem_solver.py:1884— fem_solver.func_build_coarse has cyclomatic complexity 28 (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.
fem_solver.func_precondition_env (cyclomatic 28) genesis/engine/solvers/fem_solver.py:2069— fem_solver.func_precondition_env has cyclomatic complexity 28 (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.
mpm_solver.kernel_transfer_particles_to_grid (cyclomatic 28) genesis/engine/solvers/mpm_solver.py:949— mpm_solver.kernel_transfer_particles_to_grid has cyclomatic complexity 28 (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.
gjk.func_safe_gjk (cyclomatic 28) genesis/engine/solvers/rigid/collider/gjk.py:1132— gjk.func_safe_gjk has cyclomatic complexity 28 (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.func_narrow_phase_nonconvex_vs_nonterrain (cyclomatic 28) genesis/engine/solvers/rigid/collider/narrowphase.py:4926— narrowphase.func_narrow_phase_nonconvex_vs_nonterrain has cyclomatic complexity 28 (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.
sap_coupler.kernel_init_sap_solve (cyclomatic 27) genesis/engine/couplers/sap_coupler.py:2762— sap_coupler.kernel_init_sap_solve has cyclomatic complexity 27 (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.
multi_contact.func_potential_box_normals (cyclomatic 27) genesis/engine/solvers/rigid/collider/multi_contact.py:282— multi_contact.func_potential_box_normals has cyclomatic complexity 27 (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.
misc.sanitize_index (cyclomatic 27) genesis/utils/misc.py:1311— misc.sanitize_index has cyclomatic complexity 27 (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.
watertighten._quadric_decimate_loop (cyclomatic 27) genesis/utils/watertighten.py:750— watertighten._quadric_decimate_loop has cyclomatic complexity 27 (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.
Raytracer.update_scene (cyclomatic 27) genesis/vis/raytracer.py:664— Raytracer.update_scene has cyclomatic complexity 27 (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.
KinematicEntity.inverse_kinematics_multilink (cyclomatic 26) genesis/engine/entities/rigid_entity/rigid_entity.py:1453— KinematicEntity.inverse_kinematics_multilink has cyclomatic complexity 26 (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.
forward_dynamics.func_factor_mass_tree_tiled (cyclomatic 26) genesis/engine/solvers/rigid/abd/forward_dynamics.py:524— forward_dynamics.func_factor_mass_tree_tiled 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.
forward_dynamics.func_integrate (cyclomatic 26) genesis/engine/solvers/rigid/abd/forward_dynamics.py:2171— forward_dynamics.func_integrate 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.
diff_gjk.func_extended_epa (cyclomatic 26) genesis/engine/solvers/rigid/collider/diff_gjk.py:364— diff_gjk.func_extended_epa 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.
epa.func_epa (cyclomatic 26) genesis/engine/solvers/rigid/collider/epa.py:30— epa.func_epa 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.
Primitive._add_to_context (cyclomatic 26) genesis/ext/pyrender/primitive.py:368— Primitive._add_to_context 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.
legacy_coupler.kernel_fem_surface_force (cyclomatic 25) genesis/engine/couplers/legacy_coupler.py:1396— legacy_coupler.kernel_fem_surface_force 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.
sap_coupler.func_gather_fem_vertex (cyclomatic 25) genesis/engine/couplers/sap_coupler.py:2977— sap_coupler.func_gather_fem_vertex 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.
sap_coupler.func_one_exact_linesearch_iter (cyclomatic 25) genesis/engine/couplers/sap_coupler.py:4944— sap_coupler.func_one_exact_linesearch_iter 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.
FEMSolver.build (cyclomatic 25) genesis/engine/solvers/fem_solver.py:620— FEMSolver.build 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.
linesearch.func_row_alpha_terms (cyclomatic 25) genesis/engine/solvers/rigid/constraint/linesearch.py:108— linesearch.func_row_alpha_terms 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.
solver._sort_contacts_and_build_islands (cyclomatic 25) genesis/engine/solvers/rigid/constraint/solver.py:1618— solver._sort_contacts_and_build_islands 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.
RRTConnect.plan (cyclomatic 25) genesis/utils/path_planning.py:895— RRTConnect.plan 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.
FEMSelfContactHandler.detection (cyclomatic 24) genesis/engine/couplers/sap_coupler.py:6419— FEMSelfContactHandler.detection 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.
RigidRigidContactHandler.detection (cyclomatic 24) genesis/engine/couplers/sap_coupler.py:7304— RigidRigidContactHandler.detection 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.
KinematicSolver.build (cyclomatic 24) genesis/engine/solvers/kinematic_solver.py:239— KinematicSolver.build 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.
epa.func_epa_init_polytope_3d (cyclomatic 24) genesis/engine/solvers/rigid/collider/epa.py:574— epa.func_epa_init_polytope_3d 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.
solver.func_add_dynamic_constraint_rows_batch (cyclomatic 24) genesis/engine/solvers/rigid/constraint/solver.py:1941— solver.func_add_dynamic_constraint_rows_batch 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.
Renderer._bind_and_draw_primitive (cyclomatic 24) genesis/ext/pyrender/renderer.py:559— Renderer._bind_and_draw_primitive 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.
terrain.parse_terrain (cyclomatic 24) REDACTED:19— terrain.parse_terrain 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.
RigidFEMContactHandler.detection (cyclomatic 23) genesis/engine/couplers/sap_coupler.py:6970— RigidFEMContactHandler.detection 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.
sap_coupler.func_invert_rigid_hessian (cyclomatic 23) genesis/engine/couplers/sap_coupler.py:4271— sap_coupler.func_invert_rigid_hessian has cyclomatic complexity 23 (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.
KinematicEntityDescription._resolve_geoms_values (cyclomatic 23) REDACTED:1436— KinematicEntityDescription._resolve_geoms_values 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.
forward_dynamics.func_factor_mass_tree_global (cyclomatic 23) genesis/engine/solvers/rigid/abd/forward_dynamics.py:731— forward_dynamics.func_factor_mass_tree_global 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.
surfaces._make_rgba (cyclomatic 23) genesis/options/surfaces.py:255— surfaces._make_rgba 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.
misc.broadcast_tensor (cyclomatic 23) genesis/utils/misc.py:1456— misc.broadcast_tensor 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.
RRT.plan (cyclomatic 23) genesis/utils/path_planning.py:513— RRT.plan 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.
UsdContext.find_all_materials (cyclomatic 23) genesis/utils/usd/usd_context.py:340— UsdContext.find_all_materials 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.
InteractiveScene._apply_rebuild (cyclomatic 22) genesis/engine/interactive_scene.py:228— InteractiveScene._apply_rebuild 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.
point_cloud_tactile._kernel_point_cloud_proximity_taxel_bvh (cyclomatic 22) genesis/engine/sensors/point_cloud_tactile.py:373— point_cloud_tactile._kernel_point_cloud_proximity_taxel_bvh 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.
fem_solver.func_linesearch_iter (cyclomatic 22) genesis/engine/solvers/fem_solver.py:2694— fem_solver.func_linesearch_iter 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.
forward_kinematics.func_sweep_links_by_level (cyclomatic 22) genesis/engine/solvers/rigid/abd/forward_kinematics.py:1060— forward_kinematics.func_sweep_links_by_level 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.
manual_bw.func_forward_kinematics_link_bw (cyclomatic 22) genesis/engine/solvers/rigid/abd/manual_bw.py:18— manual_bw.func_forward_kinematics_link_bw 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.
linesearch.func_search_single_island (cyclomatic 22) genesis/engine/solvers/rigid/constraint/linesearch.py:755— linesearch.func_search_single_island 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.
noslip.func_noslip_update_row (cyclomatic 22) genesis/engine/solvers/rigid/constraint/noslip.py:252— noslip.func_noslip_update_row 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.
RigidSolver._set_dofs_info (cyclomatic 22) genesis/engine/solvers/rigid/rigid_solver.py:2315— RigidSolver._set_dofs_info has cyclomatic complexity 22 (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.
JITRenderer.update_context (cyclomatic 22) genesis/ext/pyrender/jit_render.py:358— JITRenderer.update_context 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.
Mesh._get_trimesh_props (cyclomatic 22) genesis/ext/pyrender/mesh.py:232— Mesh._get_trimesh_props 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.
OffscreenRenderer.render (cyclomatic 22) genesis/ext/pyrender/offscreen.py:65— OffscreenRenderer.render has cyclomatic complexity 22 (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.
utils.format_texture_source (cyclomatic 22) genesis/ext/pyrender/utils.py:47— utils.format_texture_source 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.
MPLLinePlotter._update_plot (cyclomatic 22) genesis/recorders/plotters.py:570— MPLLinePlotter._update_plot 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.
RasterizerContext.update_rigid (cyclomatic 22) genesis/vis/rasterizer_context.py:632— RasterizerContext.update_rigid 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.
sap_coupler.kernel_update_vel (cyclomatic 21) genesis/engine/couplers/sap_coupler.py:2679— sap_coupler.kernel_update_vel has cyclomatic complexity 21 (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.
forward_kinematics.func_forward_kinematics_link (cyclomatic 21) genesis/engine/solvers/rigid/abd/forward_kinematics.py:398— forward_kinematics.func_forward_kinematics_link 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.
gjk.func_gjk (cyclomatic 21) genesis/engine/solvers/rigid/collider/gjk.py:411— gjk.func_gjk 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.
ImGuiOverlayPlugin._render_file_browser (cyclomatic 21) genesis/ext/pyrender/overlay/plugin.py:730— ImGuiOverlayPlugin._render_file_browser 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.
geom.func_sort_particles_by_slot (cyclomatic 21) genesis/utils/geom.py:2627— geom.func_sort_particles_by_slot has cyclomatic complexity 21 (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.
misc.get_gpu_shared_tile_sizes (cyclomatic 21) genesis/utils/misc.py:385— misc.get_gpu_shared_tile_sizes 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.
serialization._export_value (cyclomatic 21) REDACTED:370— serialization._export_value has cyclomatic complexity 21 (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.
GenesisGeomRetriever.retrieve_rigid_meshes_static (cyclomatic 21) genesis/vis/batch_renderer.py:70— GenesisGeomRetriever.retrieve_rigid_meshes_static 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.
sap_coupler.kernel_sum_contact_patches (cyclomatic 20) genesis/engine/couplers/sap_coupler.py:2450— sap_coupler.kernel_sum_contact_patches 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.
sap_coupler.func_compute_link_wrench (cyclomatic 20) genesis/engine/couplers/sap_coupler.py:3069— sap_coupler.func_compute_link_wrench 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.
SensorManager._resolve_sensor_cls (cyclomatic 20) genesis/engine/sensors/sensor_manager.py:84— SensorManager._resolve_sensor_cls 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.
forward_dynamics.func_refresh_links_invweight_and_meaninertia (cyclomatic 20) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1438— forward_dynamics.func_refresh_links_invweight_and_meaninertia 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.
backward.kernel_manual_add_collision_constraints_bw (cyclomatic 20) genesis/engine/solvers/rigid/constraint/backward.py:414— backward.kernel_manual_add_collision_constraints_bw 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.
noslip.func_refresh_qacc_batch (cyclomatic 20) genesis/engine/solvers/rigid/constraint/noslip.py:177— noslip.func_refresh_qacc_batch 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.
solver._func_contact_row_direction (cyclomatic 20) genesis/engine/solvers/rigid/constraint/solver.py:725— solver._func_contact_row_direction 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.
solver.func_cholesky_solve_batch (cyclomatic 20) genesis/engine/solvers/rigid/constraint/solver.py:4364— solver.func_cholesky_solve_batch has cyclomatic complexity 20 (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.
Scene.add_node (cyclomatic 20) genesis/ext/pyrender/scene.py:381— Scene.add_node 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.
URDF.animate (cyclomatic 20) REDACTED:3420— URDF.animate 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.
LaunchRecorder.insert (cyclomatic 20) genesis/grad/bridge.py:336— LaunchRecorder.insert 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.
Options._validation_error (cyclomatic 20) genesis/options/options.py:42— Options._validation_error 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.
Trajectory.__init__ (cyclomatic 20) genesis/recorders/trajectory.py:1048— Trajectory.__init__ 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.
FrameImageExporter.export_frame_single_camera (cyclomatic 20) genesis/utils/image_exporter.py:137— FrameImageExporter.export_frame_single_camera 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.
mesh._cast_rays_bvh (cyclomatic 20) genesis/utils/mesh.py:95— mesh._cast_rays_bvh 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.
particle._advect_foams (cyclomatic 20) genesis/utils/particle.py:674— particle._advect_foams has cyclomatic complexity 20 (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.
usd_rigid_entity.parse_usd_rigid_entity (cyclomatic 20) genesis/utils/usd/usd_rigid_entity.py:648— usd_rigid_entity.parse_usd_rigid_entity 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.
usd_stage._find_connected_components (cyclomatic 20) genesis/utils/usd/usd_stage.py:56— usd_stage._find_connected_components 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.
Camera.render (cyclomatic 20) genesis/vis/camera.py:404— Camera.render 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.
SensorManager.build (cyclomatic 19) genesis/engine/sensors/sensor_manager.py:146— SensorManager.build 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.
TemperatureGridSensor.build (cyclomatic 19) genesis/engine/sensors/temperature.py:523— TemperatureGridSensor.build 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.
forward_dynamics.func_init_dofs_invweight (cyclomatic 19) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1376— forward_dynamics.func_init_dofs_invweight 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.
manual_bw.func_forward_velocity_link_bw (cyclomatic 19) genesis/engine/solvers/rigid/abd/manual_bw.py:287— manual_bw.func_forward_velocity_link_bw has cyclomatic complexity 19 (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.
gjk.func_gjk_subdistance (cyclomatic 19) genesis/engine/solvers/rigid/collider/gjk.py:810— gjk.func_gjk_subdistance 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.
solver.func_factor_island_incremental_or_direct (cyclomatic 19) genesis/engine/solvers/rigid/constraint/solver.py:4217— solver.func_factor_island_incremental_or_direct 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.
ImGuiOverlayPlugin._render_sim_controls (cyclomatic 19) genesis/ext/pyrender/overlay/plugin.py:450— ImGuiOverlayPlugin._render_sim_controls 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.
Texture._add_to_context (cyclomatic 19) genesis/ext/pyrender/texture.py:167— Texture._add_to_context 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.
TrajectoryFileWriter._compress_frames (cyclomatic 19) genesis/recorders/trajectory.py:813— TrajectoryFileWriter._compress_frames 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.
particle._relax_volume_sampling (cyclomatic 19) genesis/utils/particle.py:159— particle._relax_volume_sampling has cyclomatic complexity 19 (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.
usd_rigid_entity._parse_articulation_structure (cyclomatic 19) genesis/utils/usd/usd_rigid_entity.py:491— usd_rigid_entity._parse_articulation_structure 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.
sap_coupler.func_init_exact_linesearch (cyclomatic 18) genesis/engine/couplers/sap_coupler.py:4751— sap_coupler.func_init_exact_linesearch 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.
ElastomerTaxelSensor.build (cyclomatic 18) genesis/engine/sensors/point_cloud_tactile.py:1689— ElastomerTaxelSensor.build 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.
Solver._sanitize_io_variables (cyclomatic 18) genesis/engine/solvers/base_solver.py:592— Solver._sanitize_io_variables 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.
mpm_solver.func_gather_particles (cyclomatic 18) genesis/engine/solvers/mpm_solver.py:1125— mpm_solver.func_gather_particles 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.
forward_dynamics.kernel_refresh_invweight_and_meaninertia (cyclomatic 18) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1516— forward_dynamics.kernel_refresh_invweight_and_meaninertia 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.
Collider._init_config (cyclomatic 18) genesis/engine/solvers/rigid/collider/collider.py:174— Collider._init_config 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.
epa.func_epa_init_polytope_2d (cyclomatic 18) genesis/engine/solvers/rigid/collider/epa.py:427— epa.func_epa_init_polytope_2d 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.
linesearch.func_exit_islands_coop (cyclomatic 18) genesis/engine/solvers/rigid/constraint/linesearch.py:1545— linesearch.func_exit_islands_coop 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.
solver.func_island_hessian_patch_block (cyclomatic 18) genesis/engine/solvers/rigid/constraint/solver.py:3401— solver.func_island_hessian_patch_block 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.
solver.func_apply_staged_rank_updates_island (cyclomatic 18) genesis/engine/solvers/rigid/constraint/solver.py:3882— solver.func_apply_staged_rank_updates_island 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.
solver.func_cone_rank_update_island (cyclomatic 18) genesis/engine/solvers/rigid/constraint/solver.py:4057— solver.func_cone_rank_update_island 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.
solver.func_update_constraint_batch (cyclomatic 18) genesis/engine/solvers/rigid/constraint/solver.py:5153— solver.func_update_constraint_batch 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.
RigidSolver.__init__ (cyclomatic 18) genesis/engine/solvers/rigid/rigid_solver.py:212— RigidSolver.__init__ 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.
Viewer.on_close (cyclomatic 18) genesis/ext/pyrender/viewer.py:646— Viewer.on_close 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.
URDF.link_fk (cyclomatic 18) REDACTED:2985— URDF.link_fk 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. This shape REPEATS in the file: one other method here (URDF.link_fk_batch) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
URDF.link_fk_batch (cyclomatic 18) REDACTED:3071— URDF.link_fk_batch 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. This shape REPEATS in the file: one other method here (URDF.link_fk) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ImageTexture._validate_and_load (cyclomatic 18) genesis/options/textures.py:141— ImageTexture._validate_and_load 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.
data.iter_data (cyclomatic 18) REDACTED:824— data.iter_data 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.
geom.trans_R_to_T (cyclomatic 18) genesis/utils/geom.py:1320— geom.trans_R_to_T 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.
RRTConnect._kernel_rrt_connect_step1 (cyclomatic 18) genesis/utils/path_planning.py:727— RRTConnect._kernel_rrt_connect_step1 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.
watertighten._collapse_safe (cyclomatic 18) genesis/utils/watertighten.py:594— watertighten._collapse_safe 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.
Camera.build (cyclomatic 18) genesis/vis/camera.py:147— Camera.build 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.
IPCCoupler._add_articulation_entities_to_ipc (cyclomatic 17) genesis/engine/couplers/ipc_coupler/coupler.py:664— IPCCoupler._add_articulation_entities_to_ipc 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.
RigidJointDescription.__post_init__ (cyclomatic 17) REDACTED:198— RigidJointDescription.__post_init__ 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.
Sensor.__init_subclass__ (cyclomatic 17) genesis/engine/sensors/base_sensor.py:204— Sensor.__init_subclass__ 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.
contact.func_contact_is_after (cyclomatic 17) genesis/engine/solvers/rigid/collider/contact.py:815— contact.func_contact_is_after 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.
island.func_group_constraints_by_island_coop (cyclomatic 17) genesis/engine/solvers/rigid/constraint/island.py:171— island.func_group_constraints_by_island_coop 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.
ConstraintSolver.__init__ (cyclomatic 17) genesis/engine/solvers/rigid/constraint/solver.py:148— ConstraintSolver.__init__ has cyclomatic complexity 17 (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.
solver.func_add_cone_hessian_block_island (cyclomatic 17) genesis/engine/solvers/rigid/constraint/solver.py:2574— solver.func_add_cone_hessian_block_island 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.
solver.func_cone_rank_update_whole_env (cyclomatic 17) genesis/engine/solvers/rigid/constraint/solver.py:4145— solver.func_cone_rank_update_whole_env 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.
RigidSolver._init_tree_fields (cyclomatic 17) genesis/engine/solvers/rigid/rigid_solver.py:992— RigidSolver._init_tree_fields 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.
_trimesh_patch._parse_vertices (cyclomatic 17) genesis/ext/_trimesh_patch.py:539— _trimesh_patch._parse_vertices has cyclomatic complexity 17 (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.
Scene._remove_node (cyclomatic 17) genesis/ext/pyrender/scene.py:552— Scene._remove_node 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.
TrajectoryFileWriter._get_frame (cyclomatic 17) genesis/recorders/trajectory.py:742— TrajectoryFileWriter._get_frame has cyclomatic complexity 17 (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.
misc.unique_rows (cyclomatic 17) genesis/utils/misc.py:548— misc.unique_rows 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.
serialization.load (cyclomatic 17) REDACTED:611— serialization.load 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.
RasterizerContext.on_rigid (cyclomatic 17) genesis/vis/rasterizer_context.py:581— RasterizerContext.on_rigid 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.
Alarm.fetch_wandb_data (cyclomatic 16) .github/workflows/scripts/alarm.py:281— Alarm.fetch_wandb_data 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.
bvh.func_bvh_traverse (cyclomatic 16) genesis/engine/bvh.py:750— bvh.func_bvh_traverse 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.
IPCCoupler._add_fem_entities_to_ipc (cyclomatic 16) genesis/engine/couplers/ipc_coupler/coupler.py:402— IPCCoupler._add_fem_entities_to_ipc 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.
RigidJoint.dofs_length (cyclomatic 16) genesis/engine/entities/rigid_entity/rigid_joint.py:313— RigidJoint.dofs_length 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.
CheckpointMixin.load_checkpoint (cyclomatic 16) genesis/engine/solvers/base_solver.py:383— CheckpointMixin.load_checkpoint 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.
fem_solver.func_init_pcg (cyclomatic 16) genesis/engine/solvers/fem_solver.py:2382— fem_solver.func_init_pcg 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.
forward_dynamics.func_init_link_invweight (cyclomatic 16) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1304— forward_dynamics.func_init_link_invweight has cyclomatic complexity 16 (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.
forward_dynamics.func_implicit_damping (cyclomatic 16) genesis/engine/solvers/rigid/abd/forward_dynamics.py:2391— forward_dynamics.func_implicit_damping 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.
forward_kinematics.func_forward_velocity_link (cyclomatic 16) genesis/engine/solvers/rigid/abd/forward_kinematics.py:726— forward_kinematics.func_forward_velocity_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.
forward_kinematics.func_update_cartesian_space (cyclomatic 16) genesis/engine/solvers/rigid/abd/forward_kinematics.py:1198— forward_kinematics.func_update_cartesian_space 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.
inverse_kinematics.func_get_jacobian (cyclomatic 16) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:281— inverse_kinematics.func_get_jacobian has cyclomatic complexity 16 (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.
broadphase._func_broad_phase_links_sap (cyclomatic 16) genesis/engine/solvers/rigid/collider/broadphase.py:165— broadphase._func_broad_phase_links_sap 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.
Collider.__init__ (cyclomatic 16) genesis/engine/solvers/rigid/collider/collider.py:73— Collider.__init__ 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.
contact.func_collider_clear_env (cyclomatic 16) genesis/engine/solvers/rigid/collider/contact.py:229— contact.func_collider_clear_env 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.
mpr.mpr_find_pos (cyclomatic 16) genesis/engine/solvers/rigid/collider/mpr.py:290— mpr.mpr_find_pos has cyclomatic complexity 16 (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.func_contact_convex_convex_sdf (cyclomatic 16) genesis/engine/solvers/rigid/collider/narrowphase.py:1353— narrowphase.func_contact_convex_convex_sdf 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._func_multicontact_run_detection (cyclomatic 16) genesis/engine/solvers/rigid/collider/narrowphase.py:3288— narrowphase._func_multicontact_run_detection 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.func_narrow_phase_any_vs_terrain (cyclomatic 16) genesis/engine/solvers/rigid/collider/narrowphase.py:4835— narrowphase.func_narrow_phase_any_vs_terrain 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.
solver.func_add_relative_motion_rows (cyclomatic 16) genesis/engine/solvers/rigid/constraint/solver.py:1870— solver.func_add_relative_motion_rows has cyclomatic complexity 16 (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.
solver.func_cholesky_factor_direct_batch (cyclomatic 16) genesis/engine/solvers/rigid/constraint/solver.py:3678— solver.func_cholesky_factor_direct_batch 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.
RigidSolver.substep (cyclomatic 16) genesis/engine/solvers/rigid/rigid_solver.py:1317— RigidSolver.substep 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.
sph_solver.func_solver_iteration (cyclomatic 16) genesis/engine/solvers/sph_solver.py:1213— sph_solver.func_solver_iteration 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.
jit_render.bind_lighting (cyclomatic 16) genesis/ext/pyrender/jit_render.py:142— jit_render.bind_lighting 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.
PathPlanner._func_check_collision (cyclomatic 16) genesis/utils/path_planning.py:234— PathPlanner._func_check_collision 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.
MouseInteractionPlugin.on_draw (cyclomatic 16) genesis/vis/viewer_plugins/plugins/mouse_interaction.py:220— MouseInteractionPlugin.on_draw 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.
XxxComment genesis/logging/time_elapser.py:26— # XXX: Kept for more debug options. — 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.
HackComment REDACTED:80— # HACK hardcoded — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
narrowphase.func_add_polytope_vertex_contacts_sdf (cognitive 570) genesis/engine/solvers/rigid/collider/narrowphase.py:71— narrowphase.func_add_polytope_vertex_contacts_sdf has cognitive complexity 570 (threshold 15). Drivers by points: if/else 100 (451 pts), loops 23 (93 pts), boolean chains 17, ternaries 2 (9 pts) (nesting depth added 428). 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.func_contact_overlap_axes (cognitive 557) genesis/engine/solvers/rigid/collider/narrowphase.py:2187— narrowphase.func_contact_overlap_axes has cognitive complexity 557 (threshold 15). Drivers by points: if/else 63 (276 pts), loops 44 (220 pts), ternaries 12 (44 pts), boolean chains 17 (nesting depth added 421). 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.
contact.func_clamp_prune_contacts_coop (cognitive 403) genesis/engine/solvers/rigid/collider/contact.py:1556— contact.func_clamp_prune_contacts_coop has cognitive complexity 403 (threshold 15). Drivers by points: if/else 48 (250 pts), loops 25 (131 pts), ternaries 2 (15 pts), boolean chains 7 (nesting depth added 321). 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.
box_contact.func_box_box_contact (cognitive 388) genesis/engine/solvers/rigid/collider/box_contact.py:187— box_contact.func_box_box_contact has cognitive complexity 388 (threshold 15). Drivers by points: if/else 56 (218 pts), loops 25 (92 pts), ternaries 18 (68 pts), boolean chains 10 (nesting depth added 279). 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.
linesearch.func_linesearch_islands_coop (cognitive 266) genesis/engine/solvers/rigid/constraint/linesearch.py:1176— linesearch.func_linesearch_islands_coop has cognitive complexity 266 (threshold 15). Drivers by points: if/else 39 (151 pts), loops 30 (113 pts), boolean chains 2 (nesting depth added 195). 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.func_add_polytope_vertex_contacts_sdf_shell (cognitive 264) genesis/engine/solvers/rigid/collider/narrowphase.py:820— narrowphase.func_add_polytope_vertex_contacts_sdf_shell has cognitive complexity 264 (threshold 15). Drivers by points: if/else 40 (172 pts), loops 10 (50 pts), ternaries 5 (33 pts), boolean chains 9 (nesting depth added 200). 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.
backward.kernel_manual_add_equality_constraints_bw (cognitive 253) genesis/engine/solvers/rigid/constraint/backward.py:751— backward.kernel_manual_add_equality_constraints_bw has cognitive complexity 253 (threshold 15). Drivers by points: loops 24 (115 pts), if/else 20 (84 pts), ternaries 11 (54 pts) (nesting depth added 198). 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.func_convex_convex_contact (cognitive 230) genesis/engine/solvers/rigid/collider/narrowphase.py:2781— narrowphase.func_convex_convex_contact has cognitive complexity 230 (threshold 15). Drivers by points: if/else 40 (187 pts), loops 5 (30 pts), boolean chains 13 (nesting depth added 172). 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.func_narrowphase_multicontact (cognitive 215) genesis/engine/solvers/rigid/collider/narrowphase.py:3995— narrowphase.func_narrowphase_multicontact has cognitive complexity 215 (threshold 15). Drivers by points: if/else 29 (137 pts), loops 10 (59 pts), ternaries 2 (11 pts), boolean chains 8 (nesting depth added 166). 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.
solver.func_island_assemble_factor_solve_tiled (cognitive 213) genesis/engine/solvers/rigid/constraint/solver.py:2894— solver.func_island_assemble_factor_solve_tiled has cognitive complexity 213 (threshold 15). Drivers by points: if/else 31 (106 pts), loops 32 (105 pts), boolean chains 2 (nesting depth added 148). 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.
inverse_kinematics.func_inverse_kinematics (cognitive 212) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:448— inverse_kinematics.func_inverse_kinematics has cognitive complexity 212 (threshold 15). Drivers by points: loops 28 (119 pts), if/else 16 (68 pts), ternaries 3 (20 pts), boolean chains 5 (nesting depth added 160). 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.
legacy_coupler.kernel_sph_boundaries_impulse (cognitive 202) genesis/engine/couplers/legacy_coupler.py:2453— legacy_coupler.kernel_sph_boundaries_impulse has cognitive complexity 202 (threshold 15). Drivers by points: if/else 22 (100 pts), loops 20 (95 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 155). 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.
KinematicEntityDescription._parse_scene (cognitive 201) REDACTED:915— KinematicEntityDescription._parse_scene has cognitive complexity 201 (threshold 15). Drivers by points: if/else 46 (109 pts), loops 25 (60 pts), boolean chains 23, ternaries 3 (7 pts), error handling 1 (2 pts) (nesting depth added 103). 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.
usd_geometry.parse_prim_geoms (cognitive 200) genesis/utils/usd/usd_geometry.py:38— usd_geometry.parse_prim_geoms has cognitive complexity 200 (threshold 15). Drivers by points: if/else 48 (139 pts), loops 11 (38 pts), boolean chains 19, ternaries 1 (4 pts) (nesting depth added 121). 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.
contact.func_clamp_prune_contacts (cognitive 197) genesis/engine/solvers/rigid/collider/contact.py:1313— contact.func_clamp_prune_contacts has cognitive complexity 197 (threshold 15). Drivers by points: if/else 19 (115 pts), loops 15 (80 pts), boolean chains 2 (nesting depth added 161). 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.
forward_dynamics.func_factor_mass_tree_shared (cognitive 193) genesis/engine/solvers/rigid/abd/forward_dynamics.py:882— forward_dynamics.func_factor_mass_tree_shared has cognitive complexity 193 (threshold 15). Drivers by points: if/else 25 (117 pts), loops 14 (68 pts), ternaries 1 (7 pts), boolean chains 1 (nesting depth added 152). 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.func_contact_mpr_terrain (cognitive 186) genesis/engine/solvers/rigid/collider/narrowphase.py:1489— narrowphase.func_contact_mpr_terrain has cognitive complexity 186 (threshold 15). Drivers by points: if/else 26 (137 pts), loops 9 (35 pts), ternaries 2 (9 pts), boolean chains 5 (nesting depth added 144). 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.func_recompute_perturbed_contact (cognitive 185) genesis/engine/solvers/rigid/collider/narrowphase.py:1796— narrowphase.func_recompute_perturbed_contact has cognitive complexity 185 (threshold 15). Drivers by points: if/else 39 (126 pts), ternaries 6 (32 pts), loops 5 (14 pts), boolean chains 13 (nesting depth added 122). 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.
solver._add_collision_constraints_per_contact (cognitive 176) genesis/engine/solvers/rigid/constraint/solver.py:1004— solver._add_collision_constraints_per_contact has cognitive complexity 176 (threshold 15). Drivers by points: if/else 23 (113 pts), loops 10 (37 pts), ternaries 6 (22 pts), boolean chains 4 (nesting depth added 133). 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.
Data.__init__ (cognitive 175) REDACTED:409— Data.__init__ has cognitive complexity 175 (threshold 15). Drivers by points: if/else 35 (92 pts), loops 21 (40 pts), ternaries 11 (32 pts), boolean chains 11 (nesting depth added 97). 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.
usd_rigid_entity._parse_link (cognitive 167) genesis/utils/usd/usd_rigid_entity.py:166— usd_rigid_entity._parse_link has cognitive complexity 167 (threshold 15). Drivers by points: if/else 40 (108 pts), ternaries 8 (38 pts), loops 5 (14 pts), boolean chains 7 (nesting depth added 107). 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.
multi_contact.func_multi_contact (cognitive 166) genesis/engine/solvers/rigid/collider/multi_contact.py:20— multi_contact.func_multi_contact has cognitive complexity 166 (threshold 15). Drivers by points: ternaries 28 (88 pts), if/else 29 (63 pts), loops 5 (10 pts), boolean chains 5 (nesting depth added 99). 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.
solver.func_island_hessian_assemble_block (cognitive 160) genesis/engine/solvers/rigid/constraint/solver.py:3221— solver.func_island_hessian_assemble_block has cognitive complexity 160 (threshold 15). Drivers by points: if/else 27 (111 pts), loops 12 (49 pts) (nesting depth added 121). 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.
Collider.get_contacts (cognitive 151) genesis/engine/solvers/rigid/collider/collider.py:942— Collider.get_contacts has cognitive complexity 151 (threshold 15). Drivers by points: if/else 43 (91 pts), ternaries 11 (45 pts), boolean chains 13, loops 1 (2 pts) (nesting depth added 83). 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.
solver.func_hessian_direct_batch (cognitive 145) genesis/engine/solvers/rigid/constraint/solver.py:2710— solver.func_hessian_direct_batch has cognitive complexity 145 (threshold 15). Drivers by points: if/else 24 (82 pts), loops 19 (59 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 99). 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.
sap_coupler.func_update_envs_active (cognitive 143) genesis/engine/couplers/sap_coupler.py:3167— sap_coupler.func_update_envs_active has cognitive complexity 143 (threshold 15). Drivers by points: if/else 20 (93 pts), loops 9 (47 pts), boolean chains 2, ternaries 1 (nesting depth added 111). 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.
legacy_coupler.kernel_place_sph_boundary_segments (cognitive 138) genesis/engine/couplers/legacy_coupler.py:2090— legacy_coupler.kernel_place_sph_boundary_segments has cognitive complexity 138 (threshold 15). Drivers by points: if/else 20 (80 pts), loops 14 (55 pts), boolean chains 2, ternaries 1 (nesting depth added 101). 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.
misc.assign_indexed_tensor (cognitive 137) genesis/utils/misc.py:1588— misc.assign_indexed_tensor has cognitive complexity 137 (threshold 15). Drivers by points: if/else 34 (79 pts), loops 11 (28 pts), ternaries 5 (15 pts), boolean chains 14, error handling 1 (nesting depth added 72). 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.
island.func_build_islands_coop (cognitive 136) genesis/engine/solvers/rigid/constraint/island.py:474— island.func_build_islands_coop has cognitive complexity 136 (threshold 15). Drivers by points: if/else 36 (98 pts), loops 17 (33 pts), boolean chains 5 (nesting depth added 78). 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.
ImGuiOverlayPlugin._render_entity_browser (cognitive 136) genesis/ext/pyrender/overlay/plugin.py:1001— ImGuiOverlayPlugin._render_entity_browser has cognitive complexity 136 (threshold 15). Drivers by points: if/else 29 (97 pts), loops 7 (24 pts), ternaries 3 (9 pts), boolean chains 6 (nesting depth added 91). 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.
mesh._postprocess_collision_geoms_impl (cognitive 135) genesis/utils/mesh.py:677— mesh._postprocess_collision_geoms_impl has cognitive complexity 135 (threshold 15). Drivers by points: if/else 36 (88 pts), loops 10 (22 pts), boolean chains 20, ternaries 1 (5 pts) (nesting depth added 68). 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.
sap_coupler.kernel_order_constraints (cognitive 131) genesis/engine/couplers/sap_coupler.py:2212— sap_coupler.kernel_order_constraints has cognitive complexity 131 (threshold 15). Drivers by points: if/else 19 (76 pts), loops 20 (51 pts), boolean chains 3, ternaries 1 (nesting depth added 88). 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.
Collider._compute_collision_pair_idx (cognitive 130) genesis/engine/solvers/rigid/collider/collider.py:429— Collider._compute_collision_pair_idx has cognitive complexity 130 (threshold 15). Drivers by points: if/else 31 (72 pts), loops 15 (41 pts), ternaries 3 (12 pts), boolean chains 5 (nesting depth added 76). 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.
urdf.parse_urdf (cognitive 130) REDACTED:135— urdf.parse_urdf has cognitive complexity 130 (threshold 15). Drivers by points: if/else 34 (83 pts), ternaries 7 (24 pts), loops 9 (16 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 74). 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._func_multicontact_detect (cognitive 126) genesis/engine/solvers/rigid/collider/narrowphase.py:3426— narrowphase._func_multicontact_detect has cognitive complexity 126 (threshold 15). Drivers by points: if/else 30 (93 pts), loops 5 (20 pts), boolean chains 10, ternaries 1 (3 pts) (nesting depth added 80). 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.
bvh.func_build_bvh (cognitive 118) genesis/engine/bvh.py:425— bvh.func_build_bvh has cognitive complexity 118 (threshold 15). Drivers by points: loops 27 (62 pts), if/else 18 (47 pts), ternaries 4 (9 pts) (nesting depth added 69). 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.
misc.indices_to_mask (cognitive 115) genesis/utils/misc.py:794— misc.indices_to_mask has cognitive complexity 115 (threshold 15). Drivers by points: if/else 24 (72 pts), ternaries 6 (25 pts), boolean chains 10, error handling 1 (4 pts), loops 3 (4 pts) (nesting depth added 71). 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.
forward_dynamics.func_factor_mass_tree_tiled (cognitive 112) genesis/engine/solvers/rigid/abd/forward_dynamics.py:524— forward_dynamics.func_factor_mass_tree_tiled has cognitive complexity 112 (threshold 15). Drivers by points: loops 11 (53 pts), if/else 12 (51 pts), ternaries 1 (7 pts), boolean chains 1 (nesting depth added 87). 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.
mpr.func_mpr_contact_from_centers (cognitive 109) genesis/engine/solvers/rigid/collider/mpr.py:465— mpr.func_mpr_contact_from_centers has cognitive complexity 109 (threshold 15). Drivers by points: if/else 37 (93 pts), ternaries 2 (10 pts), boolean chains 5, loops 1 (nesting depth added 64). 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.
IPCCoupler._add_rigid_geoms_to_ipc (cognitive 105) genesis/engine/couplers/ipc_coupler/coupler.py:483— IPCCoupler._add_rigid_geoms_to_ipc has cognitive complexity 105 (threshold 15). Drivers by points: if/else 21 (73 pts), loops 5 (11 pts), ternaries 2 (8 pts), boolean chains 7, error handling 1 (6 pts) (nesting depth added 69). 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.func_narrowphase_contact0 (cognitive 105) genesis/engine/solvers/rigid/collider/narrowphase.py:4226— narrowphase.func_narrowphase_contact0 has cognitive complexity 105 (threshold 15). Drivers by points: if/else 20 (88 pts), loops 4 (10 pts), boolean chains 7 (nesting depth added 74). 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.
gltf.parse_mesh_glb (cognitive 105) REDACTED:371— gltf.parse_mesh_glb has cognitive complexity 105 (threshold 15). Drivers by points: if/else 20 (59 pts), loops 9 (22 pts), ternaries 6 (21 pts), boolean chains 3 (nesting depth added 67). 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.
SAPCoupler.build (cognitive 104) genesis/engine/couplers/sap_coupler.py:1331— SAPCoupler.build has cognitive complexity 104 (threshold 15). Drivers by points: if/else 38 (57 pts), loops 10 (21 pts), boolean chains 16, ternaries 10 (nesting depth added 30). 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.
fem_solver.func_build_coarse (cognitive 103) genesis/engine/solvers/fem_solver.py:1884— fem_solver.func_build_coarse has cognitive complexity 103 (threshold 15). Drivers by points: if/else 14 (59 pts), loops 11 (40 pts), ternaries 3 (4 pts) (nesting depth added 75). 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.
mpm_solver.kernel_transfer_particles_to_grid (cognitive 103) genesis/engine/solvers/mpm_solver.py:949— mpm_solver.kernel_transfer_particles_to_grid has cognitive complexity 103 (threshold 15). Drivers by points: if/else 16 (72 pts), loops 6 (24 pts), boolean chains 7 (nesting depth added 74). 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.
legacy_coupler.func_project_on_bounds (cognitive 102) genesis/engine/couplers/legacy_coupler.py:2351— legacy_coupler.func_project_on_bounds has cognitive complexity 102 (threshold 15). Drivers by points: if/else 12 (54 pts), loops 11 (40 pts), boolean chains 8 (nesting depth added 71). 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.
legacy_coupler.kernel_fem_surface_force (cognitive 100) genesis/engine/couplers/legacy_coupler.py:1396— legacy_coupler.kernel_fem_surface_force has cognitive complexity 100 (threshold 15). Drivers by points: if/else 13 (61 pts), loops 9 (37 pts), boolean chains 2 (nesting depth added 76). 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.
forward_dynamics.func_factor_mass_tree_global (cognitive 99) genesis/engine/solvers/rigid/abd/forward_dynamics.py:731— forward_dynamics.func_factor_mass_tree_global has cognitive complexity 99 (threshold 15). Drivers by points: if/else 13 (58 pts), loops 7 (33 pts), ternaries 1 (7 pts), boolean chains 1 (nesting depth added 77). 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.build_model (cognitive 98) REDACTED:63— mjcf.build_model has cognitive complexity 98 (threshold 15). Drivers by points: if/else 17 (42 pts), loops 11 (33 pts), ternaries 5 (16 pts), boolean chains 4, error handling 1 (3 pts) (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.
KinematicEntityDescription._load_heterogeneous_morphs (cognitive 97) REDACTED:491— KinematicEntityDescription._load_heterogeneous_morphs has cognitive complexity 97 (threshold 15). Drivers by points: if/else 17 (51 pts), loops 8 (24 pts), ternaries 7 (21 pts), boolean chains 1 (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.
RigidSolver._build_config (cognitive 96) genesis/engine/solvers/rigid/rigid_solver.py:519— RigidSolver._build_config has cognitive complexity 96 (threshold 15). Drivers by points: if/else 21 (43 pts), boolean chains 26, ternaries 6 (15 pts), loops 6 (12 pts) (nesting depth added 37). 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.
fem_solver.func_accumulate_vertex (cognitive 94) genesis/engine/solvers/fem_solver.py:2175— fem_solver.func_accumulate_vertex has cognitive complexity 94 (threshold 15). Drivers by points: if/else 26 (71 pts), loops 6 (18 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 58). 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.
contact.func_contact_support_hull (cognitive 94) genesis/engine/solvers/rigid/collider/contact.py:1110— contact.func_contact_support_hull has cognitive complexity 94 (threshold 15). Drivers by points: if/else 13 (37 pts), loops 14 (36 pts), boolean chains 14, ternaries 3 (7 pts) (nesting depth added 50). 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.
forward_dynamics.func_torque_and_passive_force (cognitive 91) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1605— forward_dynamics.func_torque_and_passive_force has cognitive complexity 91 (threshold 15). Drivers by points: if/else 13 (40 pts), ternaries 8 (30 pts), loops 6 (15 pts), boolean chains 6 (nesting depth added 58). 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.
RigidSolver._jacobi_mass_spread_bound (cognitive 91) genesis/engine/solvers/rigid/rigid_solver.py:832— RigidSolver._jacobi_mass_spread_bound has cognitive complexity 91 (threshold 15). Drivers by points: if/else 15 (48 pts), loops 10 (30 pts), boolean chains 7, ternaries 1 (6 pts) (nesting depth added 58). 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.
usd_collision.apply_collision_filtering (cognitive 91) genesis/utils/usd/usd_collision.py:16— usd_collision.apply_collision_filtering has cognitive complexity 91 (threshold 15). Drivers by points: if/else 21 (50 pts), loops 17 (34 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 47). 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.func_narrow_phase_nonconvex_vs_nonterrain (cognitive 90) genesis/engine/solvers/rigid/collider/narrowphase.py:4926— narrowphase.func_narrow_phase_nonconvex_vs_nonterrain has cognitive complexity 90 (threshold 15). Drivers by points: if/else 10 (51 pts), loops 5 (21 pts), ternaries 4 (12 pts), boolean chains 6 (nesting depth added 65). 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.
forward_dynamics.func_integrate (cognitive 89) genesis/engine/solvers/rigid/abd/forward_dynamics.py:2171— forward_dynamics.func_integrate has cognitive complexity 89 (threshold 15). Drivers by points: if/else 15 (47 pts), loops 7 (29 pts), ternaries 3 (12 pts), boolean chains 1 (nesting depth added 63). 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.parse_link (cognitive 89) REDACTED:292— mjcf.parse_link has cognitive complexity 89 (threshold 15). Drivers by points: if/else 30 (62 pts), ternaries 8 (17 pts), loops 3 (5 pts), boolean chains 3, error handling 1 (2 pts) (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.
mpm_solver.func_gather_particles (cognitive 84) genesis/engine/solvers/mpm_solver.py:1125— mpm_solver.func_gather_particles has cognitive complexity 84 (threshold 15). Drivers by points: if/else 14 (67 pts), loops 4 (16 pts), boolean chains 1 (nesting depth added 65). 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.
KinematicEntityDescription._align_free_roots (cognitive 83) REDACTED:1231— KinematicEntityDescription._align_free_roots has cognitive complexity 83 (threshold 15). Drivers by points: if/else 17 (52 pts), loops 9 (26 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 54). 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.
diff_gjk.func_gjk_contact (cognitive 83) genesis/engine/solvers/rigid/collider/diff_gjk.py:12— diff_gjk.func_gjk_contact has cognitive complexity 83 (threshold 15). Drivers by points: if/else 26 (73 pts), loops 4 (8 pts), boolean chains 2 (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.
multi_contact.func_clip_polygon (cognitive 83) genesis/engine/solvers/rigid/collider/multi_contact.py:873— multi_contact.func_clip_polygon has cognitive complexity 83 (threshold 15). Drivers by points: if/else 14 (42 pts), loops 9 (30 pts), ternaries 4 (6 pts), boolean chains 5 (nesting depth added 51). 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.
solver.func_solve_init (cognitive 82) genesis/engine/solvers/rigid/constraint/solver.py:5613— solver.func_solve_init has cognitive complexity 82 (threshold 15). Drivers by points: if/else 27 (55 pts), loops 9 (19 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 39). 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.
CheckpointMixin.save_checkpoint (cognitive 81) genesis/engine/solvers/base_solver.py:304— CheckpointMixin.save_checkpoint has cognitive complexity 81 (threshold 15). Drivers by points: if/else 20 (58 pts), error handling 2 (12 pts), boolean chains 7, loops 1 (3 pts), ternaries 1 (nesting depth added 50). 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.
epa.func_safe_epa (cognitive 81) genesis/engine/solvers/rigid/collider/epa.py:950— epa.func_safe_epa has cognitive complexity 81 (threshold 15). Drivers by points: if/else 26 (62 pts), loops 5 (9 pts), boolean chains 7, ternaries 1 (3 pts) (nesting depth added 42). 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.
sap_coupler.func_compute_vertices_dofs (cognitive 80) genesis/engine/couplers/sap_coupler.py:3831— sap_coupler.func_compute_vertices_dofs has cognitive complexity 80 (threshold 15). Drivers by points: if/else 20 (68 pts), loops 4 (9 pts), boolean chains 2, ternaries 1 (nesting depth added 53). 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.
KinematicEntity.attach (cognitive 80) genesis/engine/entities/rigid_entity/rigid_entity.py:371— KinematicEntity.attach has cognitive complexity 80 (threshold 15). Drivers by points: if/else 26 (52 pts), loops 6 (10 pts), ternaries 3 (10 pts), boolean chains 8 (nesting depth added 37). 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.
kernel_writes.get_written_paths (cognitive 80) genesis/grad/kernel_writes.py:36— kernel_writes.get_written_paths has cognitive complexity 80 (threshold 15). Drivers by points: if/else 17 (46 pts), loops 10 (26 pts), boolean chains 6, ternaries 2 (nesting depth added 45). 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.
sap_coupler.kernel_init_sap_solve (cognitive 79) genesis/engine/couplers/sap_coupler.py:2762— sap_coupler.kernel_init_sap_solve has cognitive complexity 79 (threshold 15). Drivers by points: if/else 16 (53 pts), loops 9 (25 pts), ternaries 1 (nesting depth added 53). 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.
gjk.func_gjk_contact (cognitive 79) genesis/engine/solvers/rigid/collider/gjk.py:130— gjk.func_gjk_contact has cognitive complexity 79 (threshold 15). Drivers by points: if/else 19 (65 pts), boolean chains 5, ternaries 4 (5 pts), loops 2 (4 pts) (nesting depth added 49). 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.
solver.func_cone_rank_update_whole_env (cognitive 78) genesis/engine/solvers/rigid/constraint/solver.py:4145— solver.func_cone_rank_update_whole_env has cognitive complexity 78 (threshold 15). Drivers by points: loops 9 (48 pts), if/else 6 (29 pts), boolean chains 1 (nesting depth added 62). 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.
island.func_reorder_island_dofs (cognitive 77) genesis/engine/solvers/rigid/constraint/island.py:751— island.func_reorder_island_dofs has cognitive complexity 77 (threshold 15). Drivers by points: loops 16 (39 pts), if/else 9 (30 pts), boolean chains 8 (nesting depth added 44). 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.
sap_coupler.func_link_point_delassus (cognitive 74) genesis/engine/couplers/sap_coupler.py:3434— sap_coupler.func_link_point_delassus has cognitive complexity 74 (threshold 15). Drivers by points: if/else 13 (38 pts), loops 10 (32 pts), ternaries 2 (4 pts) (nesting depth added 49). 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.
island.func_build_islands (cognitive 74) genesis/engine/solvers/rigid/constraint/island.py:262— island.func_build_islands has cognitive complexity 74 (threshold 15). Drivers by points: if/else 19 (47 pts), loops 14 (23 pts), boolean chains 4 (nesting depth added 37). 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.
Raytracer.build (cognitive 74) genesis/vis/raytracer.py:215— Raytracer.build has cognitive complexity 74 (threshold 15). Drivers by points: loops 14 (34 pts), if/else 18 (32 pts), ternaries 2 (8 pts) (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.
genesis.init (cognitive 72) genesis/__init__.py:59— genesis.init has cognitive complexity 72 (threshold 15). Drivers by points: if/else 32 (41 pts), boolean chains 19, loops 5, ternaries 3 (5 pts), error handling 1 (2 pts) (nesting depth added 12). 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.
backward.kernel_manual_add_collision_constraints_bw (cognitive 72) genesis/engine/solvers/rigid/constraint/backward.py:414— backward.kernel_manual_add_collision_constraints_bw has cognitive complexity 72 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 7 (26 pts), ternaries 5 (20 pts) (nesting depth added 50). 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.
solver._add_friction_constraint (cognitive 72) genesis/engine/solvers/rigid/constraint/solver.py:786— solver._add_friction_constraint has cognitive complexity 72 (threshold 15). Drivers by points: if/else 24 (54 pts), ternaries 7 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 37). 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.
sap_coupler.func_one_exact_linesearch_iter (cognitive 71) genesis/engine/couplers/sap_coupler.py:4944— sap_coupler.func_one_exact_linesearch_iter has cognitive complexity 71 (threshold 15). Drivers by points: if/else 19 (53 pts), loops 4 (15 pts), boolean chains 3 (nesting depth added 45). 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.
fem_solver.func_precondition_env (cognitive 70) genesis/engine/solvers/fem_solver.py:2069— fem_solver.func_precondition_env has cognitive complexity 70 (threshold 15). Drivers by points: loops 10 (36 pts), if/else 13 (30 pts), boolean chains 3, ternaries 1 (nesting depth added 43). 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.
gjk.func_safe_gjk (cognitive 70) genesis/engine/solvers/rigid/collider/gjk.py:1132— gjk.func_safe_gjk has cognitive complexity 70 (threshold 15). Drivers by points: if/else 20 (54 pts), loops 3 (7 pts), ternaries 2 (7 pts), boolean chains 2 (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.
RasterizerContext.update_rigid (cognitive 70) genesis/vis/rasterizer_context.py:632— RasterizerContext.update_rigid has cognitive complexity 70 (threshold 15). Drivers by points: if/else 10 (41 pts), loops 9 (28 pts), boolean chains 1 (nesting depth added 50). 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.
solver.func_add_cone_hessian_block_island (cognitive 69) genesis/engine/solvers/rigid/constraint/solver.py:2574— solver.func_add_cone_hessian_block_island has cognitive complexity 69 (threshold 15). Drivers by points: loops 8 (36 pts), if/else 7 (32 pts), boolean chains 1 (nesting depth added 53). 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.
Mesh.from_trimesh (cognitive 68) REDACTED:443— Mesh.from_trimesh has cognitive complexity 68 (threshold 15). Drivers by points: if/else 24 (54 pts), boolean chains 6, ternaries 2 (5 pts), loops 1 (3 pts) (nesting depth added 35). 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.
forward_dynamics.func_midpoint_free_body (cognitive 67) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1916— forward_dynamics.func_midpoint_free_body has cognitive complexity 67 (threshold 15). Drivers by points: if/else 23 (43 pts), loops 8 (13 pts), ternaries 5 (8 pts), boolean chains 3 (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.
forward_kinematics.func_sweep_links_by_level (cognitive 67) genesis/engine/solvers/rigid/abd/forward_kinematics.py:1060— forward_kinematics.func_sweep_links_by_level has cognitive complexity 67 (threshold 15). Drivers by points: if/else 18 (53 pts), loops 4 (14 pts) (nesting depth added 45). 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.
Camera.set_pose (cognitive 67) genesis/vis/camera.py:591— Camera.set_pose has cognitive complexity 67 (threshold 15). Drivers by points: if/else 30 (46 pts), boolean chains 10, ternaries 4 (9 pts), loops 1 (2 pts) (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.
sap_coupler.func_invert_rigid_hessian (cognitive 66) genesis/engine/couplers/sap_coupler.py:4271— sap_coupler.func_invert_rigid_hessian has cognitive complexity 66 (threshold 15). Drivers by points: loops 14 (45 pts), if/else 6 (19 pts), boolean chains 1, ternaries 1 (nesting depth added 44). 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.
linesearch.func_search_single_island (cognitive 66) genesis/engine/solvers/rigid/constraint/linesearch.py:755— linesearch.func_search_single_island has cognitive complexity 66 (threshold 15). Drivers by points: if/else 15 (44 pts), loops 7 (22 pts) (nesting depth added 44). 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.
gltf.parse_glb_material (cognitive 66) REDACTED:164— gltf.parse_glb_material has cognitive complexity 66 (threshold 15). Drivers by points: if/else 31 (63 pts), boolean chains 2, loops 1 (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.
ImGuiOverlayPlugin._render_scene_editor (cognitive 65) genesis/ext/pyrender/overlay/plugin.py:811— ImGuiOverlayPlugin._render_scene_editor has cognitive complexity 65 (threshold 15). Drivers by points: if/else 20 (46 pts), boolean chains 10, ternaries 2 (5 pts), loops 2 (4 pts) (nesting depth added 31). 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.
solver.func_cone_rank_update_island (cognitive 64) genesis/engine/solvers/rigid/constraint/solver.py:4057— solver.func_cone_rank_update_island has cognitive complexity 64 (threshold 15). Drivers by points: loops 8 (34 pts), if/else 7 (28 pts), boolean chains 2 (nesting depth added 47). 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.
RigidSolver.build (cognitive 63) genesis/engine/solvers/rigid/rigid_solver.py:319— RigidSolver.build has cognitive complexity 63 (threshold 15). Drivers by points: if/else 23 (47 pts), ternaries 3 (7 pts), loops 4 (5 pts), boolean chains 4 (nesting depth added 29). 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.
Viewer.start (cognitive 62) genesis/ext/pyrender/viewer.py:1161— Viewer.start has cognitive complexity 62 (threshold 15). Drivers by points: if/else 17 (34 pts), error handling 9 (21 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 30). 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._func_multicontact_run_detection (cognitive 61) genesis/engine/solvers/rigid/collider/narrowphase.py:3288— narrowphase._func_multicontact_run_detection has cognitive complexity 61 (threshold 15). Drivers by points: if/else 14 (54 pts), loops 1 (5 pts), boolean chains 2 (nesting depth added 44). 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.
_trimesh_patch.load_obj (cognitive 61) genesis/ext/_trimesh_patch.py:38— _trimesh_patch.load_obj has cognitive complexity 61 (threshold 15). Drivers by points: if/else 23 (42 pts), error handling 5 (13 pts), boolean chains 5, loops 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.
serialization._load_value (cognitive 61) REDACTED:468— serialization._load_value has cognitive complexity 61 (threshold 15). Drivers by points: if/else 22 (35 pts), boolean chains 11, ternaries 4 (8 pts), error handling 1 (4 pts), loops 1 (3 pts) (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.
sap_coupler.kernel_sum_contact_patches (cognitive 60) genesis/engine/couplers/sap_coupler.py:2450— sap_coupler.kernel_sum_contact_patches has cognitive complexity 60 (threshold 15). Drivers by points: if/else 10 (38 pts), loops 7 (18 pts), boolean chains 4 (nesting depth added 39). 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.
forward_dynamics.func_init_dofs_invweight (cognitive 60) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1376— forward_dynamics.func_init_dofs_invweight has cognitive complexity 60 (threshold 15). Drivers by points: loops 6 (24 pts), if/else 5 (20 pts), ternaries 4 (14 pts), boolean chains 2 (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.
multi_contact.func_potential_box_normals (cognitive 60) genesis/engine/solvers/rigid/collider/multi_contact.py:282— multi_contact.func_potential_box_normals has cognitive complexity 60 (threshold 15). Drivers by points: if/else 12 (32 pts), ternaries 4 (14 pts), loops 5 (12 pts), boolean chains 2 (nesting depth added 37). 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.
solver._sort_contacts_and_build_islands (cognitive 60) genesis/engine/solvers/rigid/constraint/solver.py:1618— solver._sort_contacts_and_build_islands has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (42 pts), loops 5 (14 pts), boolean chains 4 (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.
watertighten._quadric_decimate_loop (cognitive 60) genesis/utils/watertighten.py:750— watertighten._quadric_decimate_loop has cognitive complexity 60 (threshold 15). Drivers by points: if/else 18 (50 pts), boolean chains 5, loops 3 (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.
RRTConnect._kernel_rrt_connect_step1 (cognitive 59) genesis/utils/path_planning.py:727— RRTConnect._kernel_rrt_connect_step1 has cognitive complexity 59 (threshold 15). Drivers by points: if/else 11 (35 pts), loops 5 (15 pts), ternaries 2 (9 pts) (nesting depth added 41). 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.
sap_coupler.func_gather_fem_vertex (cognitive 58) genesis/engine/couplers/sap_coupler.py:2977— sap_coupler.func_gather_fem_vertex has cognitive complexity 58 (threshold 15). Drivers by points: if/else 15 (42 pts), loops 4 (12 pts), boolean chains 3, ternaries 1 (nesting depth added 35). 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.
solver.func_add_dynamic_constraint_rows_batch (cognitive 57) genesis/engine/solvers/rigid/constraint/solver.py:1941— solver.func_add_dynamic_constraint_rows_batch has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (35 pts), ternaries 4 (12 pts), boolean chains 5, loops 3 (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.
linesearch.func_exit_islands_coop (cognitive 56) genesis/engine/solvers/rigid/constraint/linesearch.py:1545— linesearch.func_exit_islands_coop has cognitive complexity 56 (threshold 15). Drivers by points: if/else 13 (41 pts), loops 6 (15 pts) (nesting depth added 37). 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.
linesearch.func_row_alpha_terms (cognitive 55) genesis/engine/solvers/rigid/constraint/linesearch.py:108— linesearch.func_row_alpha_terms has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (38 pts), loops 4 (12 pts), boolean chains 5 (nesting depth added 31). 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.
Raytracer.update_scene (cognitive 55) genesis/vis/raytracer.py:664— Raytracer.update_scene has cognitive complexity 55 (threshold 15). Drivers by points: if/else 11 (24 pts), ternaries 4 (16 pts), loops 7 (14 pts), boolean chains 1 (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.
diff_gjk.func_extended_epa (cognitive 53) genesis/engine/solvers/rigid/collider/diff_gjk.py:364— diff_gjk.func_extended_epa has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (40 pts), loops 4 (8 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 26). 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.
linesearch.func_ls_state_advance (cognitive 53) genesis/engine/solvers/rigid/constraint/linesearch.py:380— linesearch.func_ls_state_advance has cognitive complexity 53 (threshold 15). Drivers by points: if/else 23 (44 pts), boolean chains 6, loops 2 (3 pts) (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.
noslip.func_noslip_update_row (cognitive 53) genesis/engine/solvers/rigid/constraint/noslip.py:252— noslip.func_noslip_update_row has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 5 (18 pts), boolean chains 4 (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.
solver._func_contact_row_direction (cognitive 53) genesis/engine/solvers/rigid/constraint/solver.py:725— solver._func_contact_row_direction has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (40 pts), ternaries 3 (12 pts), boolean chains 1 (nesting depth added 34). 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.
_trimesh_patch.export_obj (cognitive 53) genesis/ext/_trimesh_patch.py:756— _trimesh_patch.export_obj has cognitive complexity 53 (threshold 15). Drivers by points: if/else 21 (38 pts), error handling 2 (6 pts), loops 3 (6 pts), boolean chains 3 (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.
Renderer.render (cognitive 53) genesis/ext/pyrender/renderer.py:118— Renderer.render has cognitive complexity 53 (threshold 15). Drivers by points: if/else 18 (35 pts), boolean chains 8, loops 3 (8 pts), ternaries 1 (2 pts) (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.
RRTConnect._kernel_rrt_connect_step2 (cognitive 53) genesis/utils/path_planning.py:832— RRTConnect._kernel_rrt_connect_step2 has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (43 pts), loops 3 (10 pts) (nesting depth added 38). 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.
Entity._get_global_idx (cognitive 52) genesis/engine/entities/base_entity.py:167— Entity._get_global_idx has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (39 pts), boolean chains 6, ternaries 2 (5 pts), error handling 1 (2 pts) (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.
epa.func_epa (cognitive 52) genesis/engine/solvers/rigid/collider/epa.py:30— epa.func_epa has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 4 (8 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 26). 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.
solver.func_apply_staged_rank_updates_island (cognitive 52) genesis/engine/solvers/rigid/constraint/solver.py:3882— solver.func_apply_staged_rank_updates_island has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (38 pts), loops 5 (13 pts), boolean chains 1 (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.
RigidSolver._set_links_info (cognitive 52) genesis/engine/solvers/rigid/rigid_solver.py:2011— RigidSolver._set_links_info has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 7, loops 3 (7 pts), ternaries 3 (7 pts) (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.
RigidSolver.set_base_links_quat (cognitive 51) genesis/engine/solvers/rigid/rigid_solver.py:1880— RigidSolver.set_base_links_quat has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (36 pts), boolean chains 12, ternaries 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.
broadphase.func_broad_phase_geoms (cognitive 50) genesis/engine/solvers/rigid/collider/broadphase.py:284— broadphase.func_broad_phase_geoms has cognitive complexity 50 (threshold 15). Drivers by points: if/else 7 (36 pts), loops 3 (8 pts), ternaries 1 (5 pts), boolean chains 1 (nesting depth added 38). 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.
IPCCoupler._add_fem_entities_to_ipc (cognitive 49) genesis/engine/couplers/ipc_coupler/coupler.py:402— IPCCoupler._add_fem_entities_to_ipc has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (42 pts), loops 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 31). 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.
linesearch.func_linesearch_islands_serial (cognitive 49) genesis/engine/solvers/rigid/constraint/linesearch.py:954— linesearch.func_linesearch_islands_serial has cognitive complexity 49 (threshold 15). Drivers by points: loops 7 (29 pts), if/else 9 (20 pts) (nesting depth added 33). 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.
solver.func_island_hessian_patch_block (cognitive 49) genesis/engine/solvers/rigid/constraint/solver.py:3401— solver.func_island_hessian_patch_block has cognitive complexity 49 (threshold 15). Drivers by points: if/else 11 (33 pts), loops 6 (16 pts) (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.
bvh.func_bvh_traverse (cognitive 48) genesis/engine/bvh.py:750— bvh.func_bvh_traverse has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (45 pts), ternaries 2, loops 1 (nesting depth added 29). 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.
RigidEntityDescription._describe_link (cognitive 48) REDACTED:1860— RigidEntityDescription._describe_link has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 9, ternaries 5 (7 pts), loops 1 (2 pts) (nesting depth added 20). 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.
forward_dynamics.func_mass_mat_assemble_tree_cooperative (cognitive 48) genesis/engine/solvers/rigid/abd/forward_dynamics.py:263— forward_dynamics.func_mass_mat_assemble_tree_cooperative has cognitive complexity 48 (threshold 15). Drivers by points: if/else 8 (28 pts), loops 5 (20 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.
solver.func_factor_island_incremental_or_direct (cognitive 48) genesis/engine/solvers/rigid/constraint/solver.py:4217— solver.func_factor_island_incremental_or_direct has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (40 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 28). 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.parse_geom (cognitive 48) REDACTED:518— mjcf.parse_geom has cognitive complexity 48 (threshold 15). Drivers by points: if/else 23 (38 pts), boolean chains 6, ternaries 3 (4 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.
sap_coupler.kernel_update_vel (cognitive 47) genesis/engine/couplers/sap_coupler.py:2679— sap_coupler.kernel_update_vel has cognitive complexity 47 (threshold 15). Drivers by points: loops 10 (26 pts), if/else 8 (19 pts), boolean chains 2 (nesting depth added 27). 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.
SensorManager._resolve_sensor_cls (cognitive 47) genesis/engine/sensors/sensor_manager.py:84— SensorManager._resolve_sensor_cls has cognitive complexity 47 (threshold 15). Drivers by points: if/else 10 (24 pts), error handling 2 (12 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 28). 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.
solver.func_cholesky_solve_batch (cognitive 47) genesis/engine/solvers/rigid/constraint/solver.py:4364— solver.func_cholesky_solve_batch has cognitive complexity 47 (threshold 15). Drivers by points: loops 10 (26 pts), if/else 10 (21 pts) (nesting depth added 27). 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.
JITRenderer.set_primitive (cognitive 47) genesis/ext/pyrender/jit_render.py:517— JITRenderer.set_primitive has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (34 pts), boolean chains 7, ternaries 2 (4 pts), loops 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.
point_cloud_tactile._kernel_point_cloud_proximity_taxel_bvh (cognitive 46) genesis/engine/sensors/point_cloud_tactile.py:373— point_cloud_tactile._kernel_point_cloud_proximity_taxel_bvh has cognitive complexity 46 (threshold 15). Drivers by points: loops 16 (36 pts), if/else 5 (10 pts) (nesting depth added 25). 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.func_narrow_phase_any_vs_terrain (cognitive 46) genesis/engine/solvers/rigid/collider/narrowphase.py:4835— narrowphase.func_narrow_phase_any_vs_terrain has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (32 pts), loops 4 (9 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 30). 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.
solver.func_add_cone_hessian_block (cognitive 46) genesis/engine/solvers/rigid/constraint/solver.py:2405— solver.func_add_cone_hessian_block has cognitive complexity 46 (threshold 15). Drivers by points: loops 8 (29 pts), if/else 5 (17 pts) (nesting depth added 33). 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.
RigidSolver.set_base_links_pos (cognitive 46) genesis/engine/solvers/rigid/rigid_solver.py:1756— RigidSolver.set_base_links_pos has cognitive complexity 46 (threshold 15). Drivers by points: if/else 20 (33 pts), boolean chains 10, ternaries 2 (3 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.
LegacyCoupler._build_sph_boundaries (cognitive 45) genesis/engine/couplers/legacy_coupler.py:494— LegacyCoupler._build_sph_boundaries has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (27 pts), loops 10 (14 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.
RigidFEMContactHandler.detection (cognitive 45) genesis/engine/couplers/sap_coupler.py:6970— RigidFEMContactHandler.detection has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 7 (12 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 21). 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.
sap_coupler.func_compute_link_wrench (cognitive 45) genesis/engine/couplers/sap_coupler.py:3069— sap_coupler.func_compute_link_wrench has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 4 (11 pts), boolean chains 3, ternaries 2 (nesting depth added 26). 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.
KinematicEntityDescription._resolve_geoms_values (cognitive 45) REDACTED:1436— KinematicEntityDescription._resolve_geoms_values has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 9 (17 pts), ternaries 2 (5 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.
forward_dynamics.func_refresh_links_invweight_and_meaninertia (cognitive 45) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1438— forward_dynamics.func_refresh_links_invweight_and_meaninertia has cognitive complexity 45 (threshold 15). Drivers by points: if/else 7 (21 pts), ternaries 6 (14 pts), loops 4 (8 pts), boolean chains 2 (nesting depth added 26). 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.func_narrow_phase_diff_convex_vs_convex (cognitive 45) genesis/engine/solvers/rigid/collider/narrowphase.py:4541— narrowphase.func_narrow_phase_diff_convex_vs_convex has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (38 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 30). 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.
surfaces._make_rgba (cognitive 45) genesis/options/surfaces.py:255— surfaces._make_rgba has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (24 pts), ternaries 4 (10 pts), loops 4 (7 pts), boolean chains 4 (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.
misc.broadcast_tensor (cognitive 45) genesis/utils/misc.py:1456— misc.broadcast_tensor has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 3 (7 pts), boolean chains 5, error handling 1 (nesting depth added 21). 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.
legacy_coupler.func_boundary_source_segment (cognitive 44) genesis/engine/couplers/legacy_coupler.py:1948— legacy_coupler.func_boundary_source_segment has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 4 (16 pts), boolean chains 1 (nesting depth added 29). 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.
FEMSelfContactHandler.detection (cognitive 44) genesis/engine/couplers/sap_coupler.py:6419— FEMSelfContactHandler.detection has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 8 (14 pts), boolean chains 3 (nesting depth added 21). 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.
RigidRigidContactHandler.detection (cognitive 44) genesis/engine/couplers/sap_coupler.py:7304— RigidRigidContactHandler.detection has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 10 (17 pts), boolean chains 2 (nesting depth added 21). 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.
broadphase._func_broad_phase_links_sap (cognitive 44) genesis/engine/solvers/rigid/collider/broadphase.py:165— broadphase._func_broad_phase_links_sap has cognitive complexity 44 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 8 (21 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.
solver.add_limit_constraints (cognitive 44) genesis/engine/solvers/rigid/constraint/solver.py:2072— solver.add_limit_constraints has cognitive complexity 44 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 5 (16 pts), ternaries 1 (5 pts), boolean chains 1 (nesting depth added 30). 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.
usd_material.parse_preview_surface (cognitive 44) genesis/utils/usd/usd_material.py:57— usd_material.parse_preview_surface has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (37 pts), boolean chains 7 (nesting depth added 19). 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.
watertighten._gaussian_axis (cognitive 44) genesis/utils/watertighten.py:93— watertighten._gaussian_axis has cognitive complexity 44 (threshold 15). Drivers by points: loops 12 (42 pts), if/else 2 (nesting depth added 30). 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.
GenesisGeomRetriever.retrieve_rigid_meshes_static (cognitive 44) genesis/vis/batch_renderer.py:70— GenesisGeomRetriever.retrieve_rigid_meshes_static has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 6 (9 pts), ternaries 4 (8 pts), boolean chains 1 (nesting depth added 21). 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.
RasterizerContext.on_rigid (cognitive 44) genesis/vis/rasterizer_context.py:581— RasterizerContext.on_rigid has cognitive complexity 44 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 6 (16 pts), ternaries 2 (7 pts), boolean chains 2 (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.
forward_dynamics.func_init_link_invweight (cognitive 43) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1304— forward_dynamics.func_init_link_invweight has cognitive complexity 43 (threshold 15). Drivers by points: loops 7 (22 pts), if/else 5 (12 pts), ternaries 3 (8 pts), boolean chains 1 (nesting depth added 27). 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.
ImGuiOverlayPlugin._render_file_browser (cognitive 43) genesis/ext/pyrender/overlay/plugin.py:730— ImGuiOverlayPlugin._render_file_browser has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (32 pts), boolean chains 6, loops 1 (3 pts), error handling 1 (2 pts) (nesting depth added 21). 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.
Primitive._add_to_context (cognitive 43) genesis/ext/pyrender/primitive.py:368— Primitive._add_to_context has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (25 pts), ternaries 7 (15 pts), loops 2 (3 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.
Viewer._render (cognitive 43) genesis/ext/pyrender/viewer.py:1065— Viewer._render has cognitive complexity 43 (threshold 15). Drivers by points: if/else 27 (35 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 10). 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.
TrajectoryFileWriter.build (cognitive 43) genesis/recorders/trajectory.py:524— TrajectoryFileWriter.build has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (20 pts), ternaries 7 (13 pts), loops 4 (6 pts), boolean chains 4 (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.
data._allocate (cognitive 43) REDACTED:689— data._allocate has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (23 pts), ternaries 6 (10 pts), boolean chains 5, loops 2 (3 pts), error handling 1 (2 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.
particle._relax_volume_sampling (cognitive 43) genesis/utils/particle.py:159— particle._relax_volume_sampling has cognitive complexity 43 (threshold 15). Drivers by points: loops 10 (22 pts), if/else 5 (15 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 25). 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.
forward_dynamics.func_implicit_damping (cognitive 42) genesis/engine/solvers/rigid/abd/forward_dynamics.py:2391— forward_dynamics.func_implicit_damping has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 4 (10 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 26). 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.
contact.func_collider_clear_env (cognitive 42) genesis/engine/solvers/rigid/collider/contact.py:229— contact.func_collider_clear_env has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 6 (16 pts) (nesting depth added 26). 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.
gjk.func_gjk_subdistance (cognitive 42) genesis/engine/solvers/rigid/collider/gjk.py:810— gjk.func_gjk_subdistance has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 2 (4 pts), boolean chains 3 (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.
Renderer._get_primitive_program (cognitive 42) genesis/ext/pyrender/renderer.py:749— Renderer._get_primitive_program has cognitive complexity 42 (threshold 15). Drivers by points: if/else 29 (41 pts), boolean chains 1 (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.
MPLLinePlotter._update_plot (cognitive 42) genesis/recorders/plotters.py:570— MPLLinePlotter._update_plot has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 4 (8 pts), boolean chains 7 (nesting depth added 20). 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.
mesh._cast_rays_bvh (cognitive 42) genesis/utils/mesh.py:95— mesh._cast_rays_bvh has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 4 (9 pts), boolean chains 6 (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.
kinematic_tactile._kernel_build_sensor_geom_idx (cognitive 41) genesis/engine/sensors/kinematic_tactile.py:132— kinematic_tactile._kernel_build_sensor_geom_idx has cognitive complexity 41 (threshold 15). Drivers by points: if/else 3 (15 pts), ternaries 3 (13 pts), loops 4 (11 pts), boolean chains 2 (nesting depth added 29). 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.
FEMSolver.build (cognitive 41) genesis/engine/solvers/fem_solver.py:620— FEMSolver.build has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 9 (16 pts), ternaries 3 (5 pts), boolean chains 4 (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.
noslip.func_refresh_qacc_batch (cognitive 41) genesis/engine/solvers/rigid/constraint/noslip.py:177— noslip.func_refresh_qacc_batch has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 7 (15 pts), ternaries 1 (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.
solver.func_island_tiled_factor_solve_all (cognitive 41) genesis/engine/solvers/rigid/constraint/solver.py:3609— solver.func_island_tiled_factor_solve_all has cognitive complexity 41 (threshold 15). Drivers by points: if/else 6 (26 pts), ternaries 3 (9 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 28). 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.
Mesh._get_trimesh_props (cognitive 41) genesis/ext/pyrender/mesh.py:232— Mesh._get_trimesh_props has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (28 pts), ternaries 3 (10 pts), boolean chains 3 (nesting depth added 21). 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.
misc.get_gpu_shared_tile_sizes (cognitive 41) genesis/utils/misc.py:385— misc.get_gpu_shared_tile_sizes has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 7 (13 pts), ternaries 3 (8 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.
Simulator.build (cognitive 40) genesis/engine/simulator.py:199— Simulator.build has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (30 pts), boolean chains 5, loops 5 (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.
fem_solver.func_init_pcg (cognitive 40) genesis/engine/solvers/fem_solver.py:2382— fem_solver.func_init_pcg has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (30 pts), loops 3 (7 pts), ternaries 2, 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.
epa.func_epa_init_polytope_3d (cognitive 40) genesis/engine/solvers/rigid/collider/epa.py:574— epa.func_epa_init_polytope_3d has cognitive complexity 40 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 5 (13 pts), loops 6 (10 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.
gjk.func_gjk (cognitive 40) genesis/engine/solvers/rigid/collider/gjk.py:411— gjk.func_gjk has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (34 pts), loops 3 (5 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.
Renderer._bind_and_draw_primitive (cognitive 40) genesis/ext/pyrender/renderer.py:559— Renderer._bind_and_draw_primitive has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23 (36 pts), boolean chains 4 (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.
LaunchRecorder.insert (cognitive 40) genesis/grad/bridge.py:336— LaunchRecorder.insert has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 5 (10 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 20). 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.
RRT._kernel_rrt_step1 (cognitive 40) genesis/utils/path_planning.py:380— RRT._kernel_rrt_step1 has cognitive complexity 40 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 5 (15 pts), ternaries 2 (9 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.
narrowphase.func_contact_convex_convex_sdf (cognitive 39) genesis/engine/solvers/rigid/collider/narrowphase.py:1353— narrowphase.func_contact_convex_convex_sdf has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 4 (10 pts), boolean chains 2 (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.
linesearch.func_exit_single_island (cognitive 39) genesis/engine/solvers/rigid/constraint/linesearch.py:893— linesearch.func_exit_single_island has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 3 (9 pts), ternaries 1 (3 pts) (nesting depth added 24). 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.
linesearch.func_exit_islands_serial (cognitive 39) genesis/engine/solvers/rigid/constraint/linesearch.py:1092— linesearch.func_exit_islands_serial has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 3 (12 pts) (nesting depth added 27). 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.
TrajectoryFileWriter._compress_frames (cognitive 39) genesis/recorders/trajectory.py:813— TrajectoryFileWriter._compress_frames has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (22 pts), error handling 3 (10 pts), boolean chains 3, ternaries 1 (3 pts), loops 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.
particle._advect_foams (cognitive 39) genesis/utils/particle.py:674— particle._advect_foams has cognitive complexity 39 (threshold 15). Drivers by points: loops 9 (20 pts), if/else 6 (15 pts), boolean chains 3, ternaries 1 (nesting depth added 20). 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.
PathPlanner._func_check_collision (cognitive 39) genesis/utils/path_planning.py:234— PathPlanner._func_check_collision has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (30 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 24). 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.
CheckpointMixin.load_checkpoint (cognitive 38) genesis/engine/solvers/base_solver.py:383— CheckpointMixin.load_checkpoint has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 3 (10 pts), boolean chains 2 (nesting depth added 21). 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.
forward_kinematics.func_update_cartesian_space (cognitive 38) genesis/engine/solvers/rigid/abd/forward_kinematics.py:1198— forward_kinematics.func_update_cartesian_space has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (11 pts), ternaries 1 (4 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.
inverse_kinematics.func_jacobian_scratch (cognitive 38) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:221— inverse_kinematics.func_jacobian_scratch has cognitive complexity 38 (threshold 15). Drivers by points: loops 8 (25 pts), ternaries 3 (10 pts), if/else 1 (3 pts) (nesting depth added 26). 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.
inverse_kinematics.func_get_jacobian (cognitive 38) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:281— inverse_kinematics.func_get_jacobian has cognitive complexity 38 (threshold 15). Drivers by points: loops 8 (25 pts), ternaries 3 (10 pts), if/else 1 (3 pts) (nesting depth added 26). 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.
pbd_solver.kernel_solve_density (cognitive 37) genesis/engine/solvers/pbd_solver.py:882— pbd_solver.kernel_solve_density has cognitive complexity 37 (threshold 15). Drivers by points: loops 7 (23 pts), if/else 3 (12 pts), boolean chains 2 (nesting depth added 25). 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.
manual_bw.func_forward_kinematics_link_bw (cognitive 37) genesis/engine/solvers/rigid/abd/manual_bw.py:18— manual_bw.func_forward_kinematics_link_bw has cognitive complexity 37 (threshold 15). Drivers by points: loops 11 (26 pts), if/else 4 (5 pts), ternaries 3 (5 pts), boolean chains 1 (nesting depth added 18). 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.
solver.add_frictionloss_constraints (cognitive 37) genesis/engine/solvers/rigid/constraint/solver.py:2167— solver.add_frictionloss_constraints has cognitive complexity 37 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 5 (12 pts), ternaries 3 (12 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.
RigidSolver._init_tree_fields (cognitive 37) genesis/engine/solvers/rigid/rigid_solver.py:992— RigidSolver._init_tree_fields has cognitive complexity 37 (threshold 15). Drivers by points: loops 9 (19 pts), if/else 5 (16 pts), boolean chains 2 (nesting depth added 21). 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.
RRTConnect.plan (cognitive 37) genesis/utils/path_planning.py:895— RRTConnect.plan has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (27 pts), ternaries 3 (5 pts), loops 3, boolean chains 2 (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.
usd_rigid_entity._parse_articulation_structure (cognitive 37) genesis/utils/usd/usd_rigid_entity.py:491— usd_rigid_entity._parse_articulation_structure has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 5 (11 pts), loops 4 (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.
Alarm.build_table (cognitive 36) .github/workflows/scripts/alarm.py:353— Alarm.build_table has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 5 (19 pts), if/else 7 (14 pts), loops 2, boolean chains 1 (nesting depth added 21). 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.
sap_coupler.func_compute_constraint_chunk (cognitive 36) genesis/engine/couplers/sap_coupler.py:3953— sap_coupler.func_compute_constraint_chunk has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (25 pts), loops 3 (7 pts), boolean chains 3, ternaries 1 (nesting depth added 22). 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.
sap_coupler.func_init_exact_linesearch (cognitive 36) genesis/engine/couplers/sap_coupler.py:4751— sap_coupler.func_init_exact_linesearch has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 4 (9 pts), boolean chains 1, ternaries 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.
TemperatureGridSensor.build (cognitive 36) genesis/engine/sensors/temperature.py:523— TemperatureGridSensor.build has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 3 (8 pts), ternaries 2, 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.
multi_contact.func_approximate_polygon_with_quad (cognitive 36) genesis/engine/solvers/rigid/collider/multi_contact.py:1077— multi_contact.func_approximate_polygon_with_quad has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 4 (11 pts) (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.
backward.kernel_manual_add_joint_limit_constraints_bw (cognitive 36) genesis/engine/solvers/rigid/constraint/backward.py:288— backward.kernel_manual_add_joint_limit_constraints_bw has cognitive complexity 36 (threshold 15). Drivers by points: if/else 4 (17 pts), ternaries 3 (12 pts), loops 3 (6 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.
island.func_group_constraints_by_island_coop (cognitive 36) genesis/engine/solvers/rigid/constraint/island.py:171— island.func_group_constraints_by_island_coop has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 6 (11 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.
RRT.plan (cognitive 36) genesis/utils/path_planning.py:513— RRT.plan has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (27 pts), ternaries 3 (5 pts), boolean chains 2, loops 2 (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.
temperature._kernel_compute_contact_areas (cognitive 35) genesis/engine/sensors/temperature.py:206— temperature._kernel_compute_contact_areas has cognitive complexity 35 (threshold 15). Drivers by points: loops 7 (18 pts), if/else 5 (15 pts), boolean chains 2 (nesting depth added 21). 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.
fem_solver.func_linesearch_iter (cognitive 35) genesis/engine/solvers/fem_solver.py:2694— fem_solver.func_linesearch_iter has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 4 (6 pts), boolean chains 5, ternaries 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.
manual_bw.func_forward_velocity_link_bw (cognitive 35) genesis/engine/solvers/rigid/abd/manual_bw.py:287— manual_bw.func_forward_velocity_link_bw has cognitive complexity 35 (threshold 15). Drivers by points: loops 12 (25 pts), if/else 3 (5 pts), ternaries 3 (5 pts) (nesting depth added 17). 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.
solver.kernel_delete_dynamic_constraint (cognitive 35) genesis/engine/solvers/rigid/constraint/solver.py:2291— solver.kernel_delete_dynamic_constraint has cognitive complexity 35 (threshold 15). Drivers by points: if/else 5 (23 pts), loops 3 (8 pts), boolean chains 4 (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.
sph_solver.func_solver_iteration (cognitive 35) genesis/engine/solvers/sph_solver.py:1213— sph_solver.func_solver_iteration has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 2 (4 pts), boolean chains 2 (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.
misc.unique_rows (cognitive 35) genesis/utils/misc.py:548— misc.unique_rows has cognitive complexity 35 (threshold 15). Drivers by points: loops 11 (25 pts), if/else 4 (9 pts), boolean chains 1 (nesting depth added 19). 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.
Camera.render (cognitive 35) genesis/vis/camera.py:404— Camera.render has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 4, ternaries 2 (3 pts), loops 1 (2 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.
IPCCoupler._add_articulation_entities_to_ipc (cognitive 34) genesis/engine/couplers/ipc_coupler/coupler.py:664— IPCCoupler._add_articulation_entities_to_ipc has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 4 (8 pts), ternaries 2 (6 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.
RigidJoint.dofs_length (cognitive 34) genesis/engine/entities/rigid_entity/rigid_joint.py:313— RigidJoint.dofs_length has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 5 (14 pts), ternaries 2 (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.
SensorManager.build (cognitive 34) genesis/engine/sensors/sensor_manager.py:146— SensorManager.build has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 9 (12 pts), ternaries 2 (6 pts), boolean chains 2 (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.
forward_dynamics.func_factor_mass_tree (cognitive 34) genesis/engine/solvers/rigid/abd/forward_dynamics.py:827— forward_dynamics.func_factor_mass_tree has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 5 (14 pts), ternaries 1 (4 pts) (nesting depth added 22). 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.
forward_kinematics.func_forward_velocity_link (cognitive 34) genesis/engine/solvers/rigid/abd/forward_kinematics.py:726— forward_kinematics.func_forward_velocity_link has cognitive complexity 34 (threshold 15). Drivers by points: loops 6 (16 pts), if/else 5 (10 pts), ternaries 5 (8 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.
contact.func_contact_is_after (cognitive 34) genesis/engine/solvers/rigid/collider/contact.py:815— contact.func_contact_is_after has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 6 (14 pts) (nesting depth added 20). 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.
noslip.func_noslip_batch (cognitive 34) genesis/engine/solvers/rigid/constraint/noslip.py:438— noslip.func_noslip_batch has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (27 pts), loops 3 (6 pts), ternaries 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.
ImageTexture._validate_and_load (cognitive 34) genesis/options/textures.py:141— ImageTexture._validate_and_load has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (34 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.
kinematic_tactile._kernel_kinematic_taxel_bvh (cognitive 33) genesis/engine/sensors/kinematic_tactile.py:599— kinematic_tactile._kernel_kinematic_taxel_bvh has cognitive complexity 33 (threshold 15). Drivers by points: if/else 4 (13 pts), ternaries 5 (10 pts), loops 4 (9 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.
accessor.kernel_set_dofs_position (cognitive 33) genesis/engine/solvers/rigid/abd/accessor.py:707— accessor.kernel_set_dofs_position has cognitive complexity 33 (threshold 15). Drivers by points: loops 6 (19 pts), if/else 4 (9 pts), ternaries 2 (5 pts) (nesting depth added 21). 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.
misc.func_hibernate_island_if_settled (cognitive 33) genesis/engine/solvers/rigid/abd/misc.py:185— misc.func_hibernate_island_if_settled has cognitive complexity 33 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 4 (11 pts), ternaries 2 (9 pts), boolean chains 1 (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.
narrowphase.func_prefer_gjk_refinement (cognitive 33) genesis/engine/solvers/rigid/collider/narrowphase.py:2098— narrowphase.func_prefer_gjk_refinement has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (7 pts), boolean chains 2 (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.
solver.func_island_hessian_assemble_all (cognitive 33) genesis/engine/solvers/rigid/constraint/solver.py:3497— solver.func_island_hessian_assemble_all has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (27 pts), ternaries 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 19). 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.
solver.func_cholesky_factor_direct_batch (cognitive 33) genesis/engine/solvers/rigid/constraint/solver.py:3678— solver.func_cholesky_factor_direct_batch has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (9 pts), boolean chains 4 (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.
jit_render.bind_lighting (cognitive 33) genesis/ext/pyrender/jit_render.py:142— jit_render.bind_lighting has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 3 (5 pts) (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.
URDF._process_cfgs (cognitive 33) REDACTED:3861— URDF._process_cfgs has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 5 (13 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.
Trajectory.__init__ (cognitive 33) genesis/recorders/trajectory.py:1048— Trajectory.__init__ has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 3, loops 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.
data.iter_data (cognitive 33) REDACTED:824— data.iter_data has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (4 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.
geom.func_sort_particles_by_slot (cognitive 33) genesis/utils/geom.py:2627— geom.func_sort_particles_by_slot has cognitive complexity 33 (threshold 15). Drivers by points: loops 16 (23 pts), if/else 4 (10 pts) (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.
Camera.build (cognitive 33) genesis/vis/camera.py:147— Camera.build has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 4 (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.
tactile_shared.normalize_grid_probe_layout (cognitive 32) genesis/engine/sensors/tactile_shared.py:232— tactile_shared.normalize_grid_probe_layout has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (23 pts), ternaries 1 (5 pts), boolean chains 4 (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.
forward_dynamics.kernel_refresh_invweight_and_meaninertia (cognitive 32) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1516— forward_dynamics.kernel_refresh_invweight_and_meaninertia has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 4 (8 pts), loops 4 (7 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.
raycast_qd.closest_point_on_triangle (cognitive 32) genesis/utils/raycast_qd.py:258— raycast_qd.closest_point_on_triangle has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 6 (nesting depth added 15). 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.
UsdContext.find_all_materials (cognitive 32) genesis/utils/usd/usd_context.py:340— UsdContext.find_all_materials has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 4 (6 pts), boolean chains 3, ternaries 2, error handling 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.
usd_rigid_entity.parse_usd_rigid_entity (cognitive 32) genesis/utils/usd/usd_rigid_entity.py:648— usd_rigid_entity.parse_usd_rigid_entity has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 6 (9 pts), boolean chains 3 (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.
watertighten._collapse_safe (cognitive 32) genesis/utils/watertighten.py:594— watertighten._collapse_safe has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 4 (6 pts), boolean chains 4, ternaries 1 (2 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.
sap_coupler.kernel_compute_regularization (cognitive 31) genesis/engine/couplers/sap_coupler.py:2591— sap_coupler.kernel_compute_regularization has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 4 (9 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.
KinematicSolver.build (cognitive 31) genesis/engine/solvers/kinematic_solver.py:239— KinematicSolver.build has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 7 (9 pts), boolean chains 6, ternaries 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.
pbd_solver.kernel_solve_collision (cognitive 31) genesis/engine/solvers/pbd_solver.py:828— pbd_solver.kernel_solve_collision has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 4 (11 pts), boolean chains 4 (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.
misc.func_equality_links (cognitive 31) genesis/engine/solvers/rigid/abd/misc.py:39— misc.func_equality_links has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (13 pts), ternaries 3 (12 pts), loops 2 (6 pts) (nesting depth added 21). 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.
gjk.func_safe_gjk_support (cognitive 31) genesis/engine/solvers/rigid/collider/gjk.py:1558— gjk.func_safe_gjk_support has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 4 (12 pts), loops 2 (3 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.
mpr.mpr_find_pos (cognitive 31) genesis/engine/solvers/rigid/collider/mpr.py:290— mpr.mpr_find_pos has cognitive complexity 31 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 7 (14 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.
solver.func_add_relative_motion_rows (cognitive 31) genesis/engine/solvers/rigid/constraint/solver.py:1870— solver.func_add_relative_motion_rows has cognitive complexity 31 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 3 (9 pts), ternaries 3 (5 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.
solver.func_update_constraint_batch (cognitive 31) genesis/engine/solvers/rigid/constraint/solver.py:5153— solver.func_update_constraint_batch has cognitive complexity 31 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 8 (14 pts), boolean chains 2 (nesting depth added 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.
raycast_qd.kernel_cast_rays (cognitive 31) genesis/utils/raycast_qd.py:366— raycast_qd.kernel_cast_rays has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (9 pts), ternaries 1 (3 pts), boolean chains 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.
legacy_coupler.func_boundary_source_cell (cognitive 30) genesis/engine/couplers/legacy_coupler.py:1772— legacy_coupler.func_boundary_source_cell has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 1 (4 pts) (nesting depth added 20). 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.
legacy_coupler.func_boundary_source_window (cognitive 30) genesis/engine/couplers/legacy_coupler.py:1823— legacy_coupler.func_boundary_source_window has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (28 pts), boolean chains 2 (nesting depth added 19). 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.
temperature._kernel_contact_heat (cognitive 30) genesis/engine/sensors/temperature.py:287— temperature._kernel_contact_heat has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (8 pts), ternaries 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.
accessor.kernel_set_sol_params (cognitive 30) genesis/engine/solvers/rigid/abd/accessor.py:458— accessor.kernel_set_sol_params has cognitive complexity 30 (threshold 15). Drivers by points: loops 8 (24 pts), if/else 5 (6 pts) (nesting depth added 17). 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.
solver_breakdown._func_islands_linesearch_and_apply (cognitive 30) genesis/engine/solvers/rigid/constraint/solver_breakdown.py:192— solver_breakdown._func_islands_linesearch_and_apply has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (23 pts), ternaries 1 (4 pts), boolean chains 2, 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.
solver_breakdown._func_islands_update_search_direction (cognitive 30) genesis/engine/solvers/rigid/constraint/solver_breakdown.py:269— solver_breakdown._func_islands_update_search_direction has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (27 pts), boolean chains 2, loops 1 (nesting depth added 20). 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.
Scene.add_node (cognitive 30) genesis/ext/pyrender/scene.py:381— Scene.add_node has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 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.
utils.format_texture_source (cognitive 30) genesis/ext/pyrender/utils.py:47— utils.format_texture_source has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 1 (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.
URDF.link_fk (cognitive 30) REDACTED:2985— URDF.link_fk has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (25 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. This shape REPEATS in the file: one other method here (URDF.link_fk_batch) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
URDF.link_fk_batch (cognitive 30) REDACTED:3071— URDF.link_fk_batch has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (25 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. This shape REPEATS in the file: one other method here (URDF.link_fk) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
URDF.animate (cognitive 30) REDACTED:3420— URDF.animate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 5 (8 pts), boolean chains 2 (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.
misc.qd_to_torch (cognitive 30) genesis/utils/misc.py:964— misc.qd_to_torch has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (20 pts), error handling 2 (5 pts), ternaries 2 (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.
fem_solver.func_coarse_eliminate (cognitive 29) genesis/engine/solvers/fem_solver.py:2011— fem_solver.func_coarse_eliminate has cognitive complexity 29 (threshold 15). Drivers by points: loops 8 (16 pts), if/else 5 (12 pts), ternaries 1 (nesting depth added 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.
fem_solver.func_update_pcg_env (cognitive 29) genesis/engine/solvers/fem_solver.py:2444— fem_solver.func_update_pcg_env has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 15). 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.
forward_kinematics.func_forward_kinematics_link (cognitive 29) genesis/engine/solvers/rigid/abd/forward_kinematics.py:398— forward_kinematics.func_forward_kinematics_link has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 6 (10 pts), loops 3 (7 pts), boolean chains 1 (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.
inverse_kinematics.func_forward_kinematics_scratch (cognitive 29) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:106— inverse_kinematics.func_forward_kinematics_scratch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 3 (8 pts), loops 2 (3 pts), boolean chains 1 (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.
contact.func_contact_heapsort (cognitive 29) genesis/engine/solvers/rigid/collider/contact.py:872— contact.func_contact_heapsort has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 3 (6 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.
Scene._remove_node (cognitive 29) genesis/ext/pyrender/scene.py:552— Scene._remove_node has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (27 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.
LaunchRecorder.reverse (cognitive 29) genesis/grad/bridge.py:408— LaunchRecorder.reverse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (10 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.
Options._validation_error (cognitive 29) genesis/options/options.py:42— Options._validation_error has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 3, loops 2, ternaries 1 (2 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.
cache.get_hashkey (cognitive 29) REDACTED:429— cache.get_hashkey has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 2 (7 pts), error handling 1 (4 pts), boolean chains 2, 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.
FrameImageExporter.export_frame_single_camera (cognitive 29) genesis/utils/image_exporter.py:137— FrameImageExporter.export_frame_single_camera has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 2 (4 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.
misc.sanitize_index (cognitive 29) genesis/utils/misc.py:1311— misc.sanitize_index has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 3 (6 pts), boolean chains 5, error handling 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.
MouseInteractionPlugin.on_draw (cognitive 29) genesis/vis/viewer_plugins/plugins/mouse_interaction.py:220— MouseInteractionPlugin.on_draw has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 2 (5 pts), boolean chains 3, ternaries 1 (2 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.
KinematicEntityDescription._load_mesh (cognitive 28) REDACTED:820— KinematicEntityDescription._load_mesh has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 3 (7 pts), boolean chains 1 (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.
InteractiveScene._apply_rebuild (cognitive 28) genesis/engine/interactive_scene.py:228— InteractiveScene._apply_rebuild has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 4 (6 pts), boolean chains 4, ternaries 3 (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.
inverse_kinematics.func_integrate_dq_scratch (cognitive 28) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:387— inverse_kinematics.func_integrate_dq_scratch has cognitive complexity 28 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (9 pts), ternaries 3 (9 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.
backward.kernel_manual_add_frictionloss_constraints_bw (cognitive 28) genesis/engine/solvers/rigid/constraint/backward.py:613— backward.kernel_manual_add_frictionloss_constraints_bw has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 3 (12 pts), loops 4 (10 pts), if/else 1 (5 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.
RasterizerContext.update_pbd (cognitive 28) genesis/vis/rasterizer_context.py:986— RasterizerContext.update_pbd has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 2 (5 pts) (nesting depth added 20). 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.
Alarm.fetch_wandb_data (cognitive 27) .github/workflows/scripts/alarm.py:281— Alarm.fetch_wandb_data has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (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.
epa.func_epa_horizon (cognitive 27) genesis/engine/solvers/rigid/collider/epa.py:259— epa.func_epa_horizon has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (3 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.
solver._func_update_efc_force (cognitive 27) genesis/engine/solvers/rigid/constraint/solver.py:5303— solver._func_update_efc_force has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (9 pts), ternaries 2 (4 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.
mjcf.parse_equalities (cognitive 27) REDACTED:780— mjcf.parse_equalities has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (6 pts), ternaries 2 (6 pts), boolean chains 1 (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.
terrain.parse_terrain (cognitive 27) REDACTED:19— terrain.parse_terrain has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (2 pts), ternaries 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.
KinematicEntity.inverse_kinematics_multilink (cognitive 26) genesis/engine/entities/rigid_entity/rigid_entity.py:1453— KinematicEntity.inverse_kinematics_multilink has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 7 (9 pts), loops 2, boolean chains 1 (nesting depth added 5). 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.
Sensor.__init_subclass__ (cognitive 26) genesis/engine/sensors/base_sensor.py:204— Sensor.__init_subclass__ has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 7, 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.
contact_force._kernel_get_contacts_forces (cognitive 26) genesis/engine/sensors/contact_force.py:62— contact_force._kernel_get_contacts_forces has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 3 (8 pts), boolean chains 3 (nesting depth added 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.
fem_solver.func_accumulate_vertices (cognitive 26) genesis/engine/solvers/fem_solver.py:2314— fem_solver.func_accumulate_vertices has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 3, loops 2 (3 pts), ternaries 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.
forward_dynamics.func_midpoint_eligible (cognitive 26) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1846— forward_dynamics.func_midpoint_eligible has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 3 (7 pts), boolean chains 4, loops 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.
solver.func_compute_island_envelope (cognitive 26) genesis/engine/solvers/rigid/constraint/solver.py:2343— solver.func_compute_island_envelope has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 8 (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.
solver.func_add_cone_hessian_block_coop (cognitive 26) genesis/engine/solvers/rigid/constraint/solver.py:2473— solver.func_add_cone_hessian_block_coop has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 3 (9 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.
solver.func_hessian_and_cholesky_factor_incremental_batch (cognitive 26) genesis/engine/solvers/rigid/constraint/solver.py:4314— solver.func_hessian_and_cholesky_factor_incremental_batch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 15). 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.
OffscreenRenderer.render (cognitive 26) genesis/ext/pyrender/offscreen.py:65— OffscreenRenderer.render has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 6 (nesting depth added 2). 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.
data._size_names (cognitive 26) REDACTED:621— data._size_names has cognitive complexity 26 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 2 (8 pts), loops 3 (7 pts), boolean chains 3 (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.
linalg.mat_inverse (cognitive 26) genesis/utils/linalg.py:37— linalg.mat_inverse has cognitive complexity 26 (threshold 15). Drivers by points: loops 10 (22 pts), if/else 2 (4 pts) (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.
misc.qd_to_numpy (cognitive 26) genesis/utils/misc.py:1036— misc.qd_to_numpy has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 2 (5 pts), ternaries 2 (5 pts), boolean chains 1 (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.
particle._compute_emission_potentials (cognitive 26) genesis/utils/particle.py:772— particle._compute_emission_potentials has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 6 (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.
Rasterizer.destroy (cognitive 26) genesis/vis/rasterizer.py:155— Rasterizer.destroy has cognitive complexity 26 (threshold 15). Drivers by points: error handling 3 (10 pts), if/else 5 (10 pts), loops 3 (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.
RasterizerContext.draw_rigid (cognitive 26) genesis/vis/rasterizer_context.py:719— RasterizerContext.draw_rigid has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 4 (11 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.
Viewer.build (cognitive 26) genesis/vis/viewer.py:79— Viewer.build has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (21 pts), error handling 1 (2 pts), ternaries 2, 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.
JointEqualityHandler.compute_regularization (cognitive 25) genesis/engine/couplers/sap_coupler.py:5314— JointEqualityHandler.compute_regularization has cognitive complexity 25 (threshold 15). Drivers by points: loops 9 (15 pts), if/else 4 (10 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.
KinematicEntityDescription._resolve_geoms (cognitive 25) REDACTED:1537— KinematicEntityDescription._resolve_geoms has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5 (9 pts), boolean chains 4 (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.
KinematicEntityDescription._resolve_inertial (cognitive 25) REDACTED:1616— KinematicEntityDescription._resolve_inertial has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3 (7 pts), boolean chains 4, 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.
ElastomerTaxelSensor.build (cognitive 25) genesis/engine/sensors/point_cloud_tactile.py:1689— ElastomerTaxelSensor.build has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 5 (10 pts), loops 2 (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.
KinematicSolver.set_dofs_velocity (cognitive 25) genesis/engine/solvers/kinematic_solver.py:1033— KinematicSolver.set_dofs_velocity has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 2 (4 pts), boolean chains 3 (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.
JITRenderer.update_context (cognitive 25) genesis/ext/pyrender/jit_render.py:358— JITRenderer.update_context has cognitive complexity 25 (threshold 15). Drivers by points: loops 11 (14 pts), if/else 4 (7 pts), boolean chains 4 (nesting depth added 6). 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.
LinePlotHelper.process (cognitive 25) genesis/recorders/plotters.py:171— LinePlotHelper.process has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (10 pts), error handling 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.
serialization._export_value (cognitive 25) REDACTED:370— serialization._export_value has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 5). 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.
serialization.load (cognitive 25) REDACTED:611— serialization.load has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 4, boolean chains 3, 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.
usd_stage._find_connected_components (cognitive 25) genesis/utils/usd/usd_stage.py:56— usd_stage._find_connected_components has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, ternaries 2 (4 pts), loops 3 (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.
sap_coupler.func_one_pcg_iter (cognitive 24) genesis/engine/couplers/sap_coupler.py:4595— sap_coupler.func_one_pcg_iter has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 5, loops 1, ternaries 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.
gjk.func_gjk_intersect (cognitive 24) genesis/engine/solvers/rigid/collider/gjk.py:654— gjk.func_gjk_intersect has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 5 (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.
gjk.func_search_valid_simplex_vertex (cognitive 24) genesis/engine/solvers/rigid/collider/gjk.py:1422— gjk.func_search_valid_simplex_vertex has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 5 (14 pts), if/else 3 (6 pts), loops 3 (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.
backward.kernel_compute_gradients (cognitive 24) genesis/engine/solvers/rigid/constraint/backward.py:159— backward.kernel_compute_gradients has cognitive complexity 24 (threshold 15). Drivers by points: loops 7 (12 pts), ternaries 3 (10 pts), if/else 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.
solver_breakdown._func_update_qfrc_constraint_per_dof (cognitive 24) genesis/engine/solvers/rigid/constraint/solver_breakdown.py:127— solver_breakdown._func_update_qfrc_constraint_per_dof has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 15). 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.
trajectory._encode_frames (cognitive 24) genesis/recorders/trajectory.py:395— trajectory._encode_frames has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 1 (4 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 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.
geom.trans_R_to_T (cognitive 24) genesis/utils/geom.py:1320— geom.trans_R_to_T has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 5 (9 pts), boolean chains 3 (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.
particle._rasterize_spheres (cognitive 24) genesis/utils/particle.py:497— particle._rasterize_spheres has cognitive complexity 24 (threshold 15). Drivers by points: loops 9 (16 pts), if/else 2 (8 pts) (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.
serialization._redact_paths (cognitive 24) REDACTED:551— serialization._redact_paths has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (6 pts), loops 2 (5 pts), boolean chains 2, error handling 1 (2 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.
IPCCoupler._setup_coupling_config (cognitive 23) genesis/engine/couplers/ipc_coupler/coupler.py:293— IPCCoupler._setup_coupling_config has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (21 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.
Solver._sanitize_io_variables (cognitive 23) genesis/engine/solvers/base_solver.py:592— Solver._sanitize_io_variables has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6, ternaries 2 (3 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.
accessor.kernel_wake_up_entities_held_by_links (cognitive 23) genesis/engine/solvers/rigid/abd/accessor.py:93— accessor.kernel_wake_up_entities_held_by_links has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 3 (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.
forward_kinematics.func_update_geoms (cognitive 23) genesis/engine/solvers/rigid/abd/forward_kinematics.py:662— forward_kinematics.func_update_geoms has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (5 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.
gjk.func_gjk_subdistance_2d (cognitive 23) genesis/engine/solvers/rigid/collider/gjk.py:931— gjk.func_gjk_subdistance_2d has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (9 pts), boolean chains 1 (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.
sph_solver.kernel_compute_rho_and_dfsph_factor (cognitive 23) genesis/engine/solvers/sph_solver.py:936— sph_solver.kernel_compute_rho_and_dfsph_factor has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (5 pts), boolean chains 1 (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.
geom._tc_polar (cognitive 23) genesis/utils/geom.py:1600— geom._tc_polar has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 3 (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.
particle._find_neighbors (cognitive 23) genesis/utils/particle.py:636— particle._find_neighbors has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (13 pts), loops 4 (10 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.
RRT._kernel_rrt_step2 (cognitive 23) genesis/utils/path_planning.py:467— RRT._kernel_rrt_step2 has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 2 (5 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.
urdf.merge_fixed_links (cognitive 23) REDACTED:481— urdf.merge_fixed_links has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 5 (8 pts), boolean chains 1 (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.
watertighten._build_edge_component_table (cognitive 23) genesis/utils/watertighten.py:197— watertighten._build_edge_component_table has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (18 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.
sap_coupler.func_inverse_psd6 (cognitive 22) genesis/engine/couplers/sap_coupler.py:1180— sap_coupler.func_inverse_psd6 has cognitive complexity 22 (threshold 15). Drivers by points: loops 7 (17 pts), if/else 2 (5 pts) (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.
sap_coupler.func_compute_constraints (cognitive 22) genesis/engine/couplers/sap_coupler.py:4015— sap_coupler.func_compute_constraints has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 11). 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.
RigidJointDescription.__post_init__ (cognitive 22) REDACTED:198— RigidJointDescription.__post_init__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (16 pts), ternaries 2 (6 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.
manual_bw.kernel_manual_compute_qacc_bw (cognitive 22) genesis/engine/solvers/rigid/abd/manual_bw.py:434— manual_bw.kernel_manual_compute_qacc_bw has cognitive complexity 22 (threshold 15). Drivers by points: loops 10 (22 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.
multi_contact.func_potential_mesh_normals (cognitive 22) genesis/engine/solvers/rigid/collider/multi_contact.py:474— multi_contact.func_potential_mesh_normals has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, 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.
backward.kernel_solve_adjoint_u (cognitive 22) genesis/engine/solvers/rigid/constraint/backward.py:101— backward.kernel_solve_adjoint_u has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 5 (8 pts), boolean chains 1 (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.
island.func_group_constraints_by_island (cognitive 22) genesis/engine/solvers/rigid/constraint/island.py:101— island.func_group_constraints_by_island has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 5 (10 pts), boolean chains 1 (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.
ConstraintSolver.get_weld_constraints (cognitive 22) genesis/engine/solvers/rigid/constraint/solver.py:467— ConstraintSolver.get_weld_constraints has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (9 pts), ternaries 1 (2 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.
ImGuiOverlayPlugin._render_sim_controls (cognitive 22) genesis/ext/pyrender/overlay/plugin.py:450— ImGuiOverlayPlugin._render_sim_controls has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 5 (7 pts), boolean chains 1 (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.
types.build_entity_joint_data (cognitive 22) genesis/ext/pyrender/overlay/types.py:36— types.build_entity_joint_data has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), ternaries 1 (4 pts), boolean chains 1 (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.
Viewer.on_close (cognitive 22) genesis/ext/pyrender/viewer.py:646— Viewer.on_close has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 6 (7 pts), loops 2 (3 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.
Recorder.sync (cognitive 22) genesis/recorders/base_recorder.py:187— Recorder.sync has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 2 (4 pts), loops 1 (2 pts), boolean chains 1 (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.
misc.get_device (cognitive 22) genesis/utils/misc.py:299— misc.get_device has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3 (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.
simt.qd_lane_local_get (cognitive 22) genesis/utils/simt.py:122— simt.qd_lane_local_get has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (6 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.
urdf.principal_axes_rot (cognitive 22) REDACTED:534— urdf.principal_axes_rot has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 5 (8 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.
UsdContext.replace_asset_symlinks (cognitive 22) genesis/utils/usd/usd_context.py:445— UsdContext.replace_asset_symlinks has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (8 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.
RasterizerContext.on_pbd (cognitive 22) genesis/vis/rasterizer_context.py:919— RasterizerContext.on_pbd has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (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.
bvh._func_fit_tree_block (cognitive 21) genesis/engine/bvh.py:367— bvh._func_fit_tree_block has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (4 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.
HybridEntity.__init__ (cognitive 21) REDACTED:66— HybridEntity.__init__ has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (20 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.
RigidEntity.attach (cognitive 21) genesis/engine/entities/rigid_entity/rigid_entity.py:1749— RigidEntity.attach has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (8 pts), ternaries 1 (4 pts), boolean chains 1 (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.
rigid_entity.compute_forward_kinematics (cognitive 21) genesis/engine/entities/rigid_entity/rigid_entity.py:56— rigid_entity.compute_forward_kinematics has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (10 pts), loops 5 (7 pts), if/else 2 (3 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.
forward_kinematics.func_update_verts_for_geom (cognitive 21) genesis/engine/solvers/rigid/abd/forward_kinematics.py:964— forward_kinematics.func_update_verts_for_geom has cognitive complexity 21 (threshold 15). Drivers by points: loops 3 (11 pts), if/else 5 (10 pts) (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.
box_contact.func_plane_box_contact (cognitive 21) genesis/engine/solvers/rigid/collider/box_contact.py:107— box_contact.func_plane_box_contact has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 1 (3 pts) (nesting depth added 15). 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.
broadphase.func_collision_clear (cognitive 21) genesis/engine/solvers/rigid/collider/broadphase.py:75— broadphase.func_collision_clear has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts), ternaries 1 (3 pts), boolean chains 1 (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.
Collider.__init__ (cognitive 21) genesis/engine/solvers/rigid/collider/collider.py:73— Collider.__init__ has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 5). 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.
epa.func_safe_attach_face_to_polytope (cognitive 21) genesis/engine/solvers/rigid/collider/epa.py:1313— epa.func_safe_attach_face_to_polytope has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 pts), boolean chains 1 (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.
narrowphase._func_multicontact_accept (cognitive 21) genesis/engine/solvers/rigid/collider/narrowphase.py:3798— narrowphase._func_multicontact_accept has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 1 (2 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.
RigidSolver._set_dofs_info (cognitive 21) genesis/engine/solvers/rigid/rigid_solver.py:2315— RigidSolver._set_dofs_info has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (5 pts), loops 2 (4 pts), boolean chains 2 (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.
sph_solver.func_wall_volume (cognitive 21) genesis/engine/solvers/sph_solver.py:613— sph_solver.func_wall_volume has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (7 pts), boolean chains 3, ternaries 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.
_trimesh_patch.parse_mtl (cognitive 21) genesis/ext/_trimesh_patch.py:293— _trimesh_patch.parse_mtl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 2 (6 pts), loops 1 (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.
_trimesh_patch._parse_vertices (cognitive 21) genesis/ext/_trimesh_patch.py:539— _trimesh_patch._parse_vertices has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 5). 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.
JITRenderer.set_light (cognitive 21) genesis/ext/pyrender/jit_render.py:453— JITRenderer.set_light has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (20 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.
Renderer._forward_pass (cognitive 21) genesis/ext/pyrender/renderer.py:369— Renderer._forward_pass has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 1 (2 pts), boolean chains 1, ternaries 1 (nesting depth added 5). 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.
URDF._validate_graph (cognitive 21) REDACTED:3790— URDF._validate_graph has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 6 (10 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.
BatchTexture.from_images (cognitive 21) genesis/options/textures.py:303— BatchTexture.from_images has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 2 (4 pts) (nesting depth added 6). 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.
Trajectory.play (cognitive 21) genesis/recorders/trajectory.py:1271— Trajectory.play has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (7 pts), loops 2 (3 pts), boolean chains 2 (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.
data.check_data (cognitive 21) REDACTED:893— data.check_data has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 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.
_main.launch (cognitive 20) genesis/_main.py:14— _main.launch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (4 pts), ternaries 1 (3 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.
generate_tower._auto_smooth (cognitive 20) genesis/assets/tower/generate_tower.py:61— generate_tower._auto_smooth has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 3 (9 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.
FEMSolver._solve_on_host (cognitive 20) genesis/engine/solvers/fem_solver.py:998— FEMSolver._solve_on_host has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 pts), ternaries 2 (3 pts), boolean chains 2 (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.
misc.kernel_init_link_fields (cognitive 20) genesis/engine/solvers/rigid/abd/misc.py:334— misc.kernel_init_link_fields has cognitive complexity 20 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (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.
Collider._init_config (cognitive 20) genesis/engine/solvers/rigid/collider/collider.py:174— Collider._init_config has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6 (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.
linesearch.func_cone_head_kinks (cognitive 20) genesis/engine/solvers/rigid/constraint/linesearch.py:213— linesearch.func_cone_head_kinks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (6 pts), ternaries 1 (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.
solver.func_wrap_cone_hessian (cognitive 20) genesis/engine/solvers/rigid/constraint/solver.py:2529— solver.func_wrap_cone_hessian has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (6 pts), boolean chains 2 (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.
solver.func_update_cone_free_hessian_flip (cognitive 20) genesis/engine/solvers/rigid/constraint/solver.py:2674— solver.func_update_cone_free_hessian_flip has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 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.
solver.func_solve_iter (cognitive 20) genesis/engine/solvers/rigid/constraint/solver.py:5815— solver.func_solve_iter has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (4 pts) (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.
solver.func_update_contact_force (cognitive 20) genesis/engine/solvers/rigid/constraint/solver.py:6026— solver.func_update_contact_force has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 4 (7 pts), boolean chains 1 (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.
RigidSolver.substep (cognitive 20) genesis/engine/solvers/rigid/rigid_solver.py:1317— RigidSolver.substep has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5 (nesting depth added 4). 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.
ImGuiOverlayPlugin._render_visualization (cognitive 20) genesis/ext/pyrender/overlay/plugin.py:522— ImGuiOverlayPlugin._render_visualization has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 3 (6 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.
Scene.__init__ (cognitive 20) genesis/ext/pyrender/scene.py:46— Scene.__init__ has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (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.
kernel_writes._find_callee (cognitive 20) genesis/grad/kernel_writes.py:146— kernel_writes._find_callee has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 3 (5 pts), boolean chains 4, ternaries 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.
data._opt_in_sizes (cognitive 20) REDACTED:291— data._opt_in_sizes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (6 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.
misc.qd_zero_grad (cognitive 20) genesis/utils/misc.py:1249— misc.qd_zero_grad has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 1 (4 pts), loops 2 (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.
serialization.declared_schema (cognitive 20) REDACTED:269— serialization.declared_schema has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (7 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.
simt.qd_lane_local_set (cognitive 20) genesis/utils/simt.py:151— simt.qd_lane_local_set has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (8 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.
watertighten._neighbors (cognitive 20) genesis/utils/watertighten.py:570— watertighten._neighbors has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 3 (6 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.
watertighten._glue_manifold_corners (cognitive 20) genesis/utils/watertighten.py:1125— watertighten._glue_manifold_corners has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (7 pts), if/else 2 (6 pts), ternaries 2 (6 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.
Visualizer.update_visual_states (cognitive 20) genesis/vis/visualizer.py:271— Visualizer.update_visual_states has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts), boolean chains 1, ternaries 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.
List.__repr__colorized__ (cognitive 19) genesis/datatypes.py:76— List.__repr__colorized__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (6 pts), error handling 1 (2 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.
sap_coupler.func_compute_rigid_dof (cognitive 19) genesis/engine/couplers/sap_coupler.py:4376— sap_coupler.func_compute_rigid_dof has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 5). 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.
sap_coupler.func_init_pcg_solve (cognitive 19) genesis/engine/couplers/sap_coupler.py:4463— sap_coupler.func_init_pcg_solve has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 4, loops 3 (4 pts), ternaries 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.
Emitter.emit (cognitive 19) genesis/engine/entities/emitter.py:45— Emitter.emit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1, ternaries 1 (nesting depth added 4). 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.
kinematic_tactile._func_query_contact_depth (cognitive 19) genesis/engine/sensors/kinematic_tactile.py:182— kinematic_tactile._func_query_contact_depth has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (13 pts), boolean chains 5, loops 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.
KinematicSolver._init_tree_fields (cognitive 19) genesis/engine/solvers/kinematic_solver.py:471— KinematicSolver._init_tree_fields has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (5 pts), boolean chains 2 (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.
mpm_solver.func_sort_particles (cognitive 19) genesis/engine/solvers/mpm_solver.py:1073— mpm_solver.func_sort_particles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (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.
box_contact.func_sphere_box_contact (cognitive 19) genesis/engine/solvers/rigid/collider/box_contact.py:21— box_contact.func_sphere_box_contact has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (9 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.
contact.func_contact_group_by_normal (cognitive 19) genesis/engine/solvers/rigid/collider/contact.py:1055— contact.func_contact_group_by_normal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 5 (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.
ConstraintSolver.__init__ (cognitive 19) genesis/engine/solvers/rigid/constraint/solver.py:148— ConstraintSolver.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (5 pts), loops 2 (4 pts), ternaries 4 (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.
solver.func_equality_link_rows (cognitive 19) genesis/engine/solvers/rigid/constraint/solver.py:1251— solver.func_equality_link_rows has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 5 (8 pts), ternaries 2 (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.
RigidSolver.__init__ (cognitive 19) genesis/engine/solvers/rigid/rigid_solver.py:212— RigidSolver.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, ternaries 2 (4 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.
ImGuiOverlayPlugin._render_joints_euler_mode (cognitive 19) genesis/ext/pyrender/overlay/plugin.py:1153— ImGuiOverlayPlugin._render_joints_euler_mode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (3 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.
CSVFileWriter.process (cognitive 19) genesis/recorders/file_writers.py:107— CSVFileWriter.process has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (5 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.
TrajectoryFileWriter.cleanup (cognitive 19) genesis/recorders/trajectory.py:971— TrajectoryFileWriter.cleanup has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), 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.
hybrid.reduce_graph (cognitive 19) genesis/utils/hybrid.py:67— hybrid.reduce_graph has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (5 pts), 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.
mesh.surface_uvs_to_trimesh_visual (cognitive 19) genesis/utils/mesh.py:449— mesh.surface_uvs_to_trimesh_visual has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 1 (3 pts), boolean chains 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.
mjcf.parse_xml (cognitive 19) REDACTED:224— mjcf.parse_xml has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, ternaries 2 (3 pts), 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.
BatchRenderer.render (cognitive 19) genesis/vis/batch_renderer.py:354— BatchRenderer.render has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, ternaries 2 (3 pts), loops 2 (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.
Camera.update_following (cognitive 19) genesis/vis/camera.py:330— Camera.update_following has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2, loops 1, ternaries 1 (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.
Rasterizer.render_camera (cognitive 19) genesis/vis/rasterizer.py:70— Rasterizer.render_camera has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, ternaries 1 (nesting depth added 4). 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.
Visualizer.__init__ (cognitive 19) genesis/vis/visualizer.py:33— Visualizer.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 2 (3 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.
IPCCoupler._post_advance_external_articulation (cognitive 18) genesis/engine/couplers/ipc_coupler/coupler.py:1040— IPCCoupler._post_advance_external_articulation has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 3 (5 pts), ternaries 1 (2 pts) (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.
sap_coupler.func_init_unconstrained_gradient (cognitive 18) genesis/engine/couplers/sap_coupler.py:3774— sap_coupler.func_init_unconstrained_gradient has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 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.
sap_coupler.func_compute_fem_vertex (cognitive 18) genesis/engine/couplers/sap_coupler.py:4173— sap_coupler.func_compute_fem_vertex has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 4). 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.
KinematicEntityDescription.resolve (cognitive 18) REDACTED:417— KinematicEntityDescription.resolve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, loops 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.
point_cloud_tactile._kernel_elastomer_dilate_accumulate (cognitive 18) genesis/engine/sensors/point_cloud_tactile.py:1148— point_cloud_tactile._kernel_elastomer_dilate_accumulate has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 3 (7 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.
SensorManager.read_sensors (cognitive 18) genesis/engine/sensors/sensor_manager.py:437— SensorManager.read_sensors has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (6 pts), loops 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.
temperature._qd_polygon_area_from_points_3d (cognitive 18) genesis/engine/sensors/temperature.py:133— temperature._qd_polygon_area_from_points_3d has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 3 (4 pts), ternaries 1 (2 pts), 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.
fem_solver.func_end_newton (cognitive 18) genesis/engine/solvers/fem_solver.py:2774— fem_solver.func_end_newton has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), ternaries 2, 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.
KinematicSolver.set_qpos (cognitive 18) genesis/engine/solvers/kinematic_solver.py:1001— KinematicSolver.set_qpos has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 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.
forward_dynamics.func_compute_mass_matrix_and_link_force (cognitive 18) genesis/engine/solvers/rigid/abd/forward_dynamics.py:362— forward_dynamics.func_compute_mass_matrix_and_link_force has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 5 (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.
forward_kinematics.func_forward_velocity (cognitive 18) genesis/engine/solvers/rigid/abd/forward_kinematics.py:901— forward_kinematics.func_forward_velocity has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (8 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.
contact.func_contact_is_before (cognitive 18) genesis/engine/solvers/rigid/collider/contact.py:933— contact.func_contact_is_before has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), boolean chains 2 (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.
epa.func_epa_init_polytope_2d (cognitive 18) genesis/engine/solvers/rigid/collider/epa.py:427— epa.func_epa_init_polytope_2d has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 5 (6 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.
solver.kernel_get_equality_constraints (cognitive 18) genesis/engine/solvers/rigid/constraint/solver.py:587— solver.kernel_get_equality_constraints has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 4 (8 pts) (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.
solver.func_rank_batch_update_island (cognitive 18) genesis/engine/solvers/rigid/constraint/solver.py:3971— solver.func_rank_batch_update_island has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), ternaries 1 (3 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.
solver.func_factor_island_incremental_batch (cognitive 18) genesis/engine/solvers/rigid/constraint/solver.py:4015— solver.func_factor_island_incremental_batch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 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.
solver._func_update_cost_coop (cognitive 18) genesis/engine/solvers/rigid/constraint/solver.py:5361— solver._func_update_cost_coop has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (5 pts), boolean chains 3 (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.
solver._initialize_Jaref_parallel (cognitive 18) genesis/engine/solvers/rigid/constraint/solver.py:5564— solver._initialize_Jaref_parallel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (7 pts), ternaries 1 (2 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.
Renderer._normal_pass (cognitive 18) genesis/ext/pyrender/renderer.py:503— Renderer._normal_pass has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), ternaries 1 (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.
Joint.get_child_pose (cognitive 18) REDACTED:2312— Joint.get_child_pose has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (18 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.
Link.collision_mesh (cognitive 18) REDACTED:2608— Link.collision_mesh has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (5 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.
raycaster._generate_uniform_angles (cognitive 18) genesis/options/sensors/raycaster.py:102— raycaster._generate_uniform_angles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 1 (4 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.
RasterizerContext.update_fem (cognitive 18) genesis/vis/rasterizer_context.py:1077— RasterizerContext.update_fem has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (9 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.
Raytracer.add_surface (cognitive 18) genesis/vis/raytracer.py:377— Raytracer.add_surface has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 3 (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.
sap_coupler.func_clip_polygon_by_tet (cognitive 17) genesis/engine/couplers/sap_coupler.py:6311— sap_coupler.func_clip_polygon_by_tet has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (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.
Mesh.__init__ (cognitive 17) REDACTED:139— Mesh.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2 (nesting depth added 4). 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.
ProbeSensorMixin.build (cognitive 17) genesis/engine/sensors/probe.py:108— ProbeSensorMixin.build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 5 (nesting depth added 2). 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.
fem_solver.func_init_linesearch (cognitive 17) genesis/engine/solvers/fem_solver.py:2657— fem_solver.func_init_linesearch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), ternaries 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.
kinematic_solver._fill_base_link_geom_offsets (cognitive 17) genesis/engine/solvers/kinematic_solver.py:93— kinematic_solver._fill_base_link_geom_offsets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 1 (3 pts), boolean chains 1, loops 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.
diff.func_copy_next_to_curr (cognitive 17) genesis/engine/solvers/rigid/abd/diff.py:19— diff.func_copy_next_to_curr has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 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.
forward_dynamics.func_update_acc (cognitive 17) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1751— forward_dynamics.func_update_acc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 2 (5 pts), ternaries 1 (4 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.
forward_kinematics.func_COM_root (cognitive 17) genesis/engine/solvers/rigid/abd/forward_kinematics.py:322— forward_kinematics.func_COM_root has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 2 (6 pts), loops 2 (4 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.
island.func_sort_contacts_coop (cognitive 17) genesis/engine/solvers/rigid/constraint/island.py:897— island.func_sort_contacts_coop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (4 pts), boolean chains 3 (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.
linesearch.func_mv_jv_islands (cognitive 17) genesis/engine/solvers/rigid/constraint/linesearch.py:635— linesearch.func_mv_jv_islands has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 1 (2 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.
solver._func_disc_middle (cognitive 17) genesis/engine/solvers/rigid/constraint/solver.py:4626— solver._func_disc_middle has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 3 (4 pts) (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.
solver._func_cone_block_chol (cognitive 17) genesis/engine/solvers/rigid/constraint/solver.py:4753— solver._func_cone_block_chol has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 3 (5 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.
RigidSolver.set_qpos (cognitive 17) genesis/engine/solvers/rigid/rigid_solver.py:2187— RigidSolver.set_qpos has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 1 (2 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.
JITRenderer.update (cognitive 17) genesis/ext/pyrender/jit_render.py:293— JITRenderer.update has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (7 pts) (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.
EGLPlatform.init_context (cognitive 17) genesis/ext/pyrender/platforms/egl.py:140— EGLPlatform.init_context has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 4). 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.
URDF.__init__ (cognitive 17) REDACTED:2712— URDF.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 6 (nesting depth added 4). 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.
LinePlotHelper.__init__ (cognitive 17) genesis/recorders/plotters.py:121— LinePlotHelper.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 2 (6 pts), ternaries 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.
particle._interpolate_sdf (cognitive 17) genesis/utils/particle.py:131— particle._interpolate_sdf has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (9 pts), loops 3 (6 pts), boolean chains 1, if/else 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.
terrain.convert_heightfield_to_watertight_trimesh (cognitive 17) REDACTED:225— terrain.convert_heightfield_to_watertight_trimesh has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 7 (8 pts) (nesting depth added 2). 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.
usd_rigid_entity._compute_joint_prim_paths (cognitive 17) genesis/utils/usd/usd_rigid_entity.py:587— usd_rigid_entity._compute_joint_prim_paths has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 4, if/else 3 (4 pts), 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.
VideoEncoder.close (cognitive 17) genesis/utils/video_encoder.py:246— VideoEncoder.close has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 2 (5 pts), error handling 1 (3 pts), 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.
RasterizerContext.on_mpm (cognitive 17) genesis/vis/rasterizer_context.py:759— RasterizerContext.on_mpm has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 4 (8 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. This shape REPEATS in the file: one other method here (RasterizerContext.on_sph) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RasterizerContext.update_mpm (cognitive 17) genesis/vis/rasterizer_context.py:797— RasterizerContext.update_mpm has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (8 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. This shape REPEATS in the file: one other method here (RasterizerContext.update_sph) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RasterizerContext.on_sph (cognitive 17) genesis/vis/rasterizer_context.py:842— RasterizerContext.on_sph has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 4 (8 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. This shape REPEATS in the file: one other method here (RasterizerContext.on_mpm) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RasterizerContext.update_sph (cognitive 17) genesis/vis/rasterizer_context.py:880— RasterizerContext.update_sph has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (8 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. This shape REPEATS in the file: one other method here (RasterizerContext.update_mpm) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RasterizerContext.on_fem (cognitive 17) genesis/vis/rasterizer_context.py:1054— RasterizerContext.on_fem has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 2 (4 pts), ternaries 1 (4 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.
IPCCoupler._pre_advance_external_articulation (cognitive 16) genesis/engine/couplers/ipc_coupler/coupler.py:995— IPCCoupler._pre_advance_external_articulation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 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.
RigidFloorContactHandler.detection (cognitive 16) genesis/engine/couplers/sap_coupler.py:6854— RigidFloorContactHandler.detection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 1 (2 pts), boolean chains 1, 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.
RigidEntity.get_contacts (cognitive 16) genesis/engine/entities/rigid_entity/rigid_entity.py:3014— RigidEntity.get_contacts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, ternaries 2 (nesting depth added 2). 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.
Scene._reject_unexportable (cognitive 16) genesis/engine/scene.py:1608— Scene._reject_unexportable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 2 (6 pts), boolean chains 2, 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.
ProximityPoints.visit_leaf (cognitive 16) genesis/engine/sensors/point_cloud_tactile.py:352— ProximityPoints.visit_leaf has cognitive complexity 16 (threshold 15). Drivers by points: loops 2 (8 pts), if/else 3 (7 pts), boolean chains 1 (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.
ErrnoMixin.check_errno (cognitive 16) genesis/engine/solvers/base_solver.py:215— ErrnoMixin.check_errno has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 1 (3 pts), boolean chains 1, 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.
fem_solver.func_pcg_solve_per_env_block (cognitive 16) genesis/engine/solvers/fem_solver.py:2536— fem_solver.func_pcg_solve_per_env_block has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 2 (7 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.
mpm_solver.kernel_transfer_grid_to_particles_grad (cognitive 16) genesis/engine/solvers/mpm_solver.py:1406— mpm_solver.kernel_transfer_grid_to_particles_grad has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (8 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.
pbd_solver.kernel_solve_viscosity (cognitive 16) genesis/engine/solvers/pbd_solver.py:958— pbd_solver.kernel_solve_viscosity has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 1 (3 pts), boolean chains 1 (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.
forward_dynamics.func_compute_qacc (cognitive 16) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1820— forward_dynamics.func_compute_qacc has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (6 pts), ternaries 1 (3 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.
forward_kinematics.func_COM_link (cognitive 16) genesis/engine/solvers/rigid/abd/forward_kinematics.py:262— forward_kinematics.func_COM_link has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (3 pts), ternaries 2 (3 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.
misc.func_apply_link_external_wrench (cognitive 16) genesis/engine/solvers/rigid/abd/misc.py:952— misc.func_apply_link_external_wrench has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 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.
contact.func_contact_patch_end_coop (cognitive 16) genesis/engine/solvers/rigid/collider/contact.py:1013— contact.func_contact_patch_end_coop has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 pts), boolean chains 2, loops 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.
noslip.func_noslip (cognitive 16) genesis/engine/solvers/rigid/constraint/noslip.py:548— noslip.func_noslip has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1, ternaries 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.
solver.func_qfrc_scatter_sparse (cognitive 16) genesis/engine/solvers/rigid/constraint/solver.py:5099— solver.func_qfrc_scatter_sparse has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 3 (5 pts) (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.
sph_solver.func_segment_dist (cognitive 16) genesis/engine/solvers/sph_solver.py:579— sph_solver.func_segment_dist has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (12 pts), loops 1 (2 pts), boolean chains 1, if/else 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.
sph_solver.func_update_convergence (cognitive 16) genesis/engine/solvers/sph_solver.py:1309— sph_solver.func_update_convergence has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 1, 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.
ImGuiOverlayPlugin._render_control_panel (cognitive 16) genesis/ext/pyrender/overlay/plugin.py:412— ImGuiOverlayPlugin._render_control_panel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (4 pts), ternaries 1 (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.
Texture._add_to_context (cognitive 16) genesis/ext/pyrender/texture.py:167— Texture._add_to_context has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 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.
Viewer._setup_main_camera (cognitive 16) genesis/ext/pyrender/viewer.py:435— Viewer._setup_main_camera has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1 (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.
MPLVectorFieldPlotter.build (cognitive 16) genesis/recorders/plotters.py:731— MPLVectorFieldPlotter.build has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (5 pts), loops 3 (5 pts), ternaries 3 (4 pts), boolean chains 2 (nesting depth added 4). 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.
repr_base.get_public_name (cognitive 16) genesis/repr_base.py:8— repr_base.get_public_name has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (6 pts), if/else 2 (4 pts), error handling 1 (3 pts), ternaries 1 (3 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.
data._by_path (cognitive 16) REDACTED:645— data._by_path has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (3 pts), ternaries 1 (3 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.
mesh.create_box (cognitive 16) genesis/utils/mesh.py:1374— mesh.create_box has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 4 (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.
PathPlanner.interpolate_path (cognitive 16) genesis/utils/path_planning.py:155— PathPlanner.interpolate_path has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 1 (2 pts) (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.
watertighten._extract_dual_contour_mesh (cognitive 16) genesis/utils/watertighten.py:244— watertighten._extract_dual_contour_mesh has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (6 pts) (nesting depth added 5). 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.
Change coupling: diff_gjk.py ↔ rigid_solver.py genesis/engine/solvers/rigid/collider/diff_gjk.py:1— `genesis/engine/solvers/rigid/collider/diff_gjk.py` and `genesis/engine/solvers/rigid/rigid_solver.py` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `5153f8cb` [BUG FIX] Fix invalid gradients in differentiable rigid-body simulati…; `21dd9d54` [MISC] Remove '_decomp' suffix from rigid engine modules. (#2249) (at that commit the file was still `genesis/engine/solvers/rigid/diff_gjk.py`); `17f4e4b9` [BUG FIX] Various minor bug fixes. (#2222) (at that commit the files were still `genesis/engine/solvers/rigid/diff_gjk_decomp.py` and `genesis/engine/solvers/rigid/rigid_solver_decomp.py`) — run `git show` on any of them.
Near-duplicate member pair (96 shared lines) genesis/engine/solvers/rigid/collider/narrowphase.py:2801— genesis/engine/solvers/rigid/collider/narrowphase.py:2801-3284 | genesis/engine/solvers/rigid/collider/narrowphase.py:4241-4476 — These two members are variants of one another: 96 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 (84 shared lines) genesis/utils/path_planning.py:527— genesis/utils/path_planning.py:527-662 | genesis/utils/path_planning.py:909-1062 — These two members are variants of one another: 84 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 (63 shared lines) genesis/engine/solvers/rigid/rigid_solver.py:1757— genesis/engine/solvers/rigid/rigid_solver.py:1757-1874 | genesis/engine/solvers/rigid/rigid_solver.py:1881-2008 — These two members are variants of one another: 63 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 (54 shared lines) genesis/engine/solvers/rigid/constraint/linesearch.py:765— genesis/engine/solvers/rigid/constraint/linesearch.py:765-889 | genesis/engine/solvers/rigid/constraint/linesearch.py:957-1088 — These two members are variants of one another: 54 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 (25 shared lines) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1030— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1030-1084 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1096-1142 — These two members are variants of one another: 25 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 (23 shared lines) genesis/utils/particle.py:160— genesis/utils/particle.py:160-270 | genesis/utils/particle.py:773-847 — These two members are variants of one another: 23 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· Edited copy of a member (58 corresponding lines) · ×1
Edited copy of a member (58 corresponding lines) genesis/engine/solvers/rigid/constraint/solver.py:2412— genesis/engine/solvers/rigid/constraint/solver.py:2412-2469 | genesis/engine/solvers/rigid/constraint/solver.py:2581-2643 — These two members are one piece of code written twice and then edited apart: 58 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) · ×1
Edited copy of a member (44 corresponding lines) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:234— genesis/engine/solvers/rigid/abd/inverse_kinematics.py:234-277 | genesis/engine/solvers/rigid/abd/inverse_kinematics.py:291-347 — 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 (62 corresponding lines) · ×1
Edited copy of a member (62 corresponding lines) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1451— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1451-1512 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1527-1601 — These two members are one piece of code written twice and then edited apart: 62 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 (81 corresponding lines) · ×1
Edited copy of a member (81 corresponding lines) REDACTED:2986— REDACTED:2986-3069 | REDACTED:3072-3152 — These two members are one piece of code written twice and then edited apart: 81 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 (77 corresponding lines) · ×1
Edited copy of a member (77 corresponding lines) genesis/engine/solvers/rigid/collider/capsule_contact.py:20— genesis/engine/solvers/rigid/collider/capsule_contact.py:20-100 | genesis/engine/solvers/rigid/collider/capsule_contact.py:169-245 — These two members are one piece of code written twice and then edited apart: 77 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 (63 corresponding lines) · ×1
Edited copy of a member (63 corresponding lines) genesis/engine/sensors/kinematic_tactile.py:784— genesis/engine/sensors/kinematic_tactile.py:784-846 | genesis/engine/sensors/kinematic_tactile.py:1044-1128 — 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 (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) genesis/engine/solvers/kinematic_solver.py:1170— genesis/engine/solvers/kinematic_solver.py:1170-1204 | genesis/engine/solvers/rigid/rigid_solver.py:2632-2673 — These two members are one piece of code written twice and then edited apart: 35 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 (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) genesis/utils/geom.py:1110— genesis/utils/geom.py:1110-1141 | genesis/utils/geom.py:2079-2106 — These two members are one piece of code written twice and then edited apart: 28 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, 29+ corresponding lines) · ×1
Edited copies of one member (3 members, 29+ corresponding lines) genesis/engine/solvers/rigid/abd/accessor.py:284— genesis/engine/solvers/rigid/abd/accessor.py:284-314 | genesis/engine/solvers/rigid/abd/accessor.py:330-358 | genesis/engine/solvers/rigid/abd/accessor.py:373-402 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 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 (38 corresponding lines) · ×1
Edited copy of a member (38 corresponding lines) genesis/engine/solvers/rigid/collider/narrowphase.py:4497— genesis/engine/solvers/rigid/collider/narrowphase.py:4497-4537 | genesis/engine/solvers/rigid/collider/narrowphase.py:4794-4831 — 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 copies of one member (4 members, 17+ corresponding lines) · ×1
Edited copies of one member (4 members, 17+ corresponding lines) genesis/engine/solvers/rigid/rigid_solver.py:2474— genesis/engine/solvers/rigid/rigid_solver.py:2474-2490 | genesis/engine/solvers/rigid/rigid_solver.py:2494-2510 | genesis/engine/solvers/rigid/rigid_solver.py:2514-2532 | genesis/engine/solvers/rigid/rigid_solver.py:2536-2558 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) genesis/engine/solvers/rigid/constraint/solver.py:672— genesis/engine/solvers/rigid/constraint/solver.py:672-692 | genesis/engine/solvers/rigid/constraint/solver.py:699-718 — 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 copies of one member (3 members, 14+ corresponding lines) · ×1
Edited copies of one member (3 members, 14+ corresponding lines) genesis/engine/solvers/kinematic_solver.py:789— genesis/engine/solvers/kinematic_solver.py:789-802 | genesis/engine/solvers/kinematic_solver.py:819-832 | genesis/engine/solvers/rigid/rigid_solver.py:1256-1269 — 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 copy of a member (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) genesis/ext/pyrender/jit_render.py:1395— genesis/ext/pyrender/jit_render.py:1395-1417 | genesis/ext/pyrender/jit_render.py:1420-1442 — 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 copies of one member (5 members, 7+ corresponding lines) · ×1
Edited copies of one member (5 members, 7+ corresponding lines) genesis/engine/solvers/rigid/abd/accessor.py:538— genesis/engine/solvers/rigid/abd/accessor.py:538-544 | genesis/engine/solvers/rigid/abd/accessor.py:600-608 | genesis/engine/solvers/rigid/abd/accessor.py:619-625 | genesis/engine/solvers/rigid/abd/accessor.py:636-642 | genesis/engine/solvers/rigid/abd/accessor.py:653-661 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 21+ corresponding lines) · ×1
Edited copies of one member (3 members, 21+ corresponding lines) genesis/utils/particle.py:327— genesis/utils/particle.py:327-347 | genesis/utils/particle.py:351-371 | genesis/utils/particle.py:375-399 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 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 (25 corresponding lines) · ×1
Edited copy of a member (25 corresponding lines) genesis/engine/sensors/point_cloud_tactile.py:766— genesis/engine/sensors/point_cloud_tactile.py:766-796 | genesis/engine/sensors/surface_distance_probe.py:317-341 — These two members are one piece of code written twice and then edited apart: 25 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, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) genesis/engine/solvers/rigid/abd/accessor.py:70— genesis/engine/solvers/rigid/abd/accessor.py:70-89 | genesis/engine/solvers/rigid/abd/accessor.py:146-165 | genesis/engine/solvers/rigid/abd/accessor.py:255-265 — 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, 8+ corresponding lines) · ×1
Edited copies of one member (4 members, 8+ corresponding lines) genesis/engine/sensors/kinematic_tactile.py:849— genesis/engine/sensors/kinematic_tactile.py:849-856 | genesis/engine/sensors/kinematic_tactile.py:930-937 | genesis/engine/sensors/kinematic_tactile.py:1131-1138 | genesis/engine/sensors/point_cloud_tactile.py:2081-2088 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 4+ corresponding lines) · ×1
Edited copies of one member (6 members, 4+ corresponding lines) genesis/engine/solvers/rigid/rigid_solver.py:2850— genesis/engine/solvers/rigid/rigid_solver.py:2850-2853 | genesis/engine/solvers/rigid/rigid_solver.py:2872-2875 | genesis/engine/solvers/rigid/rigid_solver.py:2878-2881 | genesis/engine/solvers/rigid/rigid_solver.py:2884-2887 | genesis/engine/solvers/rigid/rigid_solver.py:2890-2893 | genesis/engine/solvers/rigid/rigid_solver.py:2896-2899 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (1 corresponding lines) · ×1
Edited copy of a member (1 corresponding lines) genesis/engine/entities/rigid_entity/rigid_joint.py:399— genesis/engine/entities/rigid_entity/rigid_joint.py:399-399 | genesis/engine/entities/rigid_entity/rigid_link.py:407-407 — These two members are one piece of code written twice and then edited apart: 1 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 (70–73 lines × 3) genesis/ext/pyrender/jit_render.py:896— genesis/ext/pyrender/jit_render.py:896-968 | genesis/ext/pyrender/jit_render.py:1034-1105 | genesis/ext/pyrender/jit_render.py:1172-1241 — 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 `genesis/ext/pyrender/jit_render.py:896` 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. 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 (47–54 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:902— genesis/engine/solvers/rigid/constraint/solver.py:902-955 | genesis/engine/solvers/rigid/constraint/solver.py:1130-1176 — 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 (53–54 lines × 2) genesis/utils/path_planning.py:610— genesis/utils/path_planning.py:610-662 | genesis/utils/path_planning.py:1009-1062 — 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 (34–51 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:528— genesis/engine/solvers/rigid/collider/narrowphase.py:528-578 | genesis/engine/solvers/rigid/collider/narrowphase.py:962-995 — 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 (44–46 lines × 2) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:504— genesis/engine/solvers/rigid/abd/inverse_kinematics.py:504-549 | genesis/engine/solvers/rigid/abd/inverse_kinematics.py:633-676 — 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 (43 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:2949— genesis/engine/solvers/rigid/collider/narrowphase.py:2949-2991 | genesis/engine/solvers/rigid/collider/narrowphase.py:4384-4426 — 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 (4–39 lines × 3) genesis/engine/couplers/sap_coupler.py:6478— genesis/engine/couplers/sap_coupler.py:6478-6516 | genesis/engine/couplers/sap_coupler.py:7060-7063 | genesis/engine/couplers/sap_coupler.py:7379-7415 — 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. 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. 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, `genesis/engine/couplers/sap_coupler.py:6516` calls `zero` and `genesis/engine/couplers/sap_coupler.py:7063` 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–34 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:486— genesis/engine/solvers/rigid/collider/narrowphase.py:486-519 | genesis/engine/solvers/rigid/collider/narrowphase.py:946-960 — 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–33 lines × 2) genesis/engine/solvers/rigid/collider/contact.py:1498— genesis/engine/solvers/rigid/collider/contact.py:1498-1530 | genesis/engine/solvers/rigid/collider/contact.py:1919-1943 — 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) genesis/engine/solvers/rigid/constraint/linesearch.py:829— genesis/engine/solvers/rigid/constraint/linesearch.py:829-861 | genesis/engine/solvers/rigid/constraint/linesearch.py:1034-1066 — 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 (31 lines × 3) genesis/engine/solvers/rigid/constraint/linesearch.py:829— genesis/engine/solvers/rigid/constraint/linesearch.py:829-859 | genesis/engine/solvers/rigid/constraint/linesearch.py:1034-1064 | genesis/engine/solvers/rigid/constraint/linesearch.py:1460-1490 — 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 (29–30 lines × 2) genesis/engine/sensors/kinematic_tactile.py:450— genesis/engine/sensors/kinematic_tactile.py:450-479 | genesis/engine/sensors/kinematic_tactile.py:555-583 — 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 (30 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:3196— genesis/engine/solvers/rigid/collider/narrowphase.py:3196-3225 | genesis/engine/solvers/rigid/collider/narrowphase.py:3696-3725 — 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 (24–29 lines × 2) genesis/engine/solvers/rigid/constraint/backward.py:1014— genesis/engine/solvers/rigid/constraint/backward.py:1014-1042 | genesis/engine/solvers/rigid/constraint/backward.py:1212-1235 — 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 (29 lines × 2) genesis/ext/pyrender/renderer.py:260— genesis/ext/pyrender/renderer.py:260-288 | genesis/ext/pyrender/renderer.py:294-322 — 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 (28–29 lines × 2) genesis/utils/usd/usd_rigid_entity.py:289— genesis/utils/usd/usd_rigid_entity.py:289-317 | genesis/utils/usd/usd_rigid_entity.py:332-359 — 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 (28 lines × 2) genesis/utils/tools.py:78— genesis/utils/tools.py:78-105 | genesis/utils/tools.py:114-141 — 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 `genesis/utils/tools.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. 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 (29–34 lines × 3) genesis/engine/solvers/rigid/collider/narrowphase.py:2901— genesis/engine/solvers/rigid/collider/narrowphase.py:2901-2929 | genesis/engine/solvers/rigid/collider/narrowphase.py:3326-3359 | genesis/engine/solvers/rigid/collider/narrowphase.py:4311-4342 — 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 (22–27 lines × 2) genesis/engine/solvers/rigid/rigid_solver.py:1834— genesis/engine/solvers/rigid/rigid_solver.py:1834-1860 | genesis/engine/solvers/rigid/rigid_solver.py:1973-1994 — 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 `genesis/engine/solvers/rigid/rigid_solver.py:1834` 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) genesis/engine/entities/particle_entity.py:141— genesis/engine/entities/particle_entity.py:141-165 | genesis/engine/entities/sph_entity.py:60-84 — 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 (24–25 lines × 2) genesis/engine/solvers/kinematic_solver.py:1176— genesis/engine/solvers/kinematic_solver.py:1176-1200 | genesis/engine/solvers/rigid/rigid_solver.py:2646-2669 — 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 `genesis/engine/solvers/kinematic_solver.py:1176` 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 (24 lines × 3) genesis/engine/solvers/rigid/collider/narrowphase.py:2944— genesis/engine/solvers/rigid/collider/narrowphase.py:2944-2967 | genesis/engine/solvers/rigid/collider/narrowphase.py:3369-3392 | genesis/engine/solvers/rigid/collider/narrowphase.py:4379-4402 — 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 (19–24 lines × 2) genesis/engine/solvers/kinematic_solver.py:964— genesis/engine/solvers/kinematic_solver.py:964-982 | genesis/engine/solvers/rigid/rigid_solver.py:1934-1957 — 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 `genesis/engine/solvers/kinematic_solver.py:964` 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 (35–36 lines × 2) genesis/engine/sensors/kinematic_tactile.py:323— genesis/engine/sensors/kinematic_tactile.py:323-358 | genesis/engine/sensors/kinematic_tactile.py:622-656 — 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 (18–21 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1492— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1492-1512 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1584-1601 — 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 `genesis/engine/solvers/rigid/abd/forward_dynamics.py:1492` 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–21 lines × 2) genesis/engine/solvers/rigid/collider/epa.py:500— genesis/engine/solvers/rigid/collider/epa.py:500-520 | genesis/engine/solvers/rigid/collider/epa.py:632-651 — 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 (19–20 lines × 3) genesis/engine/solvers/rigid/collider/capsule_contact.py:62— genesis/engine/solvers/rigid/collider/capsule_contact.py:62-81 | genesis/engine/solvers/rigid/collider/capsule_contact.py:132-150 | genesis/engine/solvers/rigid/collider/capsule_contact.py:214-232 — 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 (20 lines × 3) genesis/engine/solvers/rigid/collider/diff_gjk.py:494— genesis/engine/solvers/rigid/collider/diff_gjk.py:494-513 | genesis/engine/solvers/rigid/collider/epa.py:161-180 | genesis/engine/solvers/rigid/collider/epa.py:1093-1112 — 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–20 lines × 3) genesis/engine/solvers/rigid/collider/narrowphase.py:126— genesis/engine/solvers/rigid/collider/narrowphase.py:126-134 | genesis/engine/solvers/rigid/collider/narrowphase.py:912-920 | genesis/engine/solvers/rigid/collider/narrowphase.py:1305-1324 — 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 (18–20 lines × 2) genesis/engine/sensors/kinematic_tactile.py:101— genesis/engine/sensors/kinematic_tactile.py:101-118 | genesis/engine/sensors/kinematic_tactile.py:139-158 — 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 (16–20 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:825— genesis/engine/solvers/rigid/constraint/solver.py:825-840 | genesis/engine/solvers/rigid/constraint/solver.py:1044-1063 — 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 (17–19 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:1073— genesis/engine/sensors/point_cloud_tactile.py:1073-1091 | genesis/engine/sensors/point_cloud_tactile.py:1112-1128 — 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 (15–19 lines × 2) genesis/engine/solvers/sph_solver.py:1050— genesis/engine/solvers/sph_solver.py:1050-1064 | genesis/engine/solvers/sph_solver.py:1216-1234 — 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 (18 lines × 4) genesis/engine/entities/rigid_entity/rigid_entity.py:2616— genesis/engine/entities/rigid_entity/rigid_entity.py:2616-2633 | genesis/engine/entities/rigid_entity/rigid_entity.py:2638-2655 | genesis/engine/entities/rigid_entity/rigid_entity.py:2660-2678 | genesis/engine/entities/rigid_entity/rigid_entity.py:2683-2702 — 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.
Duplicated block (17–18 lines × 2) genesis/engine/sensors/kinematic_tactile.py:407— genesis/engine/sensors/kinematic_tactile.py:407-424 | genesis/engine/sensors/kinematic_tactile.py:679-695 — 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 (16–17 lines × 2) genesis/engine/solvers/rigid/constraint/backward.py:944— genesis/engine/solvers/rigid/constraint/backward.py:944-960 | genesis/engine/solvers/rigid/constraint/backward.py:1136-1151 — 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 `genesis/engine/solvers/rigid/constraint/backward.py:1136` 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 (4–16 lines × 4) genesis/engine/solvers/rigid/constraint/backward.py:920— genesis/engine/solvers/rigid/constraint/backward.py:920-933 | genesis/engine/solvers/rigid/constraint/backward.py:1084-1099 | genesis/engine/solvers/rigid/constraint/solver.py:1271-1274 | genesis/engine/solvers/rigid/constraint/solver.py:2011-2014 — 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. 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 (15–16 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:5276— genesis/engine/solvers/rigid/constraint/solver.py:5276-5290 | genesis/engine/solvers/rigid/constraint/solver_breakdown.py:38-53 — 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 `genesis/engine/solvers/rigid/constraint/solver.py:5276` 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–15 lines × 3) genesis/engine/couplers/sap_coupler.py:6486— genesis/engine/couplers/sap_coupler.py:6486-6499 | genesis/engine/couplers/sap_coupler.py:7035-7049 | genesis/engine/couplers/sap_coupler.py:7387-7400 — 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. 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 (15 lines × 3) genesis/engine/solvers/rigid/collider/collider.py:1234— genesis/engine/solvers/rigid/collider/collider.py:1234-1248 | genesis/engine/solvers/rigid/collider/collider.py:1335-1349 | genesis/engine/solvers/rigid/collider/collider.py:1391-1405 — 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 `genesis/engine/solvers/rigid/collider/collider.py:1234` 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–15 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:505— genesis/engine/sensors/point_cloud_tactile.py:505-519 | genesis/engine/sensors/point_cloud_tactile.py:521-533 — 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–15 lines × 2) genesis/engine/solvers/rigid/collider/contact.py:684— genesis/engine/solvers/rigid/collider/contact.py:684-698 | genesis/engine/solvers/rigid/collider/diff_gjk.py:706-716 — 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 (14 lines × 4) genesis/engine/sensors/kinematic_tactile.py:341— genesis/engine/sensors/kinematic_tactile.py:341-354 | genesis/engine/sensors/kinematic_tactile.py:461-474 | genesis/engine/sensors/kinematic_tactile.py:565-578 | genesis/engine/sensors/kinematic_tactile.py:639-652 — 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. 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 (10–14 lines × 3) genesis/engine/solvers/rigid/constraint/backward.py:498— genesis/engine/solvers/rigid/constraint/backward.py:498-508 | genesis/engine/solvers/rigid/constraint/backward.py:952-965 | genesis/engine/solvers/rigid/constraint/backward.py:1153-1162 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/solvers/rigid/constraint/backward.py:1163` calls `qd_vec3` and `genesis/engine/solvers/rigid/constraint/backward.py:509` 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 (8–14 lines × 2) genesis/engine/solvers/rigid/constraint/noslip.py:64— genesis/engine/solvers/rigid/constraint/noslip.py:64-77 | genesis/engine/solvers/rigid/constraint/noslip.py:105-112 — 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 lines × 2) genesis/ext/isaacgym/terrain_utils.py:15— genesis/ext/isaacgym/terrain_utils.py:15-40 | REDACTED:197-222 — 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 `genesis/ext/isaacgym/terrain_utils.py: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. 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 (10–13 lines × 3) genesis/engine/solvers/rigid/constraint/solver.py:2435— genesis/engine/solvers/rigid/constraint/solver.py:2435-2447 | genesis/engine/solvers/rigid/constraint/solver.py:2606-2617 | genesis/engine/solvers/rigid/constraint/solver.py:2757-2766 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/solvers/rigid/constraint/solver.py:2432` calls `static` and `genesis/engine/solvers/rigid/constraint/solver.py:2756` 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–14 lines × 3) genesis/ext/isaacgym/terrain_utils.py:377— genesis/ext/isaacgym/terrain_utils.py:377-387 | REDACTED:284-297 | REDACTED:333-343 — 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 (12–13 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:2810— genesis/engine/solvers/rigid/collider/narrowphase.py:2810-2822 | genesis/engine/solvers/rigid/collider/narrowphase.py:3481-3492 — 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 `genesis/engine/solvers/rigid/collider/narrowphase.py:2810` 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–12 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:2931— genesis/engine/solvers/rigid/collider/narrowphase.py:2931-2942 | genesis/engine/solvers/rigid/collider/narrowphase.py:4371-4377 — 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–11 lines × 2) genesis/engine/solvers/fem_solver.py:1347— genesis/engine/solvers/fem_solver.py:1347-1353 | genesis/engine/solvers/fem_solver.py:1454-1464 — 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 (4–11 lines × 5) genesis/engine/solvers/rigid/abd/forward_kinematics.py:378— genesis/engine/solvers/rigid/abd/forward_kinematics.py:378-381 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:919-922 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1221-1224 | genesis/engine/solvers/rigid/abd/manual_bw.py:237-252 | genesis/engine/solvers/rigid/abd/manual_bw.py:411-421 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `genesis/engine/solvers/rigid/abd/forward_kinematics.py:378` 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–10 lines × 3) genesis/engine/solvers/pbd_solver.py:890— genesis/engine/solvers/pbd_solver.py:890-898 | genesis/engine/solvers/pbd_solver.py:922-931 | genesis/engine/solvers/pbd_solver.py:961-970 — 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 (6–10 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:1269— genesis/engine/solvers/rigid/constraint/linesearch.py:1269-1274 | genesis/engine/solvers/rigid/constraint/linesearch.py:1383-1392 — 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 (8–10 lines × 2) genesis/engine/solvers/sph_solver.py:859— genesis/engine/solvers/sph_solver.py:859-868 | genesis/engine/solvers/sph_solver.py:950-957 — 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 × 3) genesis/engine/solvers/rigid/constraint/backward.py:458— genesis/engine/solvers/rigid/constraint/backward.py:458-465 | genesis/engine/solvers/rigid/constraint/solver.py:808-816 | genesis/engine/solvers/rigid/constraint/solver.py:1029-1037 — 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 (7 lines × 5) genesis/utils/particle.py:193— genesis/utils/particle.py:193-199 | genesis/utils/particle.py:207-213 | genesis/utils/particle.py:786-792 | genesis/utils/particle.py:802-808 | genesis/utils/particle.py:822-828 — 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.
Duplicated block (4–7 lines × 4) genesis/options/surfaces.py:424— genesis/options/surfaces.py:424-427 | genesis/options/surfaces.py:508-514 | genesis/options/surfaces.py:598-604 | genesis/options/surfaces.py:695-701 — 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 (5 lines × 5) genesis/engine/solvers/rigid/constraint/backward.py:551— genesis/engine/solvers/rigid/constraint/backward.py:551-555 | genesis/engine/solvers/rigid/constraint/backward.py:1010-1015 | genesis/engine/solvers/rigid/constraint/backward.py:1208-1213 | genesis/engine/solvers/rigid/constraint/solver.py:1082-1087 | genesis/engine/solvers/rigid/constraint/solver.py:1908-1913 — there are 5 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 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, `genesis/engine/solvers/rigid/constraint/backward.py:550` calls `qd_float` and `genesis/engine/solvers/rigid/constraint/backward.py:1009` 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 × 5) genesis/utils/particle.py:209— genesis/utils/particle.py:209-214 | genesis/utils/particle.py:244-249 | genesis/utils/particle.py:804-809 | genesis/utils/particle.py:824-829 | genesis/utils/particle.py:834-839 — 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.
Duplicated block (2–5 lines × 5) genesis/engine/sensors/camera.py:106— genesis/engine/sensors/camera.py:106-107 | genesis/engine/sensors/camera.py:294-295 | genesis/engine/sensors/camera.py:520-524 | genesis/engine/sensors/camera.py:618-622 | genesis/engine/sensors/camera.py:656-657 — 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. 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 (3–5 lines × 3) genesis/engine/solvers/rigid/abd/accessor.py:795— genesis/engine/solvers/rigid/abd/accessor.py:795-797 | genesis/engine/solvers/rigid/abd/accessor.py:813-817 | genesis/engine/solvers/rigid/abd/accessor.py:832-836 — 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.
Duplicated block (14 lines × 5) genesis/engine/entities/fem_entity.py:484— genesis/engine/entities/fem_entity.py:484-498 | genesis/engine/entities/fem_entity.py:502-515 | genesis/engine/entities/particle_entity.py:323-338 | genesis/engine/entities/particle_entity.py:374-389 | genesis/engine/entities/particle_entity.py:439-454 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart.
Near-duplicate member pair (38 shared lines) examples/sap_coupling/fem_fixed_constraint.py:14— examples/sap_coupling/fem_fixed_constraint.py:14-80 | examples/sap_coupling/fem_sphere_and_cube.py:8-71 — 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.
Near-duplicate member pair (29 shared lines) examples/rigid/ik_duck.py:9— examples/rigid/ik_duck.py:9-70 | examples/rigid/ik_franka.py:9-71 — These two members are variants of one another: 29 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 (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) examples/coupling/fem_cube_linked_with_arm.py:11— examples/coupling/fem_cube_linked_with_arm.py:11-130 | examples/coupling/grasp_soft_cube.py:9-104 | examples/rigid/control_franka.py:9-110 | examples/rigid/grasp_bottle.py:9-115 | examples/rigid/suction_cup.py:7-129 | examples/sensors/imu_franka.py:12-137 — 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 copies of one member (3 members, 60+ corresponding lines) · ×1
Edited copies of one member (3 members, 60+ corresponding lines) examples/coupling/cut_dragon.py:7— examples/coupling/cut_dragon.py:7-72 | examples/coupling/sph_mpm.py:8-71 | examples/coupling/sph_rigid.py:8-67 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 60 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, 34+ corresponding lines) · ×1
Edited copies of one member (3 members, 34+ corresponding lines) examples/rigid/gravity_compensation.py:7— examples/rigid/gravity_compensation.py:7-50 | examples/rigid/nonconvex_mesh.py:7-40 | examples/rigid/single_franka.py:7-42 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 34 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.
Duplicated block (27 lines × 2) examples/rigid/ik_custom_chain.py:9— examples/rigid/ik_custom_chain.py:9-35 | examples/rigid/ik_shadow_hand.py:9-35 — before extracting anything, compare `examples/rigid/ik_custom_chain.py` and `examples/rigid/ik_shadow_hand.py` 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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/ik_custom_chain.py: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 (25–26 lines × 2) examples/rigid/ik_custom_chain.py:25— examples/rigid/ik_custom_chain.py:25-50 | examples/rigid/ik_shadow_hand.py:46-70 — before extracting anything, compare `examples/rigid/ik_custom_chain.py` and `examples/rigid/ik_shadow_hand.py` 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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/ik_custom_chain.py:25` 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–17 lines × 2) examples/rigid/suction_cup.py:87— examples/rigid/suction_cup.py:87-98 | examples/rigid/suction_cup.py:108-124 — 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 `examples/rigid/suction_cup.py:108` 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–16 lines × 2) examples/rigid/diffik_controller.py:49— examples/rigid/diffik_controller.py:49-61 | examples/rigid/ik_franka.py:30-45 — before extracting anything, compare `examples/rigid/diffik_controller.py` and `examples/rigid/ik_franka.py` 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. 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 `examples/rigid/ik_franka.py: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/rigid/diffik_controller.py:49` calls `add_entity` and `examples/rigid/ik_franka.py:30` 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 (15 lines × 4) examples/rigid/accelerometer_duck.py:7— examples/rigid/accelerometer_duck.py:7-21 | examples/rigid/control_franka.py:9-23 | examples/rigid/control_mesh.py:7-21 | examples/rigid/set_phys_attr.py:9-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 all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples/rigid/accelerometer_duck.py: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 (14 lines × 3) examples/rigid/gravity_compensation.py:10— examples/rigid/gravity_compensation.py:10-23 | examples/rigid/nonconvex_mesh.py:10-23 | examples/rigid/single_franka.py:10-23 — before extracting anything, compare `examples/rigid/gravity_compensation.py` and `examples/rigid/nonconvex_mesh.py` 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. 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 `examples/rigid/gravity_compensation.py:10` 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 × 3) examples/rendering/moving_camera.py:15— examples/rendering/moving_camera.py:15-26 | examples/rigid/single_franka.py:15-27 | examples/rigid/single_franka_envs.py:26-38 — before extracting anything, compare `examples/rendering/moving_camera.py` and `examples/rigid/single_franka.py` as WHOLE FILES: this scan already matched 3 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. 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 `examples/rendering/moving_camera.py:15` 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 (22 lines × 3) examples/rigid/friction_breakaway.py:37— examples/rigid/friction_breakaway.py:37-58 | examples/rigid/rolling_coast.py:22-43 | examples/rigid/torsional_grasp.py:23-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 all 3 call sites, so a change lands once. 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 (11–12 lines × 2) examples/rendering/moving_camera.py:12— examples/rendering/moving_camera.py:12-23 | examples/rigid/closed_loop.py:26-36 — before extracting anything, compare `examples/rendering/moving_camera.py` and `examples/rigid/closed_loop.py` 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. 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 `examples/rendering/moving_camera.py:12` 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 × 2) examples/rigid/merge_entities.py:23— examples/rigid/merge_entities.py:23-34 | examples/rigid/screw_constraint.py:33-42 — 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 `examples/rigid/merge_entities.py: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. 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 (3–11 lines × 3) examples/sensors/imu_franka.py:15— examples/sensors/imu_franka.py:15-17 | examples/sensors/surface_distance_shadowhand.py:36-46 | examples/sensors/tactile_franka.py:187-197 — 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 `examples/sensors/surface_distance_shadowhand.py:36` 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, `examples/sensors/surface_distance_shadowhand.py:36` calls `add_argument` and `examples/sensors/imu_franka.py:15` 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 × 5) examples/coupling/cut_dragon.py:9— examples/coupling/cut_dragon.py:9-18 | examples/coupling/flush_cubes.py:10-19 | examples/coupling/sand_wheel.py:12-21 | examples/coupling/sph_mpm.py:10-19 | examples/coupling/water_wheel.py:16-25 — before extracting anything, compare `examples/coupling/cut_dragon.py` and `examples/coupling/flush_cubes.py` as WHOLE FILES: this scan already matched 4 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. 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 `examples/coupling/cut_dragon.py: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 (7–10 lines × 4) examples/rigid/franka_cube.py:61— examples/rigid/franka_cube.py:61-70 | examples/rigid/suction_cup.py:91-97 | examples/rigid/suction_cup.py:107-113 | examples/rigid/suction_cup.py:117-123 — 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.
Duplicated block (9 lines × 7) examples/coupling/cut_dragon.py:8— examples/coupling/cut_dragon.py:8-16 | examples/coupling/flush_cubes.py:9-17 | examples/coupling/sand_wheel.py:11-19 | examples/coupling/sph_mpm.py:9-17 | examples/coupling/sph_rigid.py:9-17 | examples/coupling/water_wheel.py:15-23 | examples/deformable/differentiable_push.py:11-19 — before extracting anything, compare `examples/coupling/cut_dragon.py` and `examples/coupling/flush_cubes.py` as WHOLE FILES: this scan already matched 4 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. 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 `examples/coupling/cut_dragon.py: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 (9 lines × 5) examples/rendering/moving_camera.py:14— examples/rendering/moving_camera.py:14-23 | examples/rigid/closed_loop.py:28-36 | examples/rigid/gravity_compensation.py:14-23 | examples/rigid/nonconvex_mesh.py:14-23 | examples/rigid/single_franka.py:14-23 — before extracting anything, compare `examples/rendering/moving_camera.py` and `examples/rigid/closed_loop.py` 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. 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 `examples/rendering/moving_camera.py: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 (9 lines × 4) examples/rigid/suction_cup.py:9— examples/rigid/suction_cup.py:9-17 | examples/rigid/terrain_height_field.py:12-20 | examples/rigid/terrain_subterrain.py:11-19 | examples/tutorials/position_control_comparison.py:17-25 — before extracting anything, compare `examples/rigid/terrain_height_field.py` and `examples/rigid/terrain_subterrain.py` as WHOLE FILES: this scan already matched 4 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 `examples/rigid/suction_cup.py: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 (9 lines × 3) examples/rigid/diffik_controller.py:53— examples/rigid/diffik_controller.py:53-61 | examples/rigid/ik_duck.py:39-48 | examples/rigid/ik_franka.py:36-45 — before extracting anything, compare `examples/rigid/diffik_controller.py` and `examples/rigid/ik_franka.py` 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. 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 `examples/rigid/diffik_controller.py: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 (8 lines × 9) examples/coupling/cut_dragon.py:8— examples/coupling/cut_dragon.py:8-15 | examples/coupling/flush_cubes.py:9-16 | examples/coupling/sand_wheel.py:11-18 | examples/coupling/sph_mpm.py:9-16 | examples/coupling/sph_rigid.py:9-16 | examples/coupling/water_wheel.py:15-22 | examples/deformable/differentiable_push.py:11-18 | examples/deformable/pbd_liquid.py:10-17 | examples/rigid/domain_randomization.py:11-18 — before extracting anything, compare `examples/coupling/cut_dragon.py` and `examples/coupling/flush_cubes.py` as WHOLE FILES: this scan already matched 4 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. 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 `examples/coupling/cut_dragon.py: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. 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, `examples/deformable/pbd_liquid.py:19` calls `PBDOptions` and `examples/deformable/differentiable_push.py:19` 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) examples/coupling/rigid_mpm_attachment.py:18— examples/coupling/rigid_mpm_attachment.py:18-25 | examples/rigid/suction_cup.py:9-16 | examples/rigid/terrain_height_field.py:12-19 | examples/rigid/terrain_subterrain.py:11-18 | examples/tutorials/position_control_comparison.py:17-24 — before extracting anything, compare `examples/rigid/terrain_height_field.py` and `examples/rigid/terrain_subterrain.py` as WHOLE FILES: this scan already matched 4 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 `examples/coupling/rigid_mpm_attachment.py: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. 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 (1–8 lines × 3) examples/rigid/grasp_bottle.py:74— examples/rigid/grasp_bottle.py:74-74 | examples/rigid/grasp_bottle.py:83-89 | examples/rigid/grasp_bottle.py:100-107 — 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 `examples/rigid/grasp_bottle.py:83` 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 × 9) examples/coupling/rigid_mpm_attachment.py:17— examples/coupling/rigid_mpm_attachment.py:17-23 | examples/rigid/gravity_compensation.py:8-14 | examples/rigid/nonconvex_mesh.py:8-14 | examples/rigid/single_franka.py:8-14 | examples/rigid/suction_cup.py:8-14 | examples/rigid/terrain_from_mesh.py:11-17 | examples/rigid/terrain_height_field.py:11-17 | examples/rigid/terrain_subterrain.py:10-16 | examples/tutorials/position_control_comparison.py:16-22 — before extracting anything, compare `examples/rigid/gravity_compensation.py` and `examples/rigid/nonconvex_mesh.py` 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. 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 `examples/coupling/rigid_mpm_attachment.py: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/tutorials/position_control_comparison.py:23` calls `SimOptions` and `examples/rigid/terrain_from_mesh.py:18` 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 (3–7 lines × 6) examples/coupling/fem_cube_linked_with_arm.py:82— examples/coupling/fem_cube_linked_with_arm.py:82-88 | examples/coupling/grasp_soft_cube.py:64-70 | examples/rigid/control_franka.py:57-59 | examples/rigid/grasp_bottle.py:58-64 | examples/rigid/suction_cup.py:57-63 | examples/sensors/imu_franka.py:98-104 — before extracting anything, compare `examples/rigid/control_franka.py` and `examples/rigid/grasp_bottle.py` 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. 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 `examples/coupling/fem_cube_linked_with_arm.py:82` 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, `examples/coupling/fem_cube_linked_with_arm.py:88` calls `set_dofs_force_range` and `examples/rigid/control_franka.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 (2–7 lines × 6) examples/coupling/fem_cube_linked_with_arm.py:89— examples/coupling/fem_cube_linked_with_arm.py:89-91 | examples/coupling/grasp_soft_cube.py:72-78 | examples/rigid/control_franka.py:59-60 | examples/rigid/grasp_bottle.py:66-73 | examples/rigid/suction_cup.py:64-66 | examples/sensors/imu_franka.py:105-107 — before extracting anything, compare `examples/rigid/control_franka.py` and `examples/rigid/grasp_bottle.py` 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. 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 `examples/coupling/fem_cube_linked_with_arm.py:89` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/coupling/grasp_soft_cube.py:72` calls `array` and `examples/coupling/fem_cube_linked_with_arm.py:89` does not — after which the two agree again for 5 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.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×1
Recursive walk over a caller-supplied document has no depth cap genesis/grad/kernel_writes.py:115— `get_written_paths` is public and takes `owner: object | None` from its caller, and it calls itself at line 115 (`get_written_paths`) with a piece of `owner` — and nowhere in `get_written_paths` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `get_written_paths` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
X19 · Unrestored process-global state· Process-global state is restored only on the happy path · ×1
Process-global state is restored only on the happy path genesis/ext/pyrender/platforms/egl.py:140— `init_context` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `DISPLAY` environment variable (set at line 227, put back at line 231) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path.
Duplicated predicate genesis/engine/solvers/rigid/collider/diff_gjk.py:543— `(gjk_state.polytope.nfaces_map[i_b] == 0) or (i_f_nearest == -1)` appears character-identically in 2 files — genesis/engine/solvers/rigid/collider/diff_gjk.py, genesis/engine/solvers/rigid/collider/epa.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 genesis/engine/solvers/rigid/constraint/solver.py:3544— `constraint_state.n_constraints[i_b] > 0 and constraint_state.improved[i_b]` appears character-identically in 2 files — genesis/engine/solvers/rigid/constraint/solver.py, genesis/engine/solvers/rigid/constraint/solver_breakdown.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 genesis/engine/solvers/rigid/abd/inverse_kinematics.py:727— `dyn_info.joints.type[I_j] == gs.JOINT_TYPE.REVOLUTE or dyn_info.joints.type[I_j] == gs.JOINT_TYPE.PRISMATIC` appears character-identically in 3 files — genesis/engine/solvers/rigid/abd/inverse_kinematics.py, genesis/engine/solvers/rigid/constraint/backward.py, genesis/engine/solvers/rigid/constraint/solver.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 genesis/engine/solvers/rigid/abd/accessor.py:51— `dyn_info.links.parent_idx[I_l] == -1 and dyn_info.links.is_fixed[I_l]` appears character-identically in 3 files — genesis/engine/solvers/rigid/abd/accessor.py, genesis/engine/solvers/rigid/abd/inverse_kinematics.py, genesis/engine/solvers/rigid/abd/misc.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 genesis/engine/solvers/rigid/abd/forward_dynamics.py:1789— `dyn_info.links.root_idx[I_l] == i_l_root and func_is_awake_link(i_l, i_b, dyn_state, rigid_config)` appears character-identically in 2 files — genesis/engine/solvers/rigid/abd/forward_dynamics.py, genesis/engine/solvers/rigid/abd/forward_kinematics.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 genesis/utils/usd/usd_collision.py:33— `g_info.get("contype") or g_info.get("conaffinity")` appears character-identically in 2 files — genesis/utils/usd/usd_collision.py, genesis/utils/usd/usd_rigid_entity.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 REDACTED:976— `g_info["contype"] or g_info["conaffinity"]` appears character-identically in 2 files — REDACTED, REDACTED. 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 genesis/engine/solvers/rigid/collider/diff_gjk.py:866— `geom_type == gs.GEOM_TYPE.SPHERE or geom_type == gs.GEOM_TYPE.CAPSULE` appears character-identically in 2 files — genesis/engine/solvers/rigid/collider/diff_gjk.py, genesis/engine/solvers/rigid/collider/gjk.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 genesis/engine/solvers/rigid/collider/diff_gjk.py:457— `gjk_state.polytope_verts.id1[i, i_b] == gjk_state.polytope_verts.id1[wi, i_b] and gjk_state.polytope_verts.id2[i, i_b] == gjk_state.polytope…` appears character-identically in 2 files — genesis/engine/solvers/rigid/collider/diff_gjk.py, genesis/engine/solvers/rigid/collider/epa.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 genesis/engine/simulator.py:321— `gs.backend == gs.cpu and gs.use_zerocopy.is_supported` appears character-identically in 2 files — genesis/engine/simulator.py, genesis/engine/solvers/base_solver.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 genesis/engine/solvers/fem_solver.py:1098— `gs.use_zerocopy and gs.backend == gs.metal` appears character-identically in 3 files — genesis/engine/solvers/fem_solver.py, genesis/engine/solvers/mpm_solver.py, genesis/engine/solvers/particle_solver.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 genesis/engine/couplers/legacy_coupler.py:887— `gs.use_zerocopy.is_supported and gs.backend == gs.metal` appears character-identically in 5 files — genesis/engine/couplers/legacy_coupler.py, genesis/engine/couplers/rigid_mpm_hybrid.py, genesis/engine/simulator.py, genesis/engine/solvers/base_solver.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 genesis/engine/solvers/rigid/collider/collider.py:894— `isinstance(envs_idx, torch.Tensor) and envs_idx.dtype == torch.bool` appears character-identically in 2 files — genesis/engine/solvers/rigid/collider/collider.py, genesis/engine/solvers/rigid/constraint/solver.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 REDACTED:488— `isinstance(mesh.visual, trimesh.visual.texture.TextureVisuals) and mesh.visual.uv is not None` appears character-identically in 2 files — REDACTED, genesis/ext/pyrender/mesh.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 genesis/engine/entities/rigid_entity/rigid_entity.py:1769— `link.is_fixed and not entity._batch_fixed_verts` appears character-identically in 2 files — genesis/engine/entities/rigid_entity/rigid_entity.py, genesis/engine/solvers/rigid/rigid_solver.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 genesis/engine/solvers/kinematic_solver.py:1006— `mask and isinstance(mask[0], torch.Tensor)` appears character-identically in 2 files — genesis/engine/solvers/kinematic_solver.py, genesis/engine/solvers/rigid/rigid_solver.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 genesis/engine/couplers/legacy_coupler.py:1216— `mpm_config.is_deterministic and not is_backward` appears character-identically in 3 files — genesis/engine/couplers/legacy_coupler.py, genesis/engine/couplers/rigid_mpm_hybrid.py, genesis/engine/solvers/mpm_solver.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 genesis/ext/pyrender/jit_render.py:1465— `node.mesh is None or len(node.mesh.primitives) != 1` appears character-identically in 2 files — genesis/ext/pyrender/jit_render.py, genesis/ext/pyrender/scene.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 genesis/vis/rasterizer_context.py:1324— `not force_render and self._t >= self.scene.sim.cur_step_global` appears character-identically in 3 files — genesis/vis/rasterizer_context.py, genesis/vis/raytracer.py, genesis/vis/visualizer.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 genesis/engine/solvers/kinematic_solver.py:1224— `not self._options.batch_dofs_info and envs_idx is not None` appears character-identically in 2 files — genesis/engine/solvers/kinematic_solver.py, genesis/engine/solvers/rigid/rigid_solver.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 genesis/engine/solvers/kinematic_solver.py:1130— `relative and not self._links_offset_pos_is_identity[idx].all()` appears character-identically in 2 files — genesis/engine/solvers/kinematic_solver.py, genesis/engine/solvers/rigid/rigid_solver.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 genesis/engine/solvers/kinematic_solver.py:923— `relative and self._links_offset_pos_is_identity[idx].all()` appears character-identically in 2 files — genesis/engine/solvers/kinematic_solver.py, genesis/engine/solvers/rigid/rigid_solver.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 genesis/engine/solvers/rigid/constraint/backward.py:647— `rigid_config.para_level < gs.PARA_LEVEL.ALL and rigid_config.backend != gs.metal` appears character-identically in 2 files — genesis/engine/solvers/rigid/constraint/backward.py, genesis/engine/solvers/rigid/constraint/solver.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 genesis/engine/solvers/rigid/constraint/solver.py:5278— `rigid_config.solver_type == gs.constraint_solver.Newton and not rigid_config.enable_elliptic_friction` appears character-identically in 2 files — genesis/engine/solvers/rigid/constraint/solver.py, genesis/engine/solvers/rigid/constraint/solver_breakdown.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 genesis/engine/solvers/rigid/constraint/solver.py:5738— `rigid_config.solver_type == gs.constraint_solver.Newton and not rigid_config.has_per_env_solve_seed` appears character-identically in 2 files — genesis/engine/solvers/rigid/constraint/solver.py, genesis/engine/solvers/rigid/constraint/solver_breakdown.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.
Interpolated log message defeats structured logging genesis/__init__.py:104— `warning` at line 104 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/__init__.py:457— `error` at line 457 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/misc.py:121— `warning` at line 121 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/video_encoder.py:180— `debug` at line 180 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:58— `warning` at line 58 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:60— `info` at line 60 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:147— `info` at line 147 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:316— `warning` at line 316 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:404— `debug` at line 404 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:418— `warning` at line 418 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:425— `warning` at line 425 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:436— `warning` at line 436 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/utils/usd/usd_context.py:475— `warning` at line 475 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/recorders/file_writers.py:81— `warning` at line 81 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/recorders/plotters.py:192— `warning` at line 192 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/recorders/plotters.py:260— `info` at line 260 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/recorders/plotters.py:420— `info` at line 420 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/recorders/trajectory.py:539— `warning` at line 539 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/engine/couplers/ipc_coupler/coupler.py:316— `debug` at line 316 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/engine/couplers/ipc_coupler/coupler.py:328— `debug` at line 328 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/engine/couplers/ipc_coupler/coupler.py:334— `debug` at line 334 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/engine/couplers/ipc_coupler/coupler.py:341— `debug` at line 341 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/engine/couplers/ipc_coupler/coupler.py:491— `debug` at line 491 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/engine/couplers/ipc_coupler/coupler.py:518— `debug` at line 518 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging genesis/engine/couplers/ipc_coupler/coupler.py:686— `debug` at line 686 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Orphaned file genesis/ext/isaacgym/terrain_utils.py: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 genesis/engine/force_fields.py: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 genesis/ext/pyrender/light.py: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 genesis/ext/pyrender/texture.py: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 genesis/ext/pyrender/camera.py: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 genesis/ext/pyrender/font.py: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 genesis/ext/pyrender/trackball.py: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 genesis/ext/pyrender/node.py: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 genesis/ext/pyrender/constants.py: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 genesis/ext/pyrender/utils.py: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 genesis/ext/pyrender/overlay/types.py: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 genesis/ext/pyrender/overlay/style.py: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 genesis/utils/linalg.py: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 genesis/ext/pyrender/sampler.py: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.
X23 · Unguarded diagnostic materialisation· Diagnostic log message is built whether or not it is wanted · ×3
Diagnostic log message is built whether or not it is wanted genesis/vis/viewer.py:155— `debug` at line 155 is called with an argument built by `"…".join(traceback.format())` (line 155), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted genesis/utils/usd/usd_context.py:404— `debug` at line 404 is called with an argument built by `"…".join(commands)` (line 404), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted genesis/engine/couplers/ipc_coupler/coupler.py:491— `debug` at line 491 is called with an argument built by `set(self._coup_type_by_entity.values())` (line 491), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 22 significant file(s) lose their only recent owner: genesis/engine/couplers/sap_coupler.py, genesis/engine/solvers/rigid/collider/narrowphase.py, genesis/engine/couplers/legacy_coupler.py, genesis/engine/solvers/rigid/constraint/linesearch.py, genesis/ext/pyrender/jit_render.py, genesis/recorders/trajectory.py, genesis/engine/solvers/rigid/abd/forward_kinematics.py, genesis/engine/solvers/rigid/collider/epa.py (+14 more). Pair on, review, or document these before any departure.
No ADRs found REDACTED:148— 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 `REDACTED` makes this repository a deployable product (line 148).
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 14 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: genesis/ext/isaacgym/terrain_utils.py, genesis/engine/force_fields.py, genesis/ext/pyrender/light.py, genesis/ext/pyrender/texture.py, genesis/ext/pyrender/camera.py, genesis/ext/pyrender/font.py, genesis/ext/pyrender/trackball.py, genesis/ext/pyrender/node.py (and 6 more) (15 orphaned of 194 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; 194 of the 260 production source files in this repository met that bar). 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.
No SAST REDACTED:4— No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 6 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No dependency-update automation REDACTED:11— `REDACTED` 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`.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Silent fallback default in catch genesis/ext/pyrender/overlay/plugin.py:239— `_get_clipboard` (in `_init_imgui`) swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Outdated: gs-madrona — `gs-madrona` is pinned to 0.0.10, but 0.0.11 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 0.0.10 until the declaration is edited.
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.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python REDACTED/requirements.txt (pip/uv/Poetry) — not scanned yet).
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. semgrep could not parse 16 file(s) — `genesis/datatypes.py`, `REDACTED`, `genesis/engine/materials/PBD/base.py`, `genesis/engine/materials/base.py`, `genesis/engine/materials/kinematic.py`, … (+11 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python REDACTED/requirements.txt (pip/uv/Poetry) — not scanned yet).
0
—
Run 01a1e2ed-9b89-7994-b3ae-9cfbcf1e97ff · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 52 · Warnings: 1669 · Recommendations: 92 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 16-11-2026 @ 05:56 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.