Public report of HKUDS/CLI-Anything, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 14 November 2026, 02:18 UTC · Survey ID cd_53494f56910a4f0095e7a45d9467b395
HKUDS/CLI-Anything
Measured 14 November 2026, 02:18 UTC, at code version 34f5195
Code coverage is not measured: .NET and JavaScript/TypeScript suite (CouldNotMeasureEnvironment, CouldNotMeasureRanButNoData).
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Up 3 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: 203,360 lines of product code in 13 projects, tests not counted · Estimated rebuild effort: about 2.1 person-years · Weakest lens: Code Health, 38
Findings by how serious they are
102 critical1471 serious294 minor
12 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 02:18 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 ▸
56of 56 dimensions measured by tools.
1840of 1867 findings point to an exact file and line, so you can open each one in the code. The other 27 concern the repository as a whole, such as missing documentation.
56dimensions across 6 lenses, read from 203,360 lines of product code in 13 projects.
HKUDS/CLI-Anything falls short of our standard for a preview release, held back most by its Code Health lens, the quality of the code itself. It scores 46 out of 100 and is rated Adequate, and 29 of its 102 critical findings are security problems.
Code Health, at 38, is the weakest lens and counts most in the score. The best first steps are replacing the four packages under a banned licence and handling the discarded errors, each worth about 7 points. Raising Code Health to 67 would lift the score to about 53.
Eighteen pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Four known security holes in the packages the code depends on can be used by attackers, and sixty parts of the code are no longer understood by anyone working on it. Pinning each tool to an exact version, updating the vulnerable packages and having someone learn the forgotten files would close these risks. The four passwords or keys in the code's history need replacing, with the old ones switched off. The two pipeline steps that install packages without pinning their versions need the packages they install pinned to exact versions. The eight errors that are caught and ignored need handling or logging instead of being ignored.
The product code is 203,360 lines, about €310,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Code Health rose from 38 to 67, the lowest score rated Strong, the score would rise from 46 to about 53.
Code composition: what the lines of code are
Business logic 5%Supporting code 1%Tests 94%
New since the last survey: 297 findings
These 297 critical or serious findings weren't in the previous survey, on 25 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Code Duplication · Near-duplicate member pair (65 shared lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs
Code Duplication · Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py
Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/core/lighting.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/core/clips.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/core/modifiers.py
Code Duplication · Edited copy of a member (120 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/preview.py
Code Duplication · Edited copy of a member (21 corresponding lines) docs/scripts/blender_preview_story_demo.py
Code Duplication · Edited copies of one member (3 members, 96+ corresponding lines) blender/agent-harness/cli_anything/blender/core/preview.py
Code Duplication · Edited copy of a member (73 corresponding lines) macrocli/agent-harness/cli_anything/macrocli/backends/native_api.py
Code Duplication · Edited copy of a member (42 corresponding lines) docs/scripts/blender_orbital_relay_drone_demo.py
Code Duplication · Edited copy of a member (31 corresponding lines) docs/scripts/blender_preview_story_demo.py
Code Duplication · Edited copies of one member (3 members, 56+ corresponding lines) lldb/agent-harness/cli_anything/lldb/lldb_cli.py
Code Duplication · Edited copy of a member (43 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (25 corresponding lines) n8n/agent-harness/cli_anything/n8n/n8n_cli.py
Code Duplication · Edited copy of a member (48 corresponding lines) exa/agent-harness/cli_anything/exa/utils/repl_skin.py
Code Duplication · Edited copy of a member (66 corresponding lines) cloudcompare/agent-harness/cli_anything/cloudcompare/core/export.py
Code Duplication · Edited copy of a member (35 corresponding lines) drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py
Code Duplication · Edited copy of a member (41 corresponding lines) nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift
Code Duplication · Edited copy of a member (38 corresponding lines) blender/agent-harness/cli_anything/blender/core/render.py
Code Duplication · Edited copy of a member (42 corresponding lines) audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py
Code Duplication · Edited copy of a member (66 corresponding lines) browser/agent-harness/cli_anything/browser/utils/security.py
Code Duplication · Edited copy of a member (76 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/sketch.py
Code Duplication · Edited copy of a member (59 corresponding lines) gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py
Code Duplication · Edited copy of a member (39 corresponding lines) minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py
Code Duplication · Edited copy of a member (35 corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs
Code Duplication · Edited copies of one member (7 members, 54+ corresponding lines) audacity/agent-harness/cli_anything/audacity/audacity_cli.py
Code Duplication · Edited copy of a member (43 corresponding lines) chromadb/agent-harness/cli_anything/chromadb/chromadb_cli.py
Code Duplication · Edited copies of one member (4 members, 53+ corresponding lines) obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py
Code Duplication · Edited copy of a member (30 corresponding lines) minimax/agent-harness/cli_anything/minimax/minimax_cli.py
Code Duplication · Edited copy of a member (49 corresponding lines) sbox/agent-harness/cli_anything/sbox/core/export.py
Code Duplication · Edited copy of a member (25 corresponding lines) sbox/agent-harness/cli_anything/sbox/sbox_cli.py
Code Duplication · Edited copy of a member (28 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (23 corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs
Code Duplication · Edited copy of a member (35 corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs
Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py
Code Duplication · Edited copy of a member (35 corresponding lines) minimax/agent-harness/cli_anything/minimax/minimax_cli.py
Code Duplication · Edited copy of a member (42 corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs
Code Duplication · Edited copies of one member (8 members, 23+ corresponding lines) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py
Code Duplication · Edited copy of a member (28 corresponding lines) renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py
Code Duplication · Edited copies of one member (4 members, 37+ corresponding lines) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py
Code Duplication · Edited copy of a member (28 corresponding lines) libreoffice/agent-harness/cli_anything/libreoffice/core/export.py
Code Duplication · Edited copy of a member (40 corresponding lines) drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py
Code Duplication · Edited copy of a member (24 corresponding lines) inkscape/agent-harness/cli_anything/inkscape/core/layers.py
Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py
Code Duplication · Edited copy of a member (17 corresponding lines) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py
Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs
Code Duplication · Edited copy of a member (19 corresponding lines) sbox/agent-harness/cli_anything/sbox/sbox_cli.py
Code Duplication · Edited copy of a member (26 corresponding lines) chromadb/agent-harness/cli_anything/chromadb/core/collections.py
Code Duplication · Edited copy of a member (40 corresponding lines) mailchimp/agent-harness/cli_anything/mailchimp/mailchimp_cli.py
Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py
Code Duplication · Edited copy of a member (32 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (43 corresponding lines) REDACTED
Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) calibre/agent-harness/cli_anything/calibre/calibre_cli.py
Code Duplication · Edited copy of a member (50 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/sketch.py
Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py
Code Duplication · Edited copy of a member (19 corresponding lines) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py
Code Duplication · Edited copies of one member (5 members, 23+ corresponding lines) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py
Code Duplication · Edited copy of a member (45 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/parts.py
Code Duplication · Edited copy of a member (32 corresponding lines) zotero/agent-harness/cli_anything/zotero/utils/zotero_sqlite.py
Code Duplication · Edited copy of a member (30 corresponding lines) gimp/agent-harness/cli_anything/gimp/core/canvas.py
Code Duplication · Edited copy of a member (17 corresponding lines) ollama/agent-harness/cli_anything/ollama/ollama_cli.py
Code Duplication · Edited copy of a member (26 corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerActions.cs
Code Duplication · Edited copy of a member (25 corresponding lines) cli-hub/cli_hub/matrix.py
Code Duplication · Edited copy of a member (45 corresponding lines) freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py
Code Duplication · Edited copy of a member (41 corresponding lines) sbox/agent-harness/cli_anything/sbox/core/codegen.py
Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) chromadb/agent-harness/cli_anything/chromadb/core/collections.py
Code Duplication · Edited copy of a member (18 corresponding lines) blender/agent-harness/cli_anything/blender/core/objects.py
Code Duplication · Edited copy of a member (25 corresponding lines) minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py
Code Duplication · Edited copy of a member (28 corresponding lines) audacity/agent-harness/cli_anything/audacity/utils/sox_backend.py
Code Duplication · Edited copy of a member (20 corresponding lines) REDACTED
Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) chromadb/agent-harness/cli_anything/chromadb/core/collections.py
Code Duplication · Edited copy of a member (34 corresponding lines) cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py
Code Duplication · Edited copy of a member (56 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/body.py
Code Duplication · Edited copy of a member (42 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/draft.py
Code Duplication · Edited copies of one member (3 members, 40+ corresponding lines) browser/agent-harness/cli_anything/browser/utils/domshell_backend.py
Code Duplication · Edited copy of a member (37 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/measure.py
Code Duplication · Edited copies of one member (4 members, 24+ corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs
Code Duplication · Edited copies of one member (3 members, 33+ corresponding lines) calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py
Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py
Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py
Code Duplication · Edited copy of a member (51 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/body.py
Code Duplication · Edited copy of a member (19 corresponding lines) sbox/agent-harness/cli_anything/sbox/sbox_cli.py
Code Duplication · Edited copy of a member (18 corresponding lines) macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py
Code Duplication · Edited copy of a member (53 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/sketch.py
Code Duplication · Edited copies of one member (3 members, 36+ corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs
Code Duplication · Edited copies of one member (6 members, 16+ corresponding lines) tigris/agent-harness/cli_anything/tigris/core/access_key.py
Code Duplication · Edited copy of a member (51 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/body.py
Code Duplication · Edited copy of a member (18 corresponding lines) kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py
Code Duplication · Edited copy of a member (37 corresponding lines) musescore/agent-harness/cli_anything/musescore/core/instruments.py
Code Duplication · Edited copy of a member (18 corresponding lines) nslogger/agent-harness/cli_anything/nslogger/nslogger_cli.py
Code Duplication · Edited copy of a member (20 corresponding lines) minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py
Code Duplication · Edited copy of a member (14 corresponding lines) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py
Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) tigris/agent-harness/cli_anything/tigris/core/iam.py
Code Duplication · Edited copy of a member (14 corresponding lines) cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py
Code Duplication · Edited copy of a member (13 corresponding lines) tigris/agent-harness/cli_anything/tigris/core/bucket.py
Code Duplication · Edited copy of a member (16 corresponding lines) blender/agent-harness/cli_anything/blender/core/objects.py
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: 111 findings
These 111 critical or serious findings were in the previous survey, on 25 October 2026, and are gone from this one. The first 100 are listed here.
Code Duplication · Near-duplicate member family (61 members, 12 shared lines) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py
Code Duplication · Near-duplicate member pair (64 shared lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs
Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) joplin/agent-harness/cli_anything/joplin/joplin_cli.py
Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/core/lighting.py
Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) joplin/agent-harness/cli_anything/joplin/joplin_cli.py
Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) comfyui/agent-harness/cli_anything/comfyui/core/models.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) joplin/agent-harness/cli_anything/joplin/joplin_cli.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py
€100,000 to €520,000, for 1,714 to 5,458 hours of work, about 2.1 person-years for 1 to 5 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 46. 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: 203,360 lines of product code
Comment lines
The estimate prices 203,216 lines. Comment lines count towards the size of 203,360 lines but aren't priced as work.
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 4 Banned license finding(s) in License Compliance.
Resolve the 8 EmptyCatchBlock finding(s) in Explicit Debt — start with BridgeMod.MultiplayerState.cs (4), BridgeMod.Helpers.cs (2), BridgeMod.StateBuilder.cs.
Raises the score by about 7 points · Low effort · Explicit Debt
3
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 4 points · Medium effort · Type Safety
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 €310,000 to build again, about 2.1 person-years of work. Its weakest lens is Code Health, at 38 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 4 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 7 points for low effort, because it clears the 4 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.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 7% to 16% on every change. The history of the code shows how much it changes: about 5,526 lines over the last 90 days, which is about 22,411 lines a year. At that pace, the extra work comes to an estimated 3.9 to 23.3 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.
392 modules, with 79 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; 352 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.
3MF.agent-harness.cli_anything.threemf.core uses 3MF.agent-harness.cli_anything.threemf.core.inspector, so a change to 3MF.agent-harness.cli_anything.threemf.core.inspector can break 3MF.agent-harness.cli_anything.threemf.core, while a change to 3MF.agent-harness.cli_anything.threemf.core can't break 3MF.agent-harness.cli_anything.threemf.core.inspector.
Position
Below the diagonal: 3MF.agent-harness.cli_anything.threemf.core uses a module listed above it, which is the healthy direction.
3MF.agent-harness.cli_anything.threemf.core uses 3MF.agent-harness.cli_anything.threemf.core.parser, so a change to 3MF.agent-harness.cli_anything.threemf.core.parser can break 3MF.agent-harness.cli_anything.threemf.core, while a change to 3MF.agent-harness.cli_anything.threemf.core can't break 3MF.agent-harness.cli_anything.threemf.core.parser.
Position
Below the diagonal: 3MF.agent-harness.cli_anything.threemf.core uses a module listed above it, which is the healthy direction.
3MF.agent-harness.cli_anything.threemf.utils uses 3MF.agent-harness.cli_anything.threemf.core.parser, so a change to 3MF.agent-harness.cli_anything.threemf.core.parser can break 3MF.agent-harness.cli_anything.threemf.utils, while a change to 3MF.agent-harness.cli_anything.threemf.utils can't break 3MF.agent-harness.cli_anything.threemf.core.parser.
Position
Below the diagonal: 3MF.agent-harness.cli_anything.threemf.utils uses a module listed above it, which is the healthy direction.
QGIS.agent-harness.cli_anything.qgis uses QGIS.agent-harness.cli_anything.qgis.core.session, so a change to QGIS.agent-harness.cli_anything.qgis.core.session can break QGIS.agent-harness.cli_anything.qgis, while a change to QGIS.agent-harness.cli_anything.qgis can't break QGIS.agent-harness.cli_anything.qgis.core.session.
Position
Below the diagonal: QGIS.agent-harness.cli_anything.qgis uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in adguardhome.agent-harness.cli_anything.adguardhome uses a type in adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend.
adguardhome.agent-harness.cli_anything.adguardhome uses adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend, so a change to adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend can break adguardhome.agent-harness.cli_anything.adguardhome, while a change to adguardhome.agent-harness.cli_anything.adguardhome can't break adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend.
Position
Below the diagonal: adguardhome.agent-harness.cli_anything.adguardhome uses a module listed above it, which is the healthy direction.
8 pairs of types, where a type in adguardhome.agent-harness.cli_anything.adguardhome.core uses a type in adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend.
adguardhome.agent-harness.cli_anything.adguardhome.core uses adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend, so a change to adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend can break adguardhome.agent-harness.cli_anything.adguardhome.core, while a change to adguardhome.agent-harness.cli_anything.adguardhome.core can't break adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend.
Position
Below the diagonal: adguardhome.agent-harness.cli_anything.adguardhome.core uses a module listed above it, which is the healthy direction.
anygen.agent-harness.cli_anything.anygen uses anygen.agent-harness.cli_anything.anygen.core.session, so a change to anygen.agent-harness.cli_anything.anygen.core.session can break anygen.agent-harness.cli_anything.anygen, while a change to anygen.agent-harness.cli_anything.anygen can't break anygen.agent-harness.cli_anything.anygen.core.session.
Position
Below the diagonal: anygen.agent-harness.cli_anything.anygen uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in audacity.agent-harness.cli_anything.audacity uses a type in audacity.agent-harness.cli_anything.audacity.core.session.
audacity.agent-harness.cli_anything.audacity uses audacity.agent-harness.cli_anything.audacity.core.session, so a change to audacity.agent-harness.cli_anything.audacity.core.session can break audacity.agent-harness.cli_anything.audacity, while a change to audacity.agent-harness.cli_anything.audacity can't break audacity.agent-harness.cli_anything.audacity.core.session.
Position
Below the diagonal: audacity.agent-harness.cli_anything.audacity uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in audacity.agent-harness.cli_anything.audacity.eval uses a type in audacity.agent-harness.cli_anything.audacity.eval.runner.
audacity.agent-harness.cli_anything.audacity.eval uses audacity.agent-harness.cli_anything.audacity.eval.runner, so a change to audacity.agent-harness.cli_anything.audacity.eval.runner can break audacity.agent-harness.cli_anything.audacity.eval, while a change to audacity.agent-harness.cli_anything.audacity.eval can't break audacity.agent-harness.cli_anything.audacity.eval.runner.
Position
Below the diagonal: audacity.agent-harness.cli_anything.audacity.eval uses a module listed above it, which is the healthy direction.
blender.agent-harness.cli_anything.blender uses blender.agent-harness.cli_anything.blender.core.session, so a change to blender.agent-harness.cli_anything.blender.core.session can break blender.agent-harness.cli_anything.blender, while a change to blender.agent-harness.cli_anything.blender can't break blender.agent-harness.cli_anything.blender.core.session.
Position
Below the diagonal: blender.agent-harness.cli_anything.blender uses a module listed above it, which is the healthy direction.
browser.agent-harness.cli_anything.browser uses browser.agent-harness.cli_anything.browser.core.session, so a change to browser.agent-harness.cli_anything.browser.core.session can break browser.agent-harness.cli_anything.browser, while a change to browser.agent-harness.cli_anything.browser can't break browser.agent-harness.cli_anything.browser.core.session.
Position
Below the diagonal: browser.agent-harness.cli_anything.browser uses a module listed above it, which is the healthy direction.
cli-anything-plugin uses cli-anything-plugin.skill_generator, so a change to cli-anything-plugin.skill_generator can break cli-anything-plugin, while a change to cli-anything-plugin can't break cli-anything-plugin.skill_generator.
Position
Below the diagonal: cli-anything-plugin uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in joplin.agent-harness.cli_anything.joplin uses a type in joplin.agent-harness.cli_anything.joplin.utils.joplin_backend.
joplin.agent-harness.cli_anything.joplin uses joplin.agent-harness.cli_anything.joplin.utils.joplin_backend, so a change to joplin.agent-harness.cli_anything.joplin.utils.joplin_backend can break joplin.agent-harness.cli_anything.joplin, while a change to joplin.agent-harness.cli_anything.joplin can't break joplin.agent-harness.cli_anything.joplin.utils.joplin_backend.
Position
Below the diagonal: joplin.agent-harness.cli_anything.joplin uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.file_transform uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.backends.file_transform uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.backends.file_transform, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.file_transform can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.file_transform uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.file_transform uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.backends.file_transform uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.backends.file_transform, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.file_transform can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.file_transform uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.native_api uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.backends.native_api uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.backends.native_api, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.native_api can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.native_api uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.native_api uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.backends.native_api uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.backends.native_api, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.native_api can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.native_api uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.recovery uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.backends.recovery uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.backends.recovery, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.recovery can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.recovery uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.recovery uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.backends.recovery uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.backends.recovery, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.recovery can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.recovery uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.core.routing uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.core.routing uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.core.routing, while a change to macrocli.agent-harness.cli_anything.macrocli.core.routing can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.core.routing uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.core.routing uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.core.routing uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.core.routing, while a change to macrocli.agent-harness.cli_anything.macrocli.core.routing can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.core.routing uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.core.runtime uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.core.runtime uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.core.runtime, while a change to macrocli.agent-harness.cli_anything.macrocli.core.runtime can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.core.runtime uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in safari.agent-harness.cli_anything.safari uses a type in safari.agent-harness.cli_anything.safari.utils.tool_registry.
safari.agent-harness.cli_anything.safari uses safari.agent-harness.cli_anything.safari.utils.tool_registry, so a change to safari.agent-harness.cli_anything.safari.utils.tool_registry can break safari.agent-harness.cli_anything.safari, while a change to safari.agent-harness.cli_anything.safari can't break safari.agent-harness.cli_anything.safari.utils.tool_registry.
Position
Below the diagonal: safari.agent-harness.cli_anything.safari uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli uses a type in macrocli.agent-harness.cli_anything.macrocli.core.runtime.
macrocli.agent-harness.cli_anything.macrocli uses macrocli.agent-harness.cli_anything.macrocli.core.runtime, so a change to macrocli.agent-harness.cli_anything.macrocli.core.runtime can break macrocli.agent-harness.cli_anything.macrocli, while a change to macrocli.agent-harness.cli_anything.macrocli can't break macrocli.agent-harness.cli_anything.macrocli.core.runtime.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 38% · Weak · gated by D2, D4, R1, R2 ·
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
57
High / Critical
A03:2025 — Software Supply Chain Failures
12
High / Critical
A07:2025 — Authentication Failures
5
High / Critical
Roadmap
Top priorities: Resolve the 4 Banned license finding(s) in License Compliance; Resolve the 8 EmptyCatchBlock finding(s) in Explicit Debt — start with BridgeMod.MultiplayerState.cs (4), BridgeMod.Helpers.cs (2), BridgeMod.StateBuilder.cs; Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 4 Banned license finding(s) in License Compliance.
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
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.
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
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 — 102
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 — 1471
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 — 294
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 12
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 56 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 56 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, 1840 of 1867 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 13 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 229 test source file(s) (.py) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .py, and the python executor ran against the .py half and did not finish re-running within its tier budget — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (jest via `npm ci --ignore-scripts` in sketch/agent-harness/ (25 tests)): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 21 shipped Python distribution(s) were read, but the outdated signal needs pypi.org, and no declaration here carries an exact pin to ask about — a floor or a range installs the newest release it admits and cannot be behind one, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D17 Explicit Debt — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Msbuild failed when processing the file 'slay_the_spire_ii/agent-harness/bridge/plugin/STS2_Bridge.csproj' with message: STS2GameDataDir is invalid. Expected sts2.dll at /path/to/sts2/data_dir/sts2.dll.
D17 Explicit Debt — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 8 deducted marker(s) and the 1.4/KLoC density on this row were taken over this repository's .NET projects ALONE: .py (194,709 lines, 98% of production source) went unread, because every marker collector on this path is reached through a C# workspace. A read-only sweep of that source finds at least 1 task marker(s) (TODO/FIXME/HACK/XXX) across 1 file(s) that this score does not count — a floor, since only line comments are read there and D17's other eight marker kinds (suppressions, NoWarn, editorconfig severities, empty catches, commented-out code, Obsolete, dead code, preprocessor branches) need a compiler we do not have for that language. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
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.
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. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
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.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
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: an API surface definition (docs/hub/openapi.json) — a service to probe even with no user interface. 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).
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
X1 Async 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's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X10 Duplicated predicate — 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. 36 further occurrence(s) are not listed individually; the score already reflects all 76.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
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's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
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.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D13 REDACTED Scanning: REDACTED 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.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
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").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
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.
167 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was shotcut_cli._run_repl at 130. A further 2 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being BridgeMod.ExecuteMultiplayerAction at 26 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerActions.cs (BridgeMod.ExecuteMultiplayerAction at 26). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 156 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 4 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with shotcut_cli._run_repl (cyclomatic 130), mubu_probe.main (cyclomatic 104), video_doctor.caption_doctor (cyclomatic 73). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 4 together lifts Cyclomatic Complexity from 5.7 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 355 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 4 bodies over 120 down to 120 or less in Cognitive Complexity — start with fixers.autofix (cognitive 226), shotcut_cli._run_repl (cognitive 210), mubu_probe.main (cognitive 187). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 4 together lifts Cognitive Complexity from 3.6 to about 4.6/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.4 / 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 60 FileTooLong finding(s) in God Classes — start with preview.py (4), freecad_live_preview_demo.py, freecad_cli.py. — One of this dimension's main actionable groups (60 warning-level).
Resolve the 5 TooManyMethods finding(s) in God Classes — start with firefly_iii_backend.py, BridgeMod.Actions.cs, dap.py. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 1 MethodTooLong finding(s) in God Classes — start with BridgeMod.MultiplayerState.cs. — One of this dimension's main actionable groups (1 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.
489 duplicated block group(s) detected. 21.1 % of the production lines (42,106 of 199,902) are in a reported copy. A further 335 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
+ 333 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 24 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with melt_backend.py (3), minimax_cli.py (3), blender_preview_story_demo.py (2). — One of this dimension's main actionable groups (24 warning-level).
Resolve the 21 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with BridgeMod.Formatting.cs (3), blender_preview_story_demo.py (2), BridgeMod.Actions.cs. — One of this dimension's main actionable groups (21 warning-level).
Resolve the 20 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with session.py (3), REDACTED (2), iterm2_ctl_cli.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.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
13 production modules (npm+Python), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence, with abstractness counted on 12 of the 13 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
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.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Cycles found: 0.
Detailed fixes: d7_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 13 tests. Measured on the JavaScript/TypeScript suite only — at least 229 test source file(s) (.py) went unread, so its test quality is unmeasured and is not in these counts.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
4 of 313 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 21 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (292 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. 19 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged. This repository publishes itself under MIT, which is its own choice and is not judged here.
Banned license: iterm2 · ×4
What to do
Resolve the 4 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (4 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.
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.
91 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is REDACTED. Counted over 529 of the 1037 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 · ×9
Further sole-owners (lower concentration)
What to do
Resolve the 9 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (9 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
8 deducted debt markers + unmeasured dead symbols across 3914 LoC in the .NET projects (1.4/KLoC) → score 7.3. Dead code not measured: the solution did not load cleanly, so the reference search was skipped. Measured on the .NET source only: .py (98% of production source) was not read, and carries at least 1 uncounted task marker(s) in 1 file(s).
Resolve the 8 EmptyCatchBlock finding(s) in Explicit Debt — start with BridgeMod.MultiplayerState.cs (4), BridgeMod.Helpers.cs (2), BridgeMod.StateBuilder.cs. — One of this dimension's main actionable groups (8 issue-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.
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.
0 of 1 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
Resolve the 3 redundant comment finding(s) in Comment Value — start with BridgeMod.StateBuilder.cs (2), builder.js. — One of this dimension's main actionable groups (3 recommendation-level).
Detailed fixes: d24_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.
79 % of calls cross a namespace and 0 % go through an interface, but 100 % 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: REDACTED 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.
4 finding(s): 0 critical, 4 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 4 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (4 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
57 finding(s): 0 critical, 21 high, 24 medium, 12 low. 18 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. Separately, one or more rules could not re-parse an embedded snippet in 1 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
+ 8 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
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).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 18 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 (18 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 4 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4). — One of this dimension's main actionable groups (4 issue-level).
Resolve the 2 Low CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_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.
262 of 529 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is sbox/agent-harness/cli_anything/sbox/sbox_cli.py. Counted over 529 of the 1037 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 202 Orphaned file finding(s) in Knowledge Freshness — start with session.py (14), project.py (8), REDACTED (7). — One of this dimension's main actionable groups (202 recommendation-level).
Resolve the 60 Orphaned knowledge finding(s) in Knowledge Freshness — start with repl_skin.py (35), sbox_cli.py, REDACTED. — One of this dimension's main actionable groups (60 issue-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.
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.
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).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 21 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · 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.
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 singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
`BridgeMod` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_listener, _serverThread; e.g. `_listener` at line 42). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:41
What to do
A `static` field is one slot for the whole process, however its type is created: back it with a thread-safe type (ConcurrentDictionary, Interlocked), take a lock around every write, or move it into a registered singleton that does.
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 the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
1 ADR-shaped document(s) detected by content — `safari/agent-harness/HARNESS.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.
What to do
Move ADRs under docs/adr/ (or docs/adrs/) and name them NNNN-title.md so they're easy to find.
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 · Observability5.1 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 2/71 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `3MF/agent-harness`, `QGIS/agent-harness`, `adguardhome/agent-harness`, `anygen/agent-harness` and 64 more.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
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 7 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
`sketch/agent-harness/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — sketch/agent-harness/package.json:16
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.
Do you agree with this assessment?
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Do you agree with this assessment?
P6 · Release Hygiene8.0 / 10Strong✓ Tool-verified
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.
The changelog this check read carries 2 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
What to do
Keep the changelog current — add a versioned entry (Keep-a-Changelog ## [x.y.z]) for each release so the history isn't a stub.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
`fs.writeFileSync` in `buildSketchFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — sketch/agent-harness/src/builder.js:55
`fs.readFileSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — sketch/agent-harness/src/builder.js:327
`fs.existsSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — sketch/agent-harness/src/builder.js:381
`fs.mkdirSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — sketch/agent-harness/src/builder.js:382
5 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
`.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). (×5) — slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:278, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:203, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:249, …
What to do
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
Do you agree with this assessment?
R1 · Type Safety0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
0 typed · 6 plain JS — the untyped files are sketch/agent-harness/src/builder.js, sketch/agent-harness/src/cli.js, sketch/agent-harness/src/layout.js, sketch/agent-harness/src/primitives.js, sketch/agent-harness/tests/build.test.js, sketch/agent-harness/tests/security.test.js.
What to do
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
sketch/agent-harness/src/layout.js:78 · sketch/agent-harness/src/layout.js:133 — the two spans are one implementation copied and then locally edited — 94 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — sketch/agent-harness/src/layout.js:78
sketch/agent-harness/src/primitives.js:86 · sketch/agent-harness/src/primitives.js:103 — the two spans are one implementation copied and then locally edited — 53 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — sketch/agent-harness/src/primitives.js:86
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
buildLayer has cyclomatic complexity 28 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sketch/agent-harness/src/builder.js:190
layoutVerticalStack has cyclomatic complexity 25 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sketch/agent-harness/src/layout.js:78
layoutHorizontalStack has cyclomatic complexity 23 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sketch/agent-harness/src/layout.js:133
intrinsicSize has cyclomatic complexity 22 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sketch/agent-harness/src/layout.js:40
build has cyclomatic complexity 14 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sketch/agent-harness/src/builder.js:326
createLabeledRectangle has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sketch/agent-harness/src/primitives.js:222
createText has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sketch/agent-harness/src/primitives.js:122
resolveTokenValue has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — sketch/agent-harness/src/builder.js:126
Do you agree with this assessment?
R3 · Large Files10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
Do you agree with this assessment?
R4 · Test Coverage10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling3.4 / 10Weak✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
test ✓ · lint ✗ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
What to do
Add eslint and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.
Do you agree with this assessment?
R7 · Dead Code10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable package.json — installs work only by hoisting accident. — sketch/agent-harness/src/builder.js:14
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
Do you agree with this assessment?
Reference — by lens
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 — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 16 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 71 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — no DI registrations detected
AX6 Interface segregation — no public interfaces
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
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 — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
D12 Dependency Hygiene — Not scored — 21 shipped Python distribution(s) were read, but the outdated signal needs pypi.org, and no declaration here carries an exact pin to ask about — a floor or a range installs the newest release it admits and cannot be behind one, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D18 Solution Shape — D18 scores the shape of a .NET solution, but this repository's production source is mostly .py, .swift — the .NET project files present are an immaterial minority — so the dimension does not apply.
D21 Naming Consistency — Naming consistency does not read html yet; not measured.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Python surface was not measured.
D23 Boundary Type-Coupling — single shared-core project — no cross-context coupling to assess
D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
D26 Project Cohesion — This repository is one project, `STS2_Bridge` (3914 LoC, 1 public types across 1 namespaces), within the size bounds. Not scored: a single unit of this size gives project cohesion nothing to grade.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
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.
D8 Code Coverage — Coverage NOT MEASURED: the .NET half could not be measured — no coverage produced (collector absent, or test run exceeded the inline budget); the JavaScript/TypeScript half could not be measured — the jest suite in sketch/agent-harness/ ran and passed but wrote no lcov report. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (74 value object(s))
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
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
IC1 Incompleteness & stubs — IC1 reached only 2% of this repository's production lines — python (195,645 lines), javascript (3,458 lines), swift (343 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
P8 Schema migrations — no EF Core usage detected
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — X1 reached only 2% of this repository's production lines — python (195,645 lines), javascript (3,458 lines), swift (343 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X12 Unreachable branch — X12 reached only 2% of this repository's production lines — python (195,645 lines), javascript (3,458 lines), swift (343 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — X16 reached only 2% of this repository's production lines — python (195,645 lines), javascript (3,458 lines), swift (343 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no async method does work a token could cancel
X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — X24 reached only 4% of this repository's production lines — python (195,645 lines), swift (343 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — X27 reached only 2% of this repository's production lines — python (195,645 lines), javascript (3,458 lines), swift (343 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — X29 reached only 2% of this repository's production lines — python (195,645 lines), javascript (3,458 lines), swift (343 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X3 Exception handling — X3 reached only 2% of this repository's production lines — python (195,645 lines), javascript (3,458 lines), swift (343 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X4 Structured logging — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Orphaned knowledge sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge REDACTED: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.
Orphaned knowledge live2d/agent-harness/cli_anything/live2d/live2d_cli.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.
Orphaned knowledge cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.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.
Orphaned knowledge iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.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.
Orphaned knowledge slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs: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.
Orphaned knowledge freecad/agent-harness/cli_anything/freecad/core/sketch.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.
Orphaned knowledge freecad/agent-harness/cli_anything/freecad/core/parts.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.
Orphaned knowledge sbox/agent-harness/cli_anything/sbox/core/scene.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.
Orphaned knowledge slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs: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.
Orphaned knowledge slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs: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.
Orphaned knowledge rms/agent-harness/cli_anything/rms/rms_cli.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.
Orphaned knowledge cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.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.
Orphaned knowledge freecad/agent-harness/cli_anything/freecad/core/draft.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.
Orphaned knowledge cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.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.
Orphaned knowledge zotero/agent-harness/cli_anything/zotero/utils/zotero_sqlite.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.
Orphaned knowledge REDACTED: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.
Orphaned knowledge REDACTED: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.
Orphaned knowledge freecad/agent-harness/cli_anything/freecad/core/measure.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.
Orphaned knowledge krita/agent-harness/cli_anything/krita/krita_cli.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.
Orphaned knowledge zotero/agent-harness/cli_anything/zotero/utils/repl_skin.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.
Orphaned knowledge zoom/agent-harness/cli_anything/zoom/utils/repl_skin.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.
Orphaned knowledge tigris/agent-harness/cli_anything/tigris/utils/repl_skin.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.
Orphaned knowledge siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.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.
Orphaned knowledge seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.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.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Helpers.cs:170— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Helpers.cs:173— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:299— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:320— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:341— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:386— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:594— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:179— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
Banned license: iterm2 — `iterm2` 2.30 is published on PyPI under `GPL-2.0-or-later`, 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.
Banned license: videocaptioner — `videocaptioner` 1.4.2 is published on PyPI under `GPL-3.0`, 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.
Banned license: pyqt-fluent-widgets — `pyqt-fluent-widgets` 1.11.3 is published on PyPI under `GPL-3.0`, 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.
Banned license: pyqt5-frameless-window — `pyqt5-frameless-window` 0.8.2 is published on PyPI under `GPL-3.0`, 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.
Unlisted import 'jszip' sketch/agent-harness/src/builder.js:14— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
FileTooLong: scripts/freecad_live_preview_demo.py docs/scripts/freecad_live_preview_demo.py— FileTooLong — 4218 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3718 over it, 8.44× 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: freecad/freecad_cli.py freecad/agent-harness/cli_anything/freecad/freecad_cli.py— FileTooLong — 3856 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3356 over it, 7.71× 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: scripts/video_doctor.py cli-hub-matrix/video-creation/scripts/video_doctor.py— FileTooLong — 2093 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1593 over it, 4.19× 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: sbox/sbox_cli.py sbox/agent-harness/cli_anything/sbox/sbox_cli.py— FileTooLong — 1850 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1350 over it, 3.70× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1819 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1319 over it, 3.64× 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: live2d/live2d_cli.py live2d/agent-harness/cli_anything/live2d/live2d_cli.py— FileTooLong — 1529 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1029 over it, 3.06× 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: cli_hub/preview.py cli-hub/cli_hub/preview.py— FileTooLong — 1497 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 997 over it, 2.99× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: n8n/n8n_cli.py n8n/agent-harness/cli_anything/n8n/n8n_cli.py— FileTooLong — 1436 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 936 over it, 2.87× 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: cloudcompare/cloudcompare_cli.py cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py— FileTooLong — 1325 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 825 over it, 2.65× 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: shotcut/shotcut_cli.py shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py— FileTooLong — 1233 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 733 over it, 2.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: REDACTED REDACTED— FileTooLong — 1178 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 678 over it, 2.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: core/body.py freecad/agent-harness/cli_anything/freecad/core/body.py— FileTooLong — 1082 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 582 over it, 2.16× 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: core/pipeline.py renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py— FileTooLong — 1011 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 511 over it, 2.02× 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: core/parts.py freecad/agent-harness/cli_anything/freecad/core/parts.py— FileTooLong — 985 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 485 over it, 1.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: iterm2_ctl/iterm2_ctl_cli.py iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py— FileTooLong — 982 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 482 over it, 1.96× 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: core/scene.py sbox/agent-harness/cli_anything/sbox/core/scene.py— FileTooLong — 949 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 449 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: plugin/BridgeMod.StateBuilder.cs slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs— FileTooLong — 880 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 380 over it, 1.76× 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: unrealinsights/unrealinsights_cli.py unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py— FileTooLong — 861 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 361 over it, 1.72× 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: rms/rms_cli.py rms/agent-harness/cli_anything/rms/rms_cli.py— FileTooLong — 856 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 356 over it, 1.71× 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: blender/blender_cli.py blender/agent-harness/cli_anything/blender/blender_cli.py— FileTooLong — 853 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 353 over it, 1.71× 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: lldb/dap.py lldb/agent-harness/cli_anything/lldb/dap.py— FileTooLong — 845 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 345 over it, 1.69× 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: cli_hub/cli.py cli-hub/cli_hub/cli.py— FileTooLong — 834 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 334 over it, 1.67× 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: core/sketch.py freecad/agent-harness/cli_anything/freecad/core/sketch.py— FileTooLong — 819 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 319 over it, 1.64× 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: inkscape/inkscape_cli.py inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py— FileTooLong — 812 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 312 over it, 1.62× 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: core/filters.py shotcut/agent-harness/cli_anything/shotcut/core/filters.py— FileTooLong — 798 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 298 over it, 1.60× 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.
Duplicated block (9 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1091— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1091-1099 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1176-1184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1091` 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 (9 lines × 2) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:790— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:790-798 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:713-721 — before extracting anything, compare `audacity/agent-harness/cli_anything/audacity/audacity_cli.py` and `kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:337— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:337-345 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1404-1412 — both copies are in the same file, so extract the 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) docs/scripts/blender_preview_story_demo.py:280— docs/scripts/blender_preview_story_demo.py:280-288 | docs/scripts/freecad_live_preview_demo.py:4430-4439 — 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 `docs/scripts/blender_preview_story_demo.py:280` 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) docs/scripts/blender_preview_story_demo.py:411— docs/scripts/blender_preview_story_demo.py:411-419 | docs/scripts/freecad_live_preview_demo.py:4554-4562 — 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) inkscape/agent-harness/cli_anything/inkscape/core/layers.py:135— inkscape/agent-harness/cli_anything/inkscape/core/layers.py:135-143 | obs-studio/agent-harness/cli_anything/obs_studio/core/sources.py:177-185 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) inkscape/agent-harness/cli_anything/inkscape/core/shapes.py:355— inkscape/agent-harness/cli_anything/inkscape/core/shapes.py:355-363 | inkscape/agent-harness/cli_anything/inkscape/core/text.py:295-303 — 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) iterm2/agent-harness/cli_anything/iterm2_ctl/core/prompt.py:105— iterm2/agent-harness/cli_anything/iterm2_ctl/core/prompt.py:105-113 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/prompt.py:154-162 — both copies are in the same file, so extract the 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 `iterm2/agent-harness/cli_anything/iterm2_ctl/core/prompt.py:105` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:87— kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:87-95 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:81-89 — before extracting anything, compare `kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py` and `shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 163 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. 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 (9 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:355— kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:355-363 | kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:369-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 (9 lines × 2) lldb/agent-harness/cli_anything/lldb/utils/session_client.py:78— lldb/agent-harness/cli_anything/lldb/utils/session_client.py:78-86 | lldb/agent-harness/cli_anything/lldb/utils/session_server.py:146-154 — 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 (9 lines × 2) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:145— minimax/agent-harness/cli_anything/minimax/minimax_cli.py:145-153 | minimax/agent-harness/cli_anything/minimax/minimax_cli.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.
Duplicated block (9 lines × 2) obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:301— obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:301-309 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:378-386 — both copies are in the same file, so extract the 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) obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:252— obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:252-260 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:276-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:545— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:545-553 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:691-699 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:545` 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) tigris/agent-harness/cli_anything/tigris/core/access_key.py:68— tigris/agent-harness/cli_anything/tigris/core/access_key.py:68-76 | tigris/agent-harness/cli_anything/tigris/core/access_key.py:170-178 — both copies are in the same file, so extract the 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 `tigris/agent-harness/cli_anything/tigris/core/access_key.py:68` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) blender/agent-harness/cli_anything/blender/core/preview.py:66— blender/agent-harness/cli_anything/blender/core/preview.py:66-74 | freecad/agent-harness/cli_anything/freecad/core/preview.py:70-78 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `freecad/agent-harness/cli_anything/freecad/core/preview.py:81` calls `_safe_path`, `replace` and `blender/agent-harness/cli_anything/blender/core/preview.py:77` 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 (9 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:40— kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:40-48 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:35-43 — before extracting anything, compare `kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py` and `shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 163 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. 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) kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:56— kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:56-64 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:50-58 — before extracting anything, compare `kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py` and `shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 163 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. 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 (9 lines × 2) libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:403— libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:403-411 | REDACTED:709-717 — 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 `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 (9 lines × 2) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:52— minimax/agent-harness/cli_anything/minimax/minimax_cli.py:52-60 | novita/agent-harness/cli_anything/novita/novita_cli.py:47-55 — before extracting anything, compare `minimax/agent-harness/cli_anything/minimax/minimax_cli.py` and `novita/agent-harness/cli_anything/novita/novita_cli.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:115— minimax/agent-harness/cli_anything/minimax/minimax_cli.py:115-123 | novita/agent-harness/cli_anything/novita/novita_cli.py:110-118 — before extracting anything, compare `minimax/agent-harness/cli_anything/minimax/minimax_cli.py` and `novita/agent-harness/cli_anything/novita/novita_cli.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) sbox/agent-harness/cli_anything/sbox/core/collision_config.py:32— sbox/agent-harness/cli_anything/sbox/core/collision_config.py:32-40 | sbox/agent-harness/cli_anything/sbox/core/input_config.py:26-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 (9 lines × 2) iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:267— iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:267-275 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/tmux.py:228-244 — 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 (8 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:94— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:94-101 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:117-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. 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) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:143— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:143-150 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:699-706 — both copies are in the same file, so extract the 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) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:787— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:787-794 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:810-817 — both copies are in the same file, so extract the 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 `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:787` 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) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:293— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:293-300 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:624-631 — both copies are in the same file, so extract the 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) blender/agent-harness/cli_anything/blender/core/materials.py:41— blender/agent-harness/cli_anything/blender/core/materials.py:41-48 | freecad/agent-harness/cli_anything/freecad/core/materials.py:182-189 — 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 (8 lines × 2) blender/agent-harness/cli_anything/blender/core/modifiers.py:274— blender/agent-harness/cli_anything/blender/core/modifiers.py:274-283 | gimp/agent-harness/cli_anything/gimp/core/filters.py:354-361 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) browser/agent-harness/cli_anything/browser/utils/domshell_backend.py:958— browser/agent-harness/cli_anything/browser/utils/domshell_backend.py:958-965 | browser/agent-harness/cli_anything/browser/utils/domshell_backend.py:1147-1156 — both copies are in the same file, so extract the 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) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1475— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1475-1482 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1505-1512 — both copies are in the same file, so extract the 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) docs/scripts/blender_preview_story_demo.py:532— docs/scripts/blender_preview_story_demo.py:532-539 | docs/scripts/freecad_live_preview_demo.py:4684-4692 — 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 `docs/scripts/blender_preview_story_demo.py:532` 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) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:107— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:107-114 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:86-93 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) freecad/agent-harness/cli_anything/freecad/core/motion.py:439— freecad/agent-harness/cli_anything/freecad/core/motion.py:439-446 | freecad/agent-harness/cli_anything/freecad/core/preview.py:245-252 — 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 `freecad/agent-harness/cli_anything/freecad/core/motion.py:439` 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) gimp/agent-harness/cli_anything/gimp/gimp_cli.py:684— gimp/agent-harness/cli_anything/gimp/gimp_cli.py:684-691 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:715-722 — both copies are in the same file, so extract the 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) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:103— macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:103-110 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:96-103 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) openscreen/agent-harness/cli_anything/openscreen/core/preview.py:89— openscreen/agent-harness/cli_anything/openscreen/core/preview.py:89-96 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:101-108 — 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 `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) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:944— renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:944-951 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1149-1156 — both copies are in the same file, so extract the 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) shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:175— shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:175-182 | shotcut/agent-harness/cli_anything/shotcut/core/filters.py:784-791 — 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) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:53— shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:53-60 | shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:75-82 — both copies are in the same file, so extract the 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) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:328— siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:328-335 | siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:426-433 — both copies are in the same file, so extract the 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) docs/scripts/blender_preview_story_demo.py:390— docs/scripts/blender_preview_story_demo.py:390-397 | docs/scripts/freecad_live_preview_demo.py:4533-4540 — 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 `docs/scripts/blender_preview_story_demo.py:390` 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) freecad/agent-harness/cli_anything/freecad/core/import_mod.py:107— freecad/agent-harness/cli_anything/freecad/core/import_mod.py:107-114 | freecad/agent-harness/cli_anything/freecad/core/parts.py:108-119 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `key` to `str` in one and `str = "parts"` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 2) mubu/agent-harness/cli_anything/mubu/mubu_cli.py:172— mubu/agent-harness/cli_anything/mubu/mubu_cli.py:172-179 | zotero/agent-harness/cli_anything/zotero/core/session.py:82-89 — 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 (6 lines × 2) cloudcompare/agent-harness/cli_anything/cloudcompare/core/export.py:86— cloudcompare/agent-harness/cli_anything/cloudcompare/core/export.py:86-92 | cloudcompare/agent-harness/cli_anything/cloudcompare/core/export.py:153-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 (6 lines × 2) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:185— iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:185-190 | iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:1138-1143 — both copies are in the same file, so extract the 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 `iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:185` 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) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:409— iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:409-414 | iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:540-545 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) live2d/agent-harness/cli_anything/live2d/core/differ.py:98— live2d/agent-harness/cli_anything/live2d/core/differ.py:98-103 | live2d/agent-harness/cli_anything/live2d/core/differ.py:104-109 — both copies are in the same file, so extract the 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:1498— REDACTED:1498-1503 | REDACTED:1541-1546 — both copies are in the same file, so extract the 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) sbox/agent-harness/cli_anything/sbox/core/prefab.py:228— sbox/agent-harness/cli_anything/sbox/core/prefab.py:228-233 | sbox/agent-harness/cli_anything/sbox/core/scene.py:1233-1239 — 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 (6 lines × 2) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:448— siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:448-453 | siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:540-545 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) QGIS/agent-harness/cli_anything/qgis/core/session.py:65— QGIS/agent-harness/cli_anything/qgis/core/session.py:65-70 | anygen/agent-harness/cli_anything/anygen/core/session.py:57-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:203— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:203-208 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:190-195 — 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 (6 lines × 2) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:134— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:134-147 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:178-183 — 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 (6 lines × 2) gimp/agent-harness/cli_anything/gimp/gimp_cli.py:192— gimp/agent-harness/cli_anything/gimp/gimp_cli.py:192-197 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:198-203 — before extracting anything, compare `gimp/agent-harness/cli_anything/gimp/gimp_cli.py` and `kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 175 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/core/guides.py:10— kdenlive/agent-harness/cli_anything/kdenlive/core/guides.py:10-15 | kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:46-51 — 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 (6 lines × 2) libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:423— libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:423-428 | REDACTED:729-734 — 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 `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 (6 lines × 2) minimax/agent-harness/cli_anything/minimax/core/session.py:85— minimax/agent-harness/cli_anything/minimax/core/session.py:85-90 | novita/agent-harness/cli_anything/novita/core/session.py:85-90 — before extracting anything, compare `minimax/agent-harness/cli_anything/minimax/core/session.py` and `novita/agent-harness/cli_anything/novita/core/session.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) minimax/agent-harness/cli_anything/minimax/core/session.py:93— minimax/agent-harness/cli_anything/minimax/core/session.py:93-98 | novita/agent-harness/cli_anything/novita/core/session.py:93-98 — before extracting anything, compare `minimax/agent-harness/cli_anything/minimax/core/session.py` and `novita/agent-harness/cli_anything/novita/core/session.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) cli-hub/cli_hub/matrix.py:100— cli-hub/cli_hub/matrix.py:100-105 | cli-hub/cli_hub/registry.py:94-99 — 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 (6 lines × 2) REDACTED:2103— REDACTED:2103-2108 | REDACTED:2201-2206 — both copies are in the same file, so extract the 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:2103` 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) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:844— n8n/agent-harness/cli_anything/n8n/n8n_cli.py:844-849 | n8n/agent-harness/cli_anything/n8n/n8n_cli.py:876-881 — both copies are in the same file, so extract the 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) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:297— siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:297-302 | siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:385-390 — both copies are in the same file, so extract the 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) nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:23— nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:23-28 | nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_publisher.swift:75-80 — before extracting anything, compare `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift` and `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_publisher.swift` 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. 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.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×14
Edited copy of a member (11 corresponding lines) openrefine/agent-harness/cli_anything/openrefine/core/project.py:79— openrefine/agent-harness/cli_anything/openrefine/core/project.py:79-89 | openrefine/agent-harness/cli_anything/openrefine/core/project.py:92-102 — 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) 3MF/agent-harness/cli_anything/threemf/core/inspector.py:392— 3MF/agent-harness/cli_anything/threemf/core/inspector.py:392-406 | 3MF/agent-harness/cli_anything/threemf/core/modifier.py:190-200 — 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) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2161— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2161-2171 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2177-2187 — 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) blender/agent-harness/cli_anything/blender/blender_cli.py:249— blender/agent-harness/cli_anything/blender/blender_cli.py:249-259 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:204-217 — 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) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:463— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:463-476 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1443-1453 — 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) safari/agent-harness/cli_anything/safari/safari_cli.py:89— safari/agent-harness/cli_anything/safari/safari_cli.py:89-99 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/web_yu_pri_cli.py:33-43 — 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) wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:327— wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:327-338 | wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:566-576 — 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) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:599— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:599-609 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1903-1913 — 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) drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:44— drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:44-54 | libreoffice/agent-harness/cli_anything/libreoffice/utils/lo_backend.py:86-101 — 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) wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:186— wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:186-196 | wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:429-439 — 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:236— REDACTED:236-246 | REDACTED:301-311 — 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) tigris/agent-harness/cli_anything/tigris/core/auth.py:22— tigris/agent-harness/cli_anything/tigris/core/auth.py:22-32 | tigris/agent-harness/cli_anything/tigris/core/auth.py:38-48 — 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:187— REDACTED:187-197 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:175-187 — 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) firefly-iii/agent-harness/cli_anything/firefly_iii/core/autocomplete.py:23— firefly-iii/agent-harness/cli_anything/firefly_iii/core/autocomplete.py:23-35 | firefly-iii/agent-harness/cli_anything/firefly_iii/core/tags.py:40-50 — 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.
Duplicated block (5 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:736— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:736-740 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:752-756 — both copies are in the same file, so extract the 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) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:524— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:524-528 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:627-631 — both copies are in the same file, so extract the 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 `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:524` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:626` calls `AppendLine` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:523` 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) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:522— iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:522-526 | iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:625-629 — both copies are in the same file, so extract the 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 `iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:522` 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) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1496— n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1496-1500 | n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1527-1531 — both copies are in the same file, so extract the 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) lldb/agent-harness/cli_anything/lldb/utils/session_client.py:90— lldb/agent-harness/cli_anything/lldb/utils/session_client.py:90-94 | lldb/agent-harness/cli_anything/lldb/utils/session_server.py:158-162 — 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) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:44— minimax/agent-harness/cli_anything/minimax/minimax_cli.py:44-48 | novita/agent-harness/cli_anything/novita/novita_cli.py:39-43 — before extracting anything, compare `minimax/agent-harness/cli_anything/minimax/minimax_cli.py` and `novita/agent-harness/cli_anything/novita/novita_cli.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 180 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: `ChatSession` names `cli_anything.minimax.core.session` in one and `cli_anything.novita.core.session` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) drawio/agent-harness/cli_anything/drawio/core/connectors.py:8— drawio/agent-harness/cli_anything/drawio/core/connectors.py:8-12 | drawio/agent-harness/cli_anything/drawio/core/shapes.py:8-12 — before extracting anything, compare `drawio/agent-harness/cli_anything/drawio/core/connectors.py` and `drawio/agent-harness/cli_anything/drawio/core/shapes.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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) iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:133— iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:133-137 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/window.py:67-71 — 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 (5 lines × 2) obs-studio/agent-harness/cli_anything/obs_studio/core/scenes.py:56— obs-studio/agent-harness/cli_anything/obs_studio/core/scenes.py:56-60 | obs-studio/agent-harness/cli_anything/obs_studio/core/transitions.py:76-80 — 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 (5 lines × 2) cli-hub/cli_hub/cli.py:878— cli-hub/cli_hub/cli.py:878-882 | cli-hub/cli_hub/cli.py:906-910 — both copies are in the same file, so extract the 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) kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:102— kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:102-106 | kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:108-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 (5 lines × 2) live2d/agent-harness/cli_anything/live2d/core/comparer.py:69— live2d/agent-harness/cli_anything/live2d/core/comparer.py:69-73 | live2d/agent-harness/cli_anything/live2d/core/comparer.py:109-113 — both copies are in the same file, so extract the 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) macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:258— macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:258-262 | macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:456-460 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) sbox/agent-harness/cli_anything/sbox/core/prefab.py:22— sbox/agent-harness/cli_anything/sbox/core/prefab.py:22-26 | sbox/agent-harness/cli_anything/sbox/core/scene.py:365-369 — 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) cli-hub-matrix/video-creation/scripts/video_doctor.py:1370— cli-hub-matrix/video-creation/scripts/video_doctor.py:1370-1376 | cli-hub-matrix/video-creation/scripts/video_doctor.py:1574-1580 — both copies are in the same file, so extract the 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) docs/scripts/blender_orbital_relay_drone_demo.py:254— docs/scripts/blender_orbital_relay_drone_demo.py:254-260 | docs/scripts/blender_orbital_relay_drone_demo.py:282-288 — both copies are in the same file, so extract the 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 `docs/scripts/blender_orbital_relay_drone_demo.py:254` 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) gimp/agent-harness/cli_anything/gimp/gimp_cli.py:518— gimp/agent-harness/cli_anything/gimp/gimp_cli.py:518-524 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:469-476 — before extracting anything, compare `gimp/agent-harness/cli_anything/gimp/gimp_cli.py` and `obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 145 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 `obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:469` 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 × 2) REDACTED:413— REDACTED:413-419 | REDACTED:277-283 — 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 `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) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:504— renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:504-510 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:517-523 — both copies are in the same file, so extract the 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) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2165— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2165-2171 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2181-2187 — both copies are in the same file, so extract the 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) wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:102— wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:102-108 | wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:308-314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:100` calls `get` and `wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:307` 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 (7 lines × 2) drawio/agent-harness/cli_anything/drawio/core/session.py:53— drawio/agent-harness/cli_anything/drawio/core/session.py:53-59 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:66-72 — before extracting anything, compare `drawio/agent-harness/cli_anything/drawio/core/session.py` and `shotcut/agent-harness/cli_anything/shotcut/core/session.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:228— kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:228-234 | kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:414-420 — both copies are in the same file, so extract the 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) freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:182— freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:182-188 | krita/agent-harness/cli_anything/krita/utils/krita_backend.py:145-151 — 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 `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) lldb/agent-harness/cli_anything/lldb/utils/session_client.py:68— lldb/agent-harness/cli_anything/lldb/utils/session_client.py:68-74 | lldb/agent-harness/cli_anything/lldb/utils/session_server.py:136-142 — 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) gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:38— gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:38-44 | inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:25-31 — 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 `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) live2d/agent-harness/cli_anything/live2d/core/moc3_parser.py:24— live2d/agent-harness/cli_anything/live2d/core/moc3_parser.py:24-30 | live2d/agent-harness/cli_anything/live2d/core/packager.py:31-37 — 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 (7 lines × 2) shotcut/agent-harness/cli_anything/shotcut/core/export.py:129— shotcut/agent-harness/cli_anything/shotcut/core/export.py:129-135 | shotcut/agent-harness/cli_anything/shotcut/core/filters.py:753-759 — 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 (12 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:224— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:224-235 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:342-353 — before extracting anything, compare `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:786— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:786-797 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:561-573 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) calibre/agent-harness/cli_anything/calibre/calibre_cli.py:309— calibre/agent-harness/cli_anything/calibre/calibre_cli.py:309-320 | calibre/agent-harness/cli_anything/calibre/calibre_cli.py:499-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 (12 lines × 2) cli-hub/cli_hub/installer.py:342— cli-hub/cli_hub/installer.py:342-353 | cli-hub/cli_hub/installer.py:375-386 — both copies are in the same file, so extract the 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) firefly-iii/agent-harness/cli_anything/firefly_iii/core/recurrences.py:70— firefly-iii/agent-harness/cli_anything/firefly_iii/core/recurrences.py:70-81 | firefly-iii/agent-harness/cli_anything/firefly_iii/core/recurrences.py:124-135 — both copies are in the same file, so extract the 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) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:152— minimax/agent-harness/cli_anything/minimax/minimax_cli.py:152-163 | novita/agent-harness/cli_anything/novita/novita_cli.py:145-157 — before extracting anything, compare `minimax/agent-harness/cli_anything/minimax/minimax_cli.py` and `novita/agent-harness/cli_anything/novita/novita_cli.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 180 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 × 2) musescore/agent-harness/cli_anything/musescore/musescore_cli.py:201— musescore/agent-harness/cli_anything/musescore/musescore_cli.py:201-212 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:270-281 — both copies are in the same file, so extract the 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 `musescore/agent-harness/cli_anything/musescore/musescore_cli.py:201` 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) openscreen/agent-harness/cli_anything/openscreen/core/preview.py:125— openscreen/agent-harness/cli_anything/openscreen/core/preview.py:125-136 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:137-148 — 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 `openscreen/agent-harness/cli_anything/openscreen/core/preview.py:125` 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 (12 lines × 2) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:135— renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:135-146 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:313-324 — both copies are in the same file, so extract the 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 `renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:135` 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 (12 lines × 2) shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:112— shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:112-123 | shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:162-173 — both copies are in the same file, so extract the 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) shotcut/agent-harness/cli_anything/shotcut/core/project.py:177— shotcut/agent-harness/cli_anything/shotcut/core/project.py:177-188 | shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:408-419 — 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) 3MF/agent-harness/cli_anything/threemf/core/inspector.py:252— 3MF/agent-harness/cli_anything/threemf/core/inspector.py:252-263 | 3MF/agent-harness/cli_anything/threemf/core/repair.py:216-227 — 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) kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:308— kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:308-322 | obs-studio/agent-harness/cli_anything/obs_studio/core/filters.py:268-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. 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) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:218— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:218-227 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:228-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 (10 lines × 2) browser/agent-harness/cli_anything/browser/browser_cli.py:120— browser/agent-harness/cli_anything/browser/browser_cli.py:120-129 | safari/agent-harness/cli_anything/safari/safari_cli.py:203-212 — 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 `browser/agent-harness/cli_anything/browser/browser_cli.py:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:249— kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:249-258 | kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:175-184 — 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 lines × 2) macrocli/agent-harness/cli_anything/macrocli/backends/gui_macro.py:127— macrocli/agent-harness/cli_anything/macrocli/backends/gui_macro.py:127-136 | macrocli/agent-harness/cli_anything/macrocli/backends/native_api.py:237-246 — 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 `macrocli/agent-harness/cli_anything/macrocli/backends/gui_macro.py:127` 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 lines × 2) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:105— macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:105-114 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:88-97 — 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 `macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:105` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:808— n8n/agent-harness/cli_anything/n8n/n8n_cli.py:808-817 | n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1737-1746 — both copies are in the same file, so extract the 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) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/commands.py:105— nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/commands.py:105-114 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/commands.py:135-144 — both copies are in the same file, so extract the 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) sbox/agent-harness/cli_anything/sbox/core/localization.py:25— sbox/agent-harness/cli_anything/sbox/core/localization.py:25-35 | sbox/agent-harness/cli_anything/sbox/core/sound.py:56-65 — 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 lines × 2) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:721— unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:721-730 | unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:762-771 — both copies are in the same file, so extract the 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, `unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:732` calls `echo` and `unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:773` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:825— n8n/agent-harness/cli_anything/n8n/n8n_cli.py:825-834 | n8n/agent-harness/cli_anything/n8n/n8n_cli.py:857-866 — both copies are in the same file, so extract the 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) freecad/agent-harness/cli_anything/freecad/core/draft.py:1241— freecad/agent-harness/cli_anything/freecad/core/draft.py:1241-1260 | freecad/agent-harness/cli_anything/freecad/core/parts.py:413-422 — 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 (10 lines × 2) REDACTED:372— REDACTED:372-381 | REDACTED:384-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 (10 lines × 2) nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:51— nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:51-60 | nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_publisher.swift:57-66 — before extracting anything, compare `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift` and `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_publisher.swift` 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. 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 `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:51` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×11
Edited copy of a member (6 corresponding lines) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:309— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:309-315 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:361-366 — 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) eez-studio/agent-harness/cli_anything/eez_studio/core/session.py:20— eez-studio/agent-harness/cli_anything/eez_studio/core/session.py:20-25 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:53-59 — 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) wavetone/agent-harness/cli_anything/wavetone/wavetone_cli.py:132— wavetone/agent-harness/cli_anything/wavetone/wavetone_cli.py:132-138 | wavetone/agent-harness/cli_anything/wavetone/wavetone_cli.py:145-150 — 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) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:461— iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:461-467 | iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:478-483 — 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) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:570— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:570-575 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:990-996 — 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) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:581— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:581-586 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1002-1008 — 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) kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py:11— kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py:11-16 | krita/agent-harness/cli_anything/krita/core/project.py:297-322 — 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) web-yu-pri/agent-harness/cli_anything/web_yu_pri/core/browser.py:118— web-yu-pri/agent-harness/cli_anything/web_yu_pri/core/browser.py:118-123 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/web_yu_pri_cli.py:335-342 — 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) REDACTED:31— REDACTED:31-36 | zotero/agent-harness/cli_anything/zotero/utils/zotero_paths.py:121-128 — 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) kdenlive/agent-harness/cli_anything/kdenlive/core/bin.py:10— kdenlive/agent-harness/cli_anything/kdenlive/core/bin.py:10-15 | kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py:20-25 — 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) comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:311— comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:311-320 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:313-318 — 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) · ×11
Edited copy of a member (4 corresponding lines) cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:62— cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:62-65 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:108-111 — 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) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:391— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:391-394 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:949-953 — 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) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:341— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:341-348 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:455-458 — 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) freecad/agent-harness/cli_anything/freecad/core/import_mod.py:54— freecad/agent-harness/cli_anything/freecad/core/import_mod.py:54-57 | freecad/agent-harness/cli_anything/freecad/core/mesh.py:57-60 — 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) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:536— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:536-540 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:512-515 — 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) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:592— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:592-595 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1014-1017 — 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) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:315— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:315-318 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:794-797 — 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) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:488— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:488-491 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:912-915 — 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) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:210— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:210-213 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:288-291 — 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) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:302— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:302-305 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:603-606 — 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) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:1366— iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:1366-1375 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:403-406 — 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 (11 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:183— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:183-193 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:187-197 — before extracting anything, compare `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 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 `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:183` 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) .github/scripts/generate_meta_skill.py:99— .github/scripts/generate_meta_skill.py:99-109 | .github/scripts/generate_meta_skill.py:121-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `.github/scripts/generate_meta_skill.py:133` calls `get`, `str`, `startswith` and `.github/scripts/generate_meta_skill.py:110` 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) docs/scripts/blender_orbital_relay_drone_demo.py:254— docs/scripts/blender_orbital_relay_drone_demo.py:254-264 | docs/scripts/blender_orbital_relay_drone_demo.py:291-301 — both copies are in the same file, so extract the 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 `docs/scripts/blender_orbital_relay_drone_demo.py:254` 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) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:109— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:109-119 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:98-108 — 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 `drawio/agent-harness/cli_anything/drawio/drawio_cli.py:109` 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) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:153— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:153-163 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:115-125 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:106— macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:106-116 | macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py:113-123 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) macrocli/agent-harness/cli_anything/macrocli/core/recorder.py:398— macrocli/agent-harness/cli_anything/macrocli/core/recorder.py:398-409 | macrocli/agent-harness/cli_anything/macrocli/core/recorder.py:425-435 — both copies are in the same file, so extract the 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 `macrocli/agent-harness/cli_anything/macrocli/core/recorder.py:398` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) seaclip/agent-harness/cli_anything/seaclip/core/issues.py:94— seaclip/agent-harness/cli_anything/seaclip/core/issues.py:94-104 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:119-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.
Duplicated block (11 lines × 2) zotero/agent-harness/cli_anything/zotero/utils/zotero_sqlite.py:673— zotero/agent-harness/cli_anything/zotero/utils/zotero_sqlite.py:673-683 | zotero/agent-harness/cli_anything/zotero/utils/zotero_sqlite.py:713-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 (11 lines × 2) calibre/agent-harness/cli_anything/calibre/calibre_cli.py:360— calibre/agent-harness/cli_anything/calibre/calibre_cli.py:360-370 | calibre/agent-harness/cli_anything/calibre/calibre_cli.py:552-562 — both copies are in the same file, so extract the 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) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1786— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1786-1796 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1813-1823 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×10
Members sharing a duplicated core (6 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/core/project.py:68— audacity/agent-harness/cli_anything/audacity/core/project.py:68-75 | blender/agent-harness/cli_anything/blender/core/scene.py:135-142 | gimp/agent-harness/cli_anything/gimp/core/project.py:77-84 | REDACTED:102-109 | kdenlive/agent-harness/cli_anything/kdenlive/core/project.py:134-141 | obs-studio/agent-harness/cli_anything/obs_studio/core/project.py:93-100 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:61— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:61-67 | cli-anything-plugin/preview_bundle.py:61-67 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:61-67 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:61-67 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:61-67 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:61-67 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:111— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:111-131 | cli-anything-plugin/preview_bundle.py:111-131 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:111-131 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:111-131 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:111-131 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:111-131 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:141— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:141-168 | cli-anything-plugin/preview_bundle.py:141-168 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:141-168 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:141-168 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:141-168 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:141-168 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:182— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:182-223 | cli-anything-plugin/preview_bundle.py:182-223 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:182-223 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:182-223 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:182-223 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:182-223 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:236— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:236-250 | cli-anything-plugin/preview_bundle.py:236-250 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:236-250 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:236-250 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:236-250 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:236-250 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:254— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:254-259 | cli-anything-plugin/preview_bundle.py:254-259 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:254-259 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:254-259 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:254-259 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:254-259 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:280— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:280-311 | cli-anything-plugin/preview_bundle.py:280-311 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:280-311 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:280-311 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:280-311 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:280-311 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:375— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:375-402 | cli-anything-plugin/preview_bundle.py:375-402 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:375-402 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:375-402 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:375-402 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:375-402 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:422— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:422-468 | cli-anything-plugin/preview_bundle.py:422-468 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:422-468 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:422-468 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:422-468 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:422-468 — 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· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×10
Members sharing a duplicated core (4 members, 50+ identical tokens) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:358— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:358-363 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:383-388 | novita/agent-harness/cli_anything/novita/novita_cli.py:272-277 | rms/agent-harness/cli_anything/rms/rms_cli.py:1088-1093 — 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) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:369— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:369-386 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:394-411 | novita/agent-harness/cli_anything/novita/novita_cli.py:283-300 | rms/agent-harness/cli_anything/rms/rms_cli.py:1099-1113 — 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) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:462— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:462-515 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:497-550 | novita/agent-harness/cli_anything/novita/novita_cli.py:370-419 | rms/agent-harness/cli_anything/rms/rms_cli.py:1177-1242 — 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) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:186— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:186-196 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:175-185 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:181-191 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:173-183 — 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) audacity/agent-harness/cli_anything/audacity/core/clips.py:128— audacity/agent-harness/cli_anything/audacity/core/clips.py:128-138 | blender/agent-harness/cli_anything/blender/core/animation.py:102-135 | blender/agent-harness/cli_anything/blender/core/animation.py:236-263 | freecad/agent-harness/cli_anything/freecad/core/body.py:2138-2151 — 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) blender/agent-harness/cli_anything/blender/core/modifiers.py:240— blender/agent-harness/cli_anything/blender/core/modifiers.py:240-250 | blender/agent-harness/cli_anything/blender/core/modifiers.py:260-283 | gimp/agent-harness/cli_anything/gimp/core/filters.py:320-330 | gimp/agent-harness/cli_anything/gimp/core/filters.py:340-361 — 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) cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:42— cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:42-58 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:87-104 | eez-studio/agent-harness/cli_anything/eez_studio/eez_studio_cli.py:67-83 | macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:67-83 — 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) docs/scripts/freecad_live_preview_demo.py:3653— docs/scripts/freecad_live_preview_demo.py:3653-3683 | docs/scripts/freecad_live_preview_demo.py:3756-3789 | docs/scripts/freecad_live_preview_demo.py:3828-3871 | docs/scripts/freecad_live_preview_demo.py:3875-3924 — 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) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:126— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:126-158 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:142-171 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:120-147 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:114-135 — 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) tigris/agent-harness/cli_anything/tigris/core/access_key.py:24— tigris/agent-harness/cli_anything/tigris/core/access_key.py:24-53 | tigris/agent-harness/cli_anything/tigris/core/iam.py:34-63 | tigris/agent-harness/cli_anything/tigris/core/iam.py:100-129 | tigris/agent-harness/cli_anything/tigris/core/object.py:46-75 — 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.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×10
Edited copy of a member (9 corresponding lines) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:446— siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:446-454 | siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:537-546 — 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) mubu/agent-harness/cli_anything/mubu/mubu_cli.py:732— mubu/agent-harness/cli_anything/mubu/mubu_cli.py:732-741 | zotero/agent-harness/cli_anything/zotero/zotero_cli.py:1073-1081 — 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) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1521— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1521-1530 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1565-1573 — 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) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1550— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1550-1558 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1579-1591 — 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) anygen/agent-harness/cli_anything/anygen/core/task.py:83— anygen/agent-harness/cli_anything/anygen/core/task.py:83-91 | anygen/agent-harness/cli_anything/anygen/core/task.py:95-103 — 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) kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:461— kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:461-470 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:546-554 — 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) drawio/agent-harness/cli_anything/drawio/core/session.py:121— drawio/agent-harness/cli_anything/drawio/core/session.py:121-129 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:183-192 — 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) REDACTED:280— REDACTED:280-290 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/replay.py:70-78 — 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) libreoffice/agent-harness/cli_anything/libreoffice/core/calc.py:146— libreoffice/agent-harness/cli_anything/libreoffice/core/calc.py:146-154 | libreoffice/agent-harness/cli_anything/libreoffice/core/calc.py:162-170 — 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) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:120— iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:120-135 | rms/agent-harness/cli_anything/rms/rms_cli.py:103-111 — 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 (13 lines × 3) QGIS/agent-harness/cli_anything/qgis/core/session.py:18— QGIS/agent-harness/cli_anything/qgis/core/session.py:18-32 | eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:36-48 | zotero/agent-harness/cli_anything/zotero/core/session.py:49-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `str` in one and `str | os.PathLike[str]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `QGIS/agent-harness/cli_anything/qgis/core/session.py:17` calls `makedirs`, `dirname`, `abspath` and `zotero/agent-harness/cli_anything/zotero/core/session.py:48` 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 × 3) blender/agent-harness/cli_anything/blender/core/preview.py:294— blender/agent-harness/cli_anything/blender/core/preview.py:294-306 | openscreen/agent-harness/cli_anything/openscreen/core/preview.py:109-121 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:122-134 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `blender/agent-harness/cli_anything/blender/core/preview.py:294` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:677— blender/agent-harness/cli_anything/blender/core/preview.py:677-689 | freecad/agent-harness/cli_anything/freecad/core/preview.py:687-699 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:641-653 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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 (13 lines × 3) calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:107— calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:107-119 | calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:146-158 | calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:185-197 — 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 (13 lines × 3) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:331— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:331-343 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_system.py:27-39 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_system.py:146-158 — 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) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:60— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:60-72 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:34-46 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:123-135 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:48` calls `str`, `lower` and `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:74` 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 × 3) kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:197— kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:197-209 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:226-238 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:281-293 — 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 (13 lines × 3) REDACTED:84— REDACTED:84-96 | macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:278-290 | macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py:341-353 — 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 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 lines × 3) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:189— renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:189-201 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:401-413 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:416-428 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:189` 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, `renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:188` calls `get` and `renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:400` 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 (13 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:159— blender/agent-harness/cli_anything/blender/core/preview.py:159-171 | freecad/agent-harness/cli_anything/freecad/core/preview.py:167-179 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:359-371 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. 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 lines × 2) blender/agent-harness/cli_anything/blender/core/preview.py:509— blender/agent-harness/cli_anything/blender/core/preview.py:509-521 | freecad/agent-harness/cli_anything/freecad/core/preview.py:522-534 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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 `blender/agent-harness/cli_anything/blender/core/preview.py:509` 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, `blender/agent-harness/cli_anything/blender/core/preview.py:508` calls `get_project` and `freecad/agent-harness/cli_anything/freecad/core/preview.py:521` 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) docs/scripts/blender_orbital_relay_drone_demo.py:183— docs/scripts/blender_orbital_relay_drone_demo.py:183-195 | docs/scripts/blender_orbital_relay_drone_demo.py:230-242 — both copies are in the same file, so extract the 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 `docs/scripts/blender_orbital_relay_drone_demo.py:183` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:623— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:623-635 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1177-1189 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: `ReplSkin` names `cli_anything.drawio.utils.repl_skin` in one and `cli_anything.shotcut.utils.repl_skin` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1192` calls `_run_repl`, `create_prompt_session` and `drawio/agent-harness/cli_anything/drawio/drawio_cli.py:638` 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) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:134— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:134-146 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:122-134 — 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 (13 lines × 2) lldb/agent-harness/cli_anything/lldb/lldb_cli.py:694— lldb/agent-harness/cli_anything/lldb/lldb_cli.py:694-706 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:498-510 — 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 (13 lines × 2) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:330— renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:330-342 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:344-356 — both copies are in the same file, so extract the 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) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1006— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1006-1018 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1969-1981 — both copies are in the same file, so extract the 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 lines × 2) zotero/agent-harness/cli_anything/zotero/core/experimental.py:91— zotero/agent-harness/cli_anything/zotero/core/experimental.py:91-103 | zotero/agent-harness/cli_anything/zotero/core/experimental.py:134-146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `zotero/agent-harness/cli_anything/zotero/core/experimental.py:132` calls `RuntimeError` and `zotero/agent-harness/cli_anything/zotero/core/experimental.py:90` 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) drawio/agent-harness/cli_anything/drawio/core/connectors.py:62— drawio/agent-harness/cli_anything/drawio/core/connectors.py:62-74 | drawio/agent-harness/cli_anything/drawio/core/shapes.py:59-71 — before extracting anything, compare `drawio/agent-harness/cli_anything/drawio/core/connectors.py` and `drawio/agent-harness/cli_anything/drawio/core/shapes.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 lines × 2) shotcut/agent-harness/cli_anything/shotcut/core/filters.py:733— shotcut/agent-harness/cli_anything/shotcut/core/filters.py:733-749 | shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:145-157 — 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.
Sync-over-async blocking sketch/agent-harness/src/builder.js:55— `fs.writeFileSync` in `buildSketchFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking sketch/agent-harness/src/builder.js:327— `fs.readFileSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking sketch/agent-harness/src/builder.js:381— `fs.existsSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking sketch/agent-harness/src/builder.js:382— `fs.mkdirSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking — 5 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:278— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:203— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:249— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:265— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:311— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×9
Members sharing a duplicated core (5 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/core/effects.py:184— audacity/agent-harness/cli_anything/audacity/core/effects.py:184-228 | blender/agent-harness/cli_anything/blender/core/materials.py:153-196 | blender/agent-harness/cli_anything/blender/core/modifiers.py:151-187 | freecad/agent-harness/cli_anything/freecad/core/materials.py:474-523 | gimp/agent-harness/cli_anything/gimp/core/filters.py:247-283 — 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) audacity/agent-harness/cli_anything/audacity/core/project.py:79— audacity/agent-harness/cli_anything/audacity/core/project.py:79-84 | blender/agent-harness/cli_anything/blender/core/scene.py:146-151 | REDACTED:113-118 | libreoffice/agent-harness/cli_anything/libreoffice/core/document.py:142-147 | obs-studio/agent-harness/cli_anything/obs_studio/core/project.py:104-109 — 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) blender/agent-harness/cli_anything/blender/core/preview.py:292— blender/agent-harness/cli_anything/blender/core/preview.py:292-436 | freecad/agent-harness/cli_anything/freecad/core/preview.py:321-451 | openscreen/agent-harness/cli_anything/openscreen/core/preview.py:107-247 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:121-282 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:120-260 — 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) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:927— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:927-943 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:952-968 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:992-1011 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1020-1036 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1098-1119 — 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) drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:71— drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:71-145 | kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:107-168 | kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:182-230 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:101-162 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:176-224 — 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) libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:22— libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:22-38 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:48-67 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:76-96 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:106-127 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:134-146 — 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) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:379— renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:379-429 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:442-538 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:891-1012 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1331-1354 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1368-1428 — 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) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1260— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1260-1285 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1297-1313 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1849-1860 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1938-1949 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2025-2032 — 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) tigris/agent-harness/cli_anything/tigris/core/access_key.py:60— tigris/agent-harness/cli_anything/tigris/core/access_key.py:60-77 | tigris/agent-harness/cli_anything/tigris/core/access_key.py:84-101 | tigris/agent-harness/cli_anything/tigris/core/access_key.py:159-179 | tigris/agent-harness/cli_anything/tigris/core/bucket.py:94-111 | tigris/agent-harness/cli_anything/tigris/core/object.py:162-179 — 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 (8 corresponding lines) · ×9
Edited copy of a member (8 corresponding lines) openrefine/agent-harness/cli_anything/openrefine/core/project.py:25— openrefine/agent-harness/cli_anything/openrefine/core/project.py:25-32 | openrefine/agent-harness/cli_anything/openrefine/core/project.py:35-43 — 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) cli-hub/cli_hub/installer.py:185— cli-hub/cli_hub/installer.py:185-192 | cli-hub/cli_hub/installer.py:207-215 — 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) eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/eth2_quickstart_cli.py:32— eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/eth2_quickstart_cli.py:32-44 | wavetone/agent-harness/cli_anything/wavetone/wavetone_cli.py:31-38 — 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) unrealinsights/agent-harness/cli_anything/unrealinsights/core/capture.py:48— unrealinsights/agent-harness/cli_anything/unrealinsights/core/capture.py:48-57 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/unrealinsights_backend.py:122-129 — 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) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2055— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2055-2062 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2104-2112 — 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) notebooklm/agent-harness/cli_anything/notebooklm/notebooklm_cli.py:27— notebooklm/agent-harness/cli_anything/notebooklm/notebooklm_cli.py:27-34 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:39-52 — 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) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:206— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:206-217 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:618-625 — 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) shotcut/agent-harness/cli_anything/shotcut/core/session.py:124— shotcut/agent-harness/cli_anything/shotcut/core/session.py:124-134 | drawio/agent-harness/cli_anything/drawio/core/session.py:102-109 — 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) jumpserver/agent-harness/cli_anything/jumpserver/core/session.py:46— jumpserver/agent-harness/cli_anything/jumpserver/core/session.py:46-54 | jumpserver/agent-harness/cli_anything/jumpserver/core/state.py:35-42 — 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.
Duplicated block (15 lines × 2) anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:174— anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:174-188 | anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:248-262 — both copies are in the same file, so extract the 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) eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:33— eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:33-47 | zotero/agent-harness/cli_anything/zotero/core/session.py:46-60 — before extracting anything, compare `eez-studio/agent-harness/cli_anything/eez_studio/core/project.py` and `zotero/agent-harness/cli_anything/zotero/core/session.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `str | os.PathLike[str]` in one and `Path` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (15 lines × 2) firefly-iii/agent-harness/cli_anything/firefly_iii/core/bills.py:99— firefly-iii/agent-harness/cli_anything/firefly_iii/core/bills.py:99-113 | firefly-iii/agent-harness/cli_anything/firefly_iii/core/recurrences.py:116-130 — 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 (15 lines × 2) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:62— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:62-76 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:125-139 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:145` calls `group`, `terminal_group` and `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:82` 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) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:33— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:33-47 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:39-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.
Duplicated block (15 lines × 2) minimax/agent-harness/cli_anything/minimax/core/session.py:41— minimax/agent-harness/cli_anything/minimax/core/session.py:41-55 | novita/agent-harness/cli_anything/novita/core/session.py:41-55 — before extracting anything, compare `minimax/agent-harness/cli_anything/minimax/core/session.py` and `novita/agent-harness/cli_anything/novita/core/session.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 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 (15 lines × 2) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:747— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:747-761 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1029-1043 — both copies are in the same file, so extract the 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) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:689— shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:689-704 | shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:734-748 — both copies are in the same file, so extract the 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) firefly-iii/agent-harness/cli_anything/firefly_iii/core/budgets.py:56— firefly-iii/agent-harness/cli_anything/firefly_iii/core/budgets.py:56-70 | firefly-iii/agent-harness/cli_anything/firefly_iii/core/categories.py:55-69 — 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.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×8
Edited copy of a member (12 corresponding lines) REDACTED:294— REDACTED:294-312 | REDACTED:471-483 — 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) shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:581— shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:581-592 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:840-854 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:449— cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:449-460 | cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:512-525 — 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) joplin/agent-harness/cli_anything/joplin/joplin_cli.py:55— joplin/agent-harness/cli_anything/joplin/joplin_cli.py:55-68 | rekordbox/agent-harness/cli_anything/rekordbox/rekordbox_cli.py:32-43 — 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) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:932— iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:932-944 | iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:953-964 — 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) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:278— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:278-289 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:296-307 — 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) inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:172— inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:172-183 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:234-245 — 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) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:459— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:459-474 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:534-545 — 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· Members sharing a duplicated core (61 members, 50+ identical tokens) · ×8
Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:158— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:158-197 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:146-175 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:189-243 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:189-243 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:189-243 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:189-243 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:189-243 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:159-198 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:189-243 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:189-243 | cli-anything-plugin/repl_skin.py:189-243 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:189-243 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:189-243 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:189-243 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:189-243 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:189-243 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:189-243 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:169-208 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:189-243 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:189-243 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:189-243 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:189-243 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:189-243 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:189-243 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:189-243 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:189-243 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:189-243 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:189-243 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:189-243 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:158-197 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:189-243 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:150-179 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:189-243 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:189-243 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:194-248 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:189-243 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:189-243 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:189-243 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:189-243 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:189-243 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:189-243 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:189-243 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:189-243 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:189-243 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:189-243 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:189-243 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:189-243 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:189-243 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:189-243 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:189-243 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:189-243 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:189-243 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:189-243 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:169-208 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:158-197 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:146-175 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:190-246 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:189-243 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:189-243 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:189-243 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:189-243 — These 61 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 61 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 61 times.
Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:203— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:203-234 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:181-212 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:249-280 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:249-280 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:249-280 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:249-280 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:249-280 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:204-235 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:249-280 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:249-280 | cli-anything-plugin/repl_skin.py:249-280 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:249-280 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:249-280 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:249-280 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:249-280 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:249-280 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:249-280 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:214-245 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:249-280 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:249-280 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:249-280 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:249-280 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:249-280 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:249-280 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:249-280 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:249-280 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:249-280 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:249-280 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:249-280 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:203-234 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:249-280 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:186-217 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:249-280 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:249-280 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:254-285 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:249-280 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:249-280 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:249-280 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:249-280 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:249-280 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:249-280 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:249-280 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:249-280 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:249-280 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:249-280 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:249-280 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:249-280 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:249-280 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:249-280 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:249-280 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:249-280 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:249-280 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:249-280 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:214-245 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:203-234 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:181-212 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:252-283 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:249-280 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:249-280 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:249-280 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:249-280 — These 61 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 61 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 61 times.
Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:238— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:238-260 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:216-238 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:284-306 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:284-306 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:284-306 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:284-306 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:284-306 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:239-260 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:284-306 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:284-306 | cli-anything-plugin/repl_skin.py:284-306 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:284-306 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:284-306 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:284-306 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:284-306 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:284-306 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:284-306 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:249-271 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:284-306 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:284-306 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:284-306 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:284-306 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:284-306 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:284-306 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:284-306 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:284-306 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:284-306 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:284-306 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:284-306 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:238-260 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:284-306 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:222-244 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:284-306 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:284-306 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:289-310 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:284-306 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:284-306 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:284-306 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:284-306 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:284-306 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:284-306 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:284-306 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:284-306 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:284-306 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:284-306 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:284-306 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:284-306 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:284-306 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:284-306 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:284-306 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:284-306 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:284-306 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:284-306 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:249-271 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:238-260 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:216-238 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:287-308 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:284-306 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:284-306 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:284-306 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:284-306 — These 61 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 61 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 61 times.
Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:334— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:334-347 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:312-325 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:380-393 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:380-393 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:380-393 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:380-393 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:380-393 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:334-347 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:380-393 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:380-393 | cli-anything-plugin/repl_skin.py:380-393 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:380-393 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:380-393 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:380-393 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:380-393 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:380-393 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:380-393 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:345-358 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:380-393 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:380-393 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:380-393 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:380-393 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:380-393 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:380-393 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:380-393 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:380-393 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:380-393 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:380-393 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:380-393 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:334-347 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:380-393 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:320-333 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:380-393 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:380-393 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:384-397 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:380-393 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:380-393 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:380-393 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:380-393 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:380-393 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:380-393 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:380-393 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:380-393 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:380-393 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:380-393 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:380-393 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:380-393 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:380-393 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:380-393 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:380-393 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:380-393 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:380-393 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:380-393 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:345-358 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:334-347 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:312-325 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:382-395 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:380-393 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:380-393 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:380-393 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:380-393 — These 61 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 61 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 61 times.
Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:350— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:350-364 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:328-342 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:396-410 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:396-410 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:396-410 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:396-410 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:396-410 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:350-364 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:396-410 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:396-410 | cli-anything-plugin/repl_skin.py:396-410 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:396-410 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:396-410 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:396-410 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:396-410 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:396-410 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:396-410 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:361-375 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:396-410 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:396-410 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:396-410 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:396-410 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:396-410 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:396-410 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:396-410 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:396-410 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:396-410 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:396-410 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:396-410 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:350-364 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:396-410 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:336-350 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:396-410 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:396-410 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:400-414 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:396-410 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:396-410 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:396-410 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:396-410 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:396-410 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:396-410 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:396-410 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:396-410 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:396-410 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:396-410 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:396-410 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:396-410 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:396-410 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:396-410 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:396-410 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:396-410 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:396-410 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:396-410 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:361-375 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:350-364 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:328-342 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:398-412 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:396-410 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:396-410 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:396-410 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:396-410 — These 61 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 61 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 61 times.
Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:419— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:419-430 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:397-408 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:465-476 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:465-476 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:465-476 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:465-476 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:465-476 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:419-430 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:465-476 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:465-476 | cli-anything-plugin/repl_skin.py:465-476 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:465-476 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:465-476 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:465-476 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:465-476 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:465-476 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:465-476 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:430-441 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:465-476 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:465-476 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:465-476 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:465-476 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:465-476 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:465-476 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:465-476 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:465-476 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:465-476 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:465-476 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:465-476 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:419-430 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:465-476 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:405-416 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:465-476 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:465-476 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:467-478 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:465-476 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:465-476 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:465-476 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:465-476 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:465-476 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:465-476 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:465-476 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:465-476 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:465-476 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:465-476 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:465-476 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:465-476 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:465-476 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:465-476 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:465-476 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:465-476 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:465-476 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:465-476 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:430-441 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:419-430 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:397-408 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:467-478 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:465-476 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:465-476 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:465-476 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:465-476 — These 61 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 61 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 61 times.
Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:466— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:466-483 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:444-461 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:512-529 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:512-529 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:512-529 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:512-529 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:512-529 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:466-483 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:512-529 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:512-529 | cli-anything-plugin/repl_skin.py:512-529 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:512-529 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:512-529 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:512-529 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:512-529 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:512-529 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:512-529 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:477-494 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:512-529 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:512-529 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:512-529 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:512-529 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:512-529 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:512-529 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:512-529 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:512-529 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:512-529 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:512-529 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:512-529 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:466-483 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:512-529 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:457-475 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:512-529 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:512-529 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:513-530 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:512-529 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:512-529 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:512-529 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:512-529 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:512-529 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:512-529 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:512-529 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:512-529 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:512-529 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:512-529 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:512-529 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:512-529 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:512-529 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:512-529 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:512-529 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:512-529 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:512-529 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:512-529 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:477-494 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:466-483 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:444-461 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:513-530 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:512-529 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:512-529 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:512-529 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:512-529 — These 61 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 61 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 61 times.
Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:488— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:488-505 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:466-483 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:534-551 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:534-551 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:534-551 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:534-551 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:534-551 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:488-505 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:534-551 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:534-551 | cli-anything-plugin/repl_skin.py:534-551 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:534-551 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:534-551 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:534-551 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:534-551 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:534-551 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:534-551 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:499-516 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:534-551 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:534-551 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:534-551 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:534-551 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:534-551 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:534-551 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:534-551 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:534-551 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:534-551 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:534-551 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:534-551 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:488-505 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:534-551 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:480-500 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:534-551 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:534-551 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:535-552 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:534-551 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:534-551 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:534-551 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:534-551 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:534-551 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:534-551 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:534-551 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:534-551 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:534-551 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:534-551 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:534-551 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:534-551 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:534-551 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:534-551 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:534-551 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:534-551 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:534-551 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:534-551 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:499-516 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:488-505 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:466-483 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:535-552 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:534-551 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:534-551 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:534-551 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:534-551 — These 61 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 61 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 61 times.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×8
Edited copy of a member (5 corresponding lines) kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:533— kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:533-537 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:619-623 — 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) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:265— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:265-272 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:429-433 — 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) gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:541— gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:541-545 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:494-501 — 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) cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:34— cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:34-38 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:79-83 — 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) iterm2/agent-harness/cli_anything/iterm2_ctl/core/arrangement.py:52— iterm2/agent-harness/cli_anything/iterm2_ctl/core/arrangement.py:52-61 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/window.py:112-116 — 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) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:40— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:40-45 | rms/agent-harness/cli_anything/rms/rms_cli.py:31-35 — 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) freecad/agent-harness/cli_anything/freecad/core/spreadsheet.py:89— freecad/agent-harness/cli_anything/freecad/core/spreadsheet.py:89-93 | libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:415-419 — 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) QGIS/agent-harness/cli_anything/qgis/core/session.py:77— QGIS/agent-harness/cli_anything/qgis/core/session.py:77-81 | anygen/agent-harness/cli_anything/anygen/core/session.py:69-74 — 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 (11 lines × 3) QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:165— QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:165-175 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:169-179 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:165-175 — before extracting anything, compare `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` and `minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 319 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) blender/agent-harness/cli_anything/blender/blender_cli.py:915— blender/agent-harness/cli_anything/blender/blender_cli.py:915-925 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2248-2258 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1041-1051 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (11 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:784— blender/agent-harness/cli_anything/blender/core/preview.py:784-794 | freecad/agent-harness/cli_anything/freecad/core/preview.py:794-804 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:747-757 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `blender/agent-harness/cli_anything/blender/core/preview.py:795` calls `_now_iso` and `freecad/agent-harness/cli_anything/freecad/core/preview.py:805` 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 (11 lines × 3) drawio/agent-harness/cli_anything/drawio/core/session.py:171— drawio/agent-harness/cli_anything/drawio/core/session.py:171-181 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:212-222 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:252-262 — before extracting anything, compare `drawio/agent-harness/cli_anything/drawio/core/session.py` and `openscreen/agent-harness/cli_anything/openscreen/core/session.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:113— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:113-123 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:159-169 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:190-200 — 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) musescore/agent-harness/cli_anything/musescore/musescore_cli.py:202— musescore/agent-harness/cli_anything/musescore/musescore_cli.py:202-212 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:238-248 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:271-281 — 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 `musescore/agent-harness/cli_anything/musescore/musescore_cli.py:202` 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) blender/agent-harness/cli_anything/blender/core/preview.py:175— blender/agent-harness/cli_anything/blender/core/preview.py:175-185 | freecad/agent-harness/cli_anything/freecad/core/preview.py:183-193 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:375-385 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. 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 × 3) blender/agent-harness/cli_anything/blender/core/preview.py:445— blender/agent-harness/cli_anything/blender/core/preview.py:445-455 | freecad/agent-harness/cli_anything/freecad/core/preview.py:460-470 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:269-279 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. 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.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×7
Edited copy of a member (18 corresponding lines) blender/agent-harness/cli_anything/blender/core/objects.py:156— blender/agent-harness/cli_anything/blender/core/objects.py:156-173 | inkscape/agent-harness/cli_anything/inkscape/core/shapes.py:299-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) macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py:366— macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py:366-395 | macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py:424-441 — 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) kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py:140— kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py:140-164 | kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py:225-242 — 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) nslogger/agent-harness/cli_anything/nslogger/nslogger_cli.py:121— nslogger/agent-harness/cli_anything/nslogger/nslogger_cli.py:121-138 | nslogger/agent-harness/cli_anything/nslogger/nslogger_cli.py:164-186 — 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) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:445— minimax/agent-harness/cli_anything/minimax/minimax_cli.py:445-462 | novita/agent-harness/cli_anything/novita/novita_cli.py:334-353 — 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) REDACTED:215— REDACTED:215-232 | REDACTED:271-297 — 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) freecad/agent-harness/cli_anything/freecad/core/draft.py:913— freecad/agent-harness/cli_anything/freecad/core/draft.py:913-937 | freecad/agent-harness/cli_anything/freecad/core/parts.py:551-568 — 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 (14 corresponding lines) · ×7
Edited copy of a member (14 corresponding lines) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1469— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1469-1482 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1499-1512 — 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) cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:376— cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:376-389 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:410-428 — 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) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:87— minimax/agent-harness/cli_anything/minimax/minimax_cli.py:87-100 | novita/agent-harness/cli_anything/novita/novita_cli.py:82-95 — 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) macrocli/agent-harness/cli_anything/macrocli/core/recorder.py:248— macrocli/agent-harness/cli_anything/macrocli/core/recorder.py:248-279 | macrocli/agent-harness/cli_anything/macrocli/core/recorder.py:704-717 — 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) macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:106— macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:106-119 | macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py:113-126 — 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) videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:128— videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:128-143 | videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:205-218 — 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) inkscape/agent-harness/cli_anything/inkscape/core/transforms.py:23— inkscape/agent-harness/cli_anything/inkscape/core/transforms.py:23-36 | inkscape/agent-harness/cli_anything/inkscape/core/transforms.py:41-56 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (8 lines × 3) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:218— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:218-225 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:228-235 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:238-245 — 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) blender/agent-harness/cli_anything/blender/core/objects.py:30— blender/agent-harness/cli_anything/blender/core/objects.py:30-37 | freecad/agent-harness/cli_anything/freecad/core/body.py:50-57 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:76-83 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. 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 first that the copies are not typed on the same thing: the declarations holding them bind `collection_key` to `str = "objects"` in one and `str = "bodies"` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:215— blender/agent-harness/cli_anything/blender/core/preview.py:215-222 | freecad/agent-harness/cli_anything/freecad/core/preview.py:223-230 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:415-422 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. 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 × 3) blender/agent-harness/cli_anything/blender/core/preview.py:514— blender/agent-harness/cli_anything/blender/core/preview.py:514-521 | freecad/agent-harness/cli_anything/freecad/core/preview.py:527-534 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:481-488 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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 `blender/agent-harness/cli_anything/blender/core/preview.py:514` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `blender/agent-harness/cli_anything/blender/core/preview.py:513` calls `get` and `shotcut/agent-harness/cli_anything/shotcut/core/preview.py:480` 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 lines × 3) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:657— cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:657-664 | cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:713-720 | cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:736-743 — 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 `cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:657` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 3) inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:43— inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:43-50 | inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:82-89 | inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:114-121 — 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) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:149— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:149-157 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:139-146 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:127-134 — 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 `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:149` 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.
preview_bundle.find_latest_manifest (cognitive 16) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:134— preview_bundle.find_latest_manifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, error handling 1 (2 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.
preview_bundle.find_latest_manifest (cognitive 16) freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:134— preview_bundle.find_latest_manifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, error handling 1 (2 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.
preview_bundle.find_latest_manifest (cognitive 16) openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:134— preview_bundle.find_latest_manifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, error handling 1 (2 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.
preview_bundle.find_latest_manifest (cognitive 16) renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:134— preview_bundle.find_latest_manifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, error handling 1 (2 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.
preview_bundle.find_latest_manifest (cognitive 16) shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:134— preview_bundle.find_latest_manifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, error handling 1 (2 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.
preview_bundle.find_latest_manifest (cognitive 16) cli-anything-plugin/preview_bundle.py:134— preview_bundle.find_latest_manifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, error handling 1 (2 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.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×6
Edited copy of a member (20 corresponding lines) sbox/agent-harness/cli_anything/sbox/core/material.py:26— sbox/agent-harness/cli_anything/sbox/core/material.py:26-80 | sbox/agent-harness/cli_anything/sbox/core/material.py:128-167 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) REDACTED:127— REDACTED:127-146 | REDACTED:150-171 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:451— minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:451-481 | novita/agent-harness/cli_anything/novita/utils/novita_backend.py:191-210 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/launch.py:23— nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/launch.py:23-46 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/launch.py:59-78 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) sbox/agent-harness/cli_anything/sbox/core/scene.py:698— sbox/agent-harness/cli_anything/sbox/core/scene.py:698-719 | sbox/agent-harness/cli_anything/sbox/core/scene.py:737-756 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:207— shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:207-230 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:149-168 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×6
Edited copy of a member (15 corresponding lines) blender/agent-harness/cli_anything/blender/core/preview.py:677— blender/agent-harness/cli_anything/blender/core/preview.py:677-691 | freecad/agent-harness/cli_anything/freecad/core/preview.py:687-701 — 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) calibre/agent-harness/cli_anything/calibre/calibre_cli.py:531— calibre/agent-harness/cli_anything/calibre/calibre_cli.py:531-545 | calibre/agent-harness/cli_anything/calibre/calibre_cli.py:633-647 — 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) audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:200— audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:200-214 | audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:223-239 — 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) cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:162— cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:162-176 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:254-274 — 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) freecad/agent-harness/cli_anything/freecad/core/body.py:667— freecad/agent-harness/cli_anything/freecad/core/body.py:667-681 | freecad/agent-harness/cli_anything/freecad/core/body.py:1186-1205 — 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) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:291— iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:291-305 | iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:319-333 — 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· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×6
Members sharing a duplicated core (7 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/core/session.py:46— audacity/agent-harness/cli_anything/audacity/core/session.py:46-50 | blender/agent-harness/cli_anything/blender/core/session.py:42-46 | gimp/agent-harness/cli_anything/gimp/core/session.py:42-46 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:42-46 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:42-46 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:42-46 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:42-46 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/core/session.py:85— audacity/agent-harness/cli_anything/audacity/core/session.py:85-102 | blender/agent-harness/cli_anything/blender/core/session.py:79-96 | gimp/agent-harness/cli_anything/gimp/core/session.py:79-96 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:79-96 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:79-94 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:81-98 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:79-94 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/core/session.py:105— audacity/agent-harness/cli_anything/audacity/core/session.py:105-122 | blender/agent-harness/cli_anything/blender/core/session.py:99-116 | gimp/agent-harness/cli_anything/gimp/core/session.py:99-116 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:99-116 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:97-112 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:101-118 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:97-112 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/core/session.py:138— audacity/agent-harness/cli_anything/audacity/core/session.py:138-152 | blender/agent-harness/cli_anything/blender/core/session.py:130-144 | gimp/agent-harness/cli_anything/gimp/core/session.py:130-144 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:130-143 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:126-139 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:137-150 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:126-139 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/core/lighting.py:35— blender/agent-harness/cli_anything/blender/core/lighting.py:35-42 | blender/agent-harness/cli_anything/blender/core/lighting.py:46-53 | blender/agent-harness/cli_anything/blender/core/materials.py:41-49 | blender/agent-harness/cli_anything/blender/core/objects.py:30-38 | freecad/agent-harness/cli_anything/freecad/core/body.py:50-58 | freecad/agent-harness/cli_anything/freecad/core/materials.py:182-190 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:76-84 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) freecad/agent-harness/cli_anything/freecad/core/assembly.py:52— freecad/agent-harness/cli_anything/freecad/core/assembly.py:52-60 | freecad/agent-harness/cli_anything/freecad/core/draft.py:39-47 | freecad/agent-harness/cli_anything/freecad/core/draft.py:51-59 | freecad/agent-harness/cli_anything/freecad/core/fem.py:52-60 | freecad/agent-harness/cli_anything/freecad/core/parts.py:123-136 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:47-55 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:59-67 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×6
Edited copy of a member (16 corresponding lines) blender/agent-harness/cli_anything/blender/core/objects.py:134— blender/agent-harness/cli_anything/blender/core/objects.py:134-152 | inkscape/agent-harness/cli_anything/inkscape/core/shapes.py:280-295 — 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) rms/agent-harness/cli_anything/rms/rms_cli.py:984— rms/agent-harness/cli_anything/rms/rms_cli.py:984-999 | rms/agent-harness/cli_anything/rms/rms_cli.py:1011-1030 — 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) libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:82— libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:82-97 | libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:101-116 — 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) joplin/agent-harness/cli_anything/joplin/core/backend.py:18— joplin/agent-harness/cli_anything/joplin/core/backend.py:18-35 | joplin/agent-harness/cli_anything/joplin/core/notes.py:11-26 — 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) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:137— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:137-164 | mermaid/agent-harness/cli_anything/mermaid/mermaid_cli.py:47-62 — 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) iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:14— iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:14-37 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/tab.py:10-25 — 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) freecad/agent-harness/cli_anything/freecad/core/motion.py:58— freecad/agent-harness/cli_anything/freecad/core/motion.py:58-65 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:122-128 — 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) freecad/agent-harness/cli_anything/freecad/freecad_cli.py:895— freecad/agent-harness/cli_anything/freecad/freecad_cli.py:895-902 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2771-2777 — 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) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:187— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:187-193 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:265-271 — 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) gimp/agent-harness/cli_anything/gimp/gimp_cli.py:615— gimp/agent-harness/cli_anything/gimp/gimp_cli.py:615-622 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:937-943 — 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) firefly-iii/agent-harness/cli_anything/firefly_iii/core/insights.py:75— firefly-iii/agent-harness/cli_anything/firefly_iii/core/insights.py:75-83 | firefly-iii/agent-harness/cli_anything/firefly_iii/core/summary.py:33-39 — 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) cli-hub/cli_hub/matrix.py:43— cli-hub/cli_hub/matrix.py:43-49 | cli-hub/cli_hub/registry.py:22-29 — 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.
D4 · Code Duplication· Edited copies of one member (3 members, 4+ corresponding lines) · ×6
Edited copies of one member (3 members, 4+ corresponding lines) blender/agent-harness/cli_anything/blender/blender_cli.py:934— blender/agent-harness/cli_anything/blender/blender_cli.py:934-937 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2267-2270 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1060-1067 — 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) blender/agent-harness/cli_anything/blender/core/objects.py:23— blender/agent-harness/cli_anything/blender/core/objects.py:23-26 | freecad/agent-harness/cli_anything/freecad/core/body.py:43-46 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:69-72 — 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) blender/agent-harness/cli_anything/blender/blender_cli.py:1002— blender/agent-harness/cli_anything/blender/blender_cli.py:1002-1005 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2344-2347 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1133-1136 — 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) blender/agent-harness/cli_anything/blender/blender_cli.py:1013— blender/agent-harness/cli_anything/blender/blender_cli.py:1013-1016 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2355-2358 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1144-1147 — 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) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:424— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:424-427 | blender/agent-harness/cli_anything/blender/blender_cli.py:600-603 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:534-537 — 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) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:367— minimax/agent-harness/cli_anything/minimax/minimax_cli.py:367-370 | novita/agent-harness/cli_anything/novita/novita_cli.py:256-259 | rms/agent-harness/cli_anything/rms/rms_cli.py:1165-1168 — 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.
Duplicated block (17 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:58— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:58-74 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerActions.cs:34-50 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:57` calls `ExecuteEndTurn` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerActions.cs:33` 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 (17 lines × 2) freecad/agent-harness/cli_anything/freecad/core/preview.py:640— freecad/agent-harness/cli_anything/freecad/core/preview.py:640-656 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:594-610 — before extracting anything, compare `freecad/agent-harness/cli_anything/freecad/core/preview.py` and `shotcut/agent-harness/cli_anything/shotcut/core/preview.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 375 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. 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 (17 lines × 2) macrocli/agent-harness/cli_anything/macrocli/backends/native_api.py:91— macrocli/agent-harness/cli_anything/macrocli/backends/native_api.py:91-107 | macrocli/agent-harness/cli_anything/macrocli/backends/native_api.py:186-202 — both copies are in the same file, so extract the 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 (17 lines × 2) mubu/agent-harness/cli_anything/mubu/mubu_cli.py:141— mubu/agent-harness/cli_anything/mubu/mubu_cli.py:141-157 | zotero/agent-harness/cli_anything/zotero/core/session.py:50-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `dict[str, object]` in one and `dict[str, Any]` 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 (17 lines × 2) REDACTED:134— REDACTED:134-150 | REDACTED:163-179 — both copies are in the same file, so extract the 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:134` 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 (17 lines × 2) safari/agent-harness/scripts/extract_tools.py:179— safari/agent-harness/scripts/extract_tools.py:179-195 | safari/agent-harness/scripts/extract_tools.py:209-225 — both copies are in the same file, so extract the 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 (14 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:203— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:203-216 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:265-278 — both copies are in the same file, so extract the 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 `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:203` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:38— eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:38-51 | openrefine/agent-harness/cli_anything/openrefine/core/session.py:94-107 — before extracting anything, compare `eez-studio/agent-harness/cli_anything/eez_studio/core/project.py` and `openrefine/agent-harness/cli_anything/openrefine/core/session.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `Any` in one and `dict[str, Any]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `openrefine/agent-harness/cli_anything/openrefine/core/session.py:108` calls `fsync`, `fileno` and `eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:52` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:627— freecad/agent-harness/cli_anything/freecad/core/body.py:627-640 | freecad/agent-harness/cli_anything/freecad/core/body.py:1149-1162 — both copies are in the same file, so extract the 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) freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2322— freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2322-2335 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1111-1124 — 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) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:400— renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:400-413 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:415-428 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:400` 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) drawio/agent-harness/cli_anything/drawio/core/connectors.py:79— drawio/agent-harness/cli_anything/drawio/core/connectors.py:79-92 | drawio/agent-harness/cli_anything/drawio/core/shapes.py:76-89 — before extracting anything, compare `drawio/agent-harness/cli_anything/drawio/core/connectors.py` and `drawio/agent-harness/cli_anything/drawio/core/shapes.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 × 3) audacity/agent-harness/cli_anything/audacity/core/export.py:473— audacity/agent-harness/cli_anything/audacity/core/export.py:473-481 | audacity/agent-harness/cli_anything/audacity/core/media.py:115-123 | audacity/agent-harness/cli_anything/audacity/core/project.py:165-173 — 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 `audacity/agent-harness/cli_anything/audacity/core/export.py:473` 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 (9 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:844— blender/agent-harness/cli_anything/blender/core/preview.py:844-852 | freecad/agent-harness/cli_anything/freecad/core/preview.py:852-860 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:805-813 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. 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 × 3) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:87— minimax/agent-harness/cli_anything/minimax/minimax_cli.py:87-95 | novita/agent-harness/cli_anything/novita/novita_cli.py:82-90 | rms/agent-harness/cli_anything/rms/rms_cli.py:81-89 — before extracting anything, compare `minimax/agent-harness/cli_anything/minimax/minimax_cli.py` and `novita/agent-harness/cli_anything/novita/novita_cli.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 3) renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:126— renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:126-134 | renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:154-162 | renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:207-215 — 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, `renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:217` calls `items` and `renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:135` 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 (9 lines × 3) tigris/agent-harness/cli_anything/tigris/core/object.py:100— tigris/agent-harness/cli_anything/tigris/core/object.py:100-108 | tigris/agent-harness/cli_anything/tigris/core/object.py:146-154 | tigris/agent-harness/cli_anything/tigris/core/object.py:203-211 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) joplin/agent-harness/setup.py:12— joplin/agent-harness/setup.py:12-20 | mubu/agent-harness/setup.py:11-19 | zotero/agent-harness/setup.py:12-20 — before extracting anything, compare `joplin/agent-harness/setup.py` and `zotero/agent-harness/setup.py` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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. 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 × 3) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:253— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:253-259 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:520-526 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:593-599 — 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) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:110— macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:110-117 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:86-92 | rms/agent-harness/cli_anything/rms/rms_cli.py:85-92 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. 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 × 3) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:482— renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:482-488 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:990-996 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1402-1408 — 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) blender/agent-harness/cli_anything/blender/core/preview.py:205— blender/agent-harness/cli_anything/blender/core/preview.py:205-211 | freecad/agent-harness/cli_anything/freecad/core/preview.py:213-219 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:398-404 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. 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 × 3) drawio/agent-harness/cli_anything/drawio/core/session.py:76— drawio/agent-harness/cli_anything/drawio/core/session.py:76-82 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:83-89 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:98-104 — before extracting anything, compare `drawio/agent-harness/cli_anything/drawio/core/session.py` and `openscreen/agent-harness/cli_anything/openscreen/core/session.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:213— minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:213-219 | novita/agent-harness/cli_anything/novita/utils/novita_backend.py:28-34 | rms/agent-harness/cli_anything/rms/utils/rms_backend.py:28-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 4) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:358— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:358-363 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:383-388 | novita/agent-harness/cli_anything/novita/novita_cli.py:272-277 | rms/agent-harness/cli_anything/rms/rms_cli.py:1088-1093 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (6 lines × 4) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:468— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:468-494 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:503-527 | novita/agent-harness/cli_anything/novita/novita_cli.py:376-398 | rms/agent-harness/cli_anything/rms/rms_cli.py:1183-1188 — 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 `rms/agent-harness/cli_anything/rms/rms_cli.py:1183` 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. Note first that the copies are not typed on the same thing: `ReplSkin` names `cli_anything.anygen.utils.repl_skin` in one and `cli_anything.minimax.utils.repl_skin` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 4) audacity/agent-harness/cli_anything/audacity/core/clips.py:151— audacity/agent-harness/cli_anything/audacity/core/clips.py:151-156 | audacity/agent-harness/cli_anything/audacity/core/clips.py:186-191 | audacity/agent-harness/cli_anything/audacity/core/effects.py:288-294 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:238-244 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind `track_index` to `int` in one and `int = 0` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 4) cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:48— cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:48-53 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:94-99 | eez-studio/agent-harness/cli_anything/eez_studio/eez_studio_cli.py:73-78 | macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:73-78 — 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 `cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:48` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 4) docs/scripts/freecad_live_preview_demo.py:3662— docs/scripts/freecad_live_preview_demo.py:3662-3667 | docs/scripts/freecad_live_preview_demo.py:3765-3770 | docs/scripts/freecad_live_preview_demo.py:3839-3844 | docs/scripts/freecad_live_preview_demo.py:3892-3897 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `docs/scripts/freecad_live_preview_demo.py:3845` calls `setdefault` and `docs/scripts/freecad_live_preview_demo.py:3668` 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 × 4) audacity/agent-harness/cli_anything/audacity/core/export.py:485— audacity/agent-harness/cli_anything/audacity/core/export.py:485-490 | audacity/agent-harness/cli_anything/audacity/core/media.py:106-111 | gimp/agent-harness/cli_anything/gimp/core/export.py:557-562 | gimp/agent-harness/cli_anything/gimp/core/media.py:184-189 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) krita/agent-harness/cli_anything/krita/krita_cli.py:61— krita/agent-harness/cli_anything/krita/krita_cli.py:61-66 | krita/agent-harness/cli_anything/krita/krita_cli.py:68-73 | krita/agent-harness/cli_anything/krita/krita_cli.py:75-80 — 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) blender/agent-harness/cli_anything/blender/core/preview.py:97— blender/agent-harness/cli_anything/blender/core/preview.py:97-102 | freecad/agent-harness/cli_anything/freecad/core/preview.py:105-110 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:310-315 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:150— blender/agent-harness/cli_anything/blender/core/preview.py:150-155 | freecad/agent-harness/cli_anything/freecad/core/preview.py:158-163 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:350-355 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. 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 (6 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:189— blender/agent-harness/cli_anything/blender/core/preview.py:189-194 | freecad/agent-harness/cli_anything/freecad/core/preview.py:197-202 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:389-394 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. 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 (6 lines × 3) drawio/agent-harness/cli_anything/drawio/core/session.py:162— drawio/agent-harness/cli_anything/drawio/core/session.py:162-167 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:203-208 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:243-248 — before extracting anything, compare `drawio/agent-harness/cli_anything/drawio/core/session.py` and `openscreen/agent-harness/cli_anything/openscreen/core/session.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 101 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) kdenlive/agent-harness/cli_anything/kdenlive/core/bin.py:64— kdenlive/agent-harness/cli_anything/kdenlive/core/bin.py:64-69 | kdenlive/agent-harness/cli_anything/kdenlive/core/guides.py:48-53 | kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:137-142 — 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 matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 3) lldb/agent-harness/cli_anything/lldb/utils/output.py:36— lldb/agent-harness/cli_anything/lldb/utils/output.py:36-40 | renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py:38-43 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/output.py:35-39 — before extracting anything, compare `lldb/agent-harness/cli_anything/lldb/utils/output.py` and `renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `headers` to `list` in one and `list[str]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:106— blender/agent-harness/cli_anything/blender/core/preview.py:106-110 | freecad/agent-harness/cli_anything/freecad/core/preview.py:114-118 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:290-294 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:142— blender/agent-harness/cli_anything/blender/core/preview.py:142-146 | freecad/agent-harness/cli_anything/freecad/core/preview.py:150-154 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:342-346 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. 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 × 3) iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:125— iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:125-129 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:257-261 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/window.py:59-63 — 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. 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 × 3) iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:247— iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:247-251 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/window.py:75-79 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/window.py:122-126 — 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. 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 × 3) REDACTED:1621— REDACTED:1621-1625 | REDACTED:1635-1639 | REDACTED:1647-1651 — 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, `REDACTED:1620` calls `add_argument` and `REDACTED:1634` 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.
TooManyMethods: FireflyIIIBackend firefly-iii/agent-harness/cli_anything/firefly_iii/utils/firefly_iii_backend.py:12— TooManyMethods — 133 methods. The bar is 30 methods; this is 103 over it, 4.43× 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: BridgeMod slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs— TooManyMethods — 2555 significant lines (blank, comment-only and punctuation-only lines excluded), 104 methods, declared across 7 files: plugin/BridgeMod.Actions.cs (29), plugin/BridgeMod.StateBuilder.cs (22), plugin/BridgeMod.Formatting.cs (20), plugin/BridgeMod.Helpers.cs (12), +3 more file(s). The bar is 30 methods; this is 74 over it, 3.47× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
TooManyMethods: LLDBDebugAdapter lldb/agent-harness/cli_anything/lldb/dap.py:186— TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: LLDBSession lldb/agent-harness/cli_anything/lldb/core/session.py:16— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× 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: SiYuanClient siyuan/agent-harness/cli_anything/siyuan/core/client.py:62— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×5
Edited copy of a member (25 corresponding lines) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:825— n8n/agent-harness/cli_anything/n8n/n8n_cli.py:825-849 | n8n/agent-harness/cli_anything/n8n/n8n_cli.py:857-881 — 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.
Edited copy of a member (25 corresponding lines) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1186— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1186-1216 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1225-1249 — 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.
Edited copy of a member (25 corresponding lines) cli-hub/cli_hub/matrix.py:66— cli-hub/cli_hub/matrix.py:66-91 | cli-hub/cli_hub/registry.py:33-57 — 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.
Edited copy of a member (25 corresponding lines) minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:278— minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:278-302 | novita/agent-harness/cli_anything/novita/utils/novita_backend.py:90-121 — 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.
Edited copy of a member (25 corresponding lines) REDACTED:1362— REDACTED:1362-1386 | REDACTED:1402-1427 — 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 copy of a member (28 corresponding lines) · ×5
Edited copy of a member (28 corresponding lines) REDACTED:376— REDACTED:376-403 | REDACTED:1014-1045 — 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.
Edited copy of a member (28 corresponding lines) renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:67— renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:67-98 | renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:710-737 — 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.
Edited copy of a member (28 corresponding lines) libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:283— libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:283-312 | libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:372-399 — 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.
Edited copy of a member (28 corresponding lines) audacity/agent-harness/cli_anything/audacity/utils/sox_backend.py:85— audacity/agent-harness/cli_anything/audacity/utils/sox_backend.py:85-114 | audacity/agent-harness/cli_anything/audacity/utils/sox_backend.py:124-151 — 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.
Edited copy of a member (28 corresponding lines) comfyui/agent-harness/cli_anything/comfyui/core/workflows.py:12— comfyui/agent-harness/cli_anything/comfyui/core/workflows.py:12-39 | freecad/agent-harness/cli_anything/freecad/core/document.py:180-215 — 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 copy of a member (19 corresponding lines) · ×5
Edited copy of a member (19 corresponding lines) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1778— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1778-1796 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1805-1823 — 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) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:74— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:74-94 | live2d/agent-harness/cli_anything/live2d/live2d_cli.py:93-111 — 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) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:743— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:743-761 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1025-1043 — 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) kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:197— kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:197-215 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:281-304 — 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) sbox/agent-harness/cli_anything/sbox/core/project.py:343— sbox/agent-harness/cli_anything/sbox/core/project.py:343-365 | sbox/agent-harness/cli_anything/sbox/core/project.py:369-387 — 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 (13 corresponding lines) · ×5
Edited copy of a member (13 corresponding lines) tigris/agent-harness/cli_anything/tigris/core/bucket.py:51— tigris/agent-harness/cli_anything/tigris/core/bucket.py:51-63 | tigris/agent-harness/cli_anything/tigris/core/snapshot.py:61-73 — 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) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1423— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1423-1436 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1463-1475 — 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) audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:118— audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:118-130 | audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:139-153 — 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) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:184— unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:184-196 | unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:294-314 — 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) musescore/agent-harness/cli_anything/musescore/core/session.py:63— musescore/agent-harness/cli_anything/musescore/core/session.py:63-75 | musescore/agent-harness/cli_anything/musescore/core/session.py:78-90 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×5
Edited copy of a member (10 corresponding lines) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:322— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:322-331 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1389-1398 — 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) mermaid/agent-harness/cli_anything/mermaid/mermaid_cli.py:28— mermaid/agent-harness/cli_anything/mermaid/mermaid_cli.py:28-37 | videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:33-42 — 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) n8n/agent-harness/cli_anything/n8n/core/versions.py:88— n8n/agent-harness/cli_anything/n8n/core/versions.py:88-97 | n8n/agent-harness/cli_anything/n8n/core/versions.py:155-174 — 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) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:232— iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:232-241 | iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:249-258 — 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) joplin/agent-harness/cli_anything/joplin/core/todos.py:31— joplin/agent-harness/cli_anything/joplin/core/todos.py:31-40 | joplin/agent-harness/cli_anything/joplin/core/notebooks.py:12-21 — 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.
Duplicated block (16 lines × 2) blender/agent-harness/cli_anything/blender/core/preview.py:114— blender/agent-harness/cli_anything/blender/core/preview.py:114-129 | freecad/agent-harness/cli_anything/freecad/core/preview.py:122-137 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. 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 (16 lines × 2) docs/scripts/freecad_live_preview_demo.py:3856— docs/scripts/freecad_live_preview_demo.py:3856-3871 | docs/scripts/freecad_live_preview_demo.py:3909-3924 — both copies are in the same file, so extract the 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 (16 lines × 2) firefly-iii/agent-harness/cli_anything/firefly_iii/core/bills.py:109— firefly-iii/agent-harness/cli_anything/firefly_iii/core/bills.py:109-124 | firefly-iii/agent-harness/cli_anything/firefly_iii/core/piggy_banks.py:75-90 — 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 (16 lines × 2) minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:330— minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:330-345 | novita/agent-harness/cli_anything/novita/utils/novita_backend.py:145-160 — 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 `minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:330` 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 (16 lines × 2) sbox/agent-harness/cli_anything/sbox/core/export.py:405— sbox/agent-harness/cli_anything/sbox/core/export.py:405-420 | sbox/agent-harness/cli_anything/sbox/core/export.py:466-481 — both copies are in the same file, so extract the 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–11 lines × 2) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:288— cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:288-297 | cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:325-335 — both copies are in the same file, so extract the 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–11 lines × 2) chromadb/agent-harness/cli_anything/chromadb/core/documents.py:43— chromadb/agent-harness/cli_anything/chromadb/core/documents.py:43-53 | chromadb/agent-harness/cli_anything/chromadb/core/documents.py:113-122 — both copies are in the same file, so extract the 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 `chromadb/agent-harness/cli_anything/chromadb/core/documents.py:43` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) docs/scripts/blender_preview_story_demo.py:437— docs/scripts/blender_preview_story_demo.py:437-446 | docs/scripts/freecad_live_preview_demo.py:4579-4589 — 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 `docs/scripts/blender_preview_story_demo.py:437` 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) gimp/agent-harness/cli_anything/gimp/gimp_cli.py:779— gimp/agent-harness/cli_anything/gimp/gimp_cli.py:779-789 | lldb/agent-harness/cli_anything/lldb/lldb_cli.py:673-682 — 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 (10–11 lines × 2) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:790— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:790-799 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1059-1069 — both copies are in the same file, so extract the 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 `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:790` 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 × 4) blender/agent-harness/cli_anything/blender/core/modifiers.py:240— blender/agent-harness/cli_anything/blender/core/modifiers.py:240-247 | blender/agent-harness/cli_anything/blender/core/modifiers.py:260-267 | gimp/agent-harness/cli_anything/gimp/core/filters.py:320-327 | gimp/agent-harness/cli_anything/gimp/core/filters.py:340-347 — 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 (8 lines × 4) browser/agent-harness/cli_anything/browser/browser_cli.py:85— browser/agent-harness/cli_anything/browser/browser_cli.py:85-92 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:79-86 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:80-87 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:82-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (8 lines × 4) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:392— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:392-399 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:417-424 | novita/agent-harness/cli_anything/novita/novita_cli.py:306-313 | rms/agent-harness/cli_anything/rms/rms_cli.py:1119-1126 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (8 lines × 4) freecad/agent-harness/cli_anything/freecad/core/assembly.py:41— freecad/agent-harness/cli_anything/freecad/core/assembly.py:41-48 | freecad/agent-harness/cli_anything/freecad/core/cam.py:37-44 | freecad/agent-harness/cli_anything/freecad/core/fem.py:41-48 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:36-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 all 4 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 (8 lines × 4) freecad/agent-harness/cli_anything/freecad/core/draft.py:28— freecad/agent-harness/cli_anything/freecad/core/draft.py:28-35 | freecad/agent-harness/cli_anything/freecad/core/mesh.py:36-43 | freecad/agent-harness/cli_anything/freecad/core/spreadsheet.py:38-45 | freecad/agent-harness/cli_anything/freecad/core/surface.py:27-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 all 4 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.
D4 · Code Duplication· Edited copy of a member (42 corresponding lines) · ×4
Edited copy of a member (42 corresponding lines) docs/scripts/blender_orbital_relay_drone_demo.py:202— docs/scripts/blender_orbital_relay_drone_demo.py:202-245 | docs/scripts/blender_orbital_relay_drone_demo.py:367-408 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (42 corresponding lines) audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:317— audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:317-361 | audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:371-412 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (42 corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1158— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1158-1207 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1285-1326 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (42 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/draft.py:1157— freecad/agent-harness/cli_anything/freecad/core/draft.py:1157-1198 | freecad/agent-harness/cli_anything/freecad/core/mesh.py:699-747 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×4
Edited copy of a member (35 corresponding lines) drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:67— drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:67-113 | drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:466-500 — 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.
Edited copy of a member (35 corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:44— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:44-78 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerActions.cs:17-58 — 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.
Edited copy of a member (35 corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:222— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:222-256 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:284-318 — 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.
Edited copy of a member (35 corresponding lines) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:196— minimax/agent-harness/cli_anything/minimax/minimax_cli.py:196-230 | novita/agent-harness/cli_anything/novita/novita_cli.py:190-226 — 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 (17 corresponding lines) · ×4
Edited copy of a member (17 corresponding lines) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:407— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:407-428 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1429-1445 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) ollama/agent-harness/cli_anything/ollama/ollama_cli.py:128— ollama/agent-harness/cli_anything/ollama/ollama_cli.py:128-144 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:208-224 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) calibre/agent-harness/cli_anything/calibre/calibre_cli.py:209— calibre/agent-harness/cli_anything/calibre/calibre_cli.py:209-225 | calibre/agent-harness/cli_anything/calibre/calibre_cli.py:696-714 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:60— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:60-76 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:123-139 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×4
Edited copies of one member (3 members, 17+ corresponding lines) chromadb/agent-harness/cli_anything/chromadb/core/collections.py:98— chromadb/agent-harness/cli_anything/chromadb/core/collections.py:98-117 | chromadb/agent-harness/cli_anything/chromadb/core/server.py:19-35 | tigris/agent-harness/cli_anything/tigris/core/auth.py:54-74 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:651— cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:651-669 | cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:706-726 | cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:732-748 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) REDACTED:193— REDACTED:193-213 | REDACTED:54-72 | REDACTED:52-68 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:369— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:369-386 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:878-899 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:920-936 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (26 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:185— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:185-210 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:749-774 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:185` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:120— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:120-145 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:122-147 — before extracting anything, compare `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 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 `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:120` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26 lines × 2) freecad/agent-harness/cli_anything/freecad/core/parts.py:784— freecad/agent-harness/cli_anything/freecad/core/parts.py:784-809 | freecad/agent-harness/cli_anything/freecad/core/parts.py:963-990 — both copies are in the same file, so extract the 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 (26 lines × 2) renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:73— renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:73-98 | renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:712-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. 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 (23 lines × 2) blender/agent-harness/cli_anything/blender/core/preview.py:470— blender/agent-harness/cli_anything/blender/core/preview.py:470-492 | freecad/agent-harness/cli_anything/freecad/core/preview.py:485-507 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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 (23 lines × 2) drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:307— drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:307-329 | drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:354-376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (23 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:693— freecad/agent-harness/cli_anything/freecad/core/body.py:693-715 | freecad/agent-harness/cli_anything/freecad/core/body.py:1217-1239 — both copies are in the same file, so extract the 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 (23 lines × 2) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/cpp_capture.py:43— nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/cpp_capture.py:43-65 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/gpu_trace.py:664-686 — 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 (6 lines × 5) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:81— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:81-86 | browser/agent-harness/cli_anything/browser/browser_cli.py:87-92 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:81-86 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:82-87 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:84-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `3MF/agent-harness/cli_anything/threemf/threemf_cli.py:81` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 5) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:84— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:84-89 | browser/agent-harness/cli_anything/browser/browser_cli.py:90-95 | live2d/agent-harness/cli_anything/live2d/live2d_cli.py:104-109 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:84-89 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:85-90 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times.
Duplicated block (6 lines × 5) tigris/agent-harness/cli_anything/tigris/core/access_key.py:183— tigris/agent-harness/cli_anything/tigris/core/access_key.py:183-188 | tigris/agent-harness/cli_anything/tigris/core/bucket.py:115-120 | tigris/agent-harness/cli_anything/tigris/core/iam.py:157-162 | tigris/agent-harness/cli_anything/tigris/core/object.py:215-220 | tigris/agent-harness/cli_anything/tigris/core/snapshot.py:77-82 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once.
Duplicated block (6 lines × 5) audacity/agent-harness/cli_anything/audacity/core/project.py:79— audacity/agent-harness/cli_anything/audacity/core/project.py:79-84 | blender/agent-harness/cli_anything/blender/core/scene.py:146-151 | REDACTED:113-118 | libreoffice/agent-harness/cli_anything/libreoffice/core/document.py:142-147 | obs-studio/agent-harness/cli_anything/obs_studio/core/project.py:104-109 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. 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.
preview.poll_live_session_once (cyclomatic 16) blender/agent-harness/cli_anything/blender/core/preview.py:717— preview.poll_live_session_once has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
preview.poll_live_session_once (cyclomatic 16) freecad/agent-harness/cli_anything/freecad/core/preview.py:727— preview.poll_live_session_once has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
preview.poll_live_session_once (cyclomatic 16) shotcut/agent-harness/cli_anything/shotcut/core/preview.py:681— preview.poll_live_session_once has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×3
Edited copy of a member (26 corresponding lines) videocaptioner/agent-harness/cli_anything/videocaptioner/core/pipeline.py:29— videocaptioner/agent-harness/cli_anything/videocaptioner/core/pipeline.py:29-85 | videocaptioner/agent-harness/cli_anything/videocaptioner/core/subtitle.py:22-68 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (26 corresponding lines) chromadb/agent-harness/cli_anything/chromadb/core/collections.py:19— chromadb/agent-harness/cli_anything/chromadb/core/collections.py:19-44 | tigris/agent-harness/cli_anything/tigris/core/bucket.py:19-44 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (26 corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerActions.cs:61— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerActions.cs:61-91 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerActions.cs:94-119 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (43 corresponding lines) · ×3
Edited copy of a member (43 corresponding lines) REDACTED:117— REDACTED:117-189 | REDACTED:214-256 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (43 corresponding lines) chromadb/agent-harness/cli_anything/chromadb/chromadb_cli.py:60— chromadb/agent-harness/cli_anything/chromadb/chromadb_cli.py:60-102 | tigris/agent-harness/cli_anything/tigris/tigris_cli.py:105-148 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (43 corresponding lines) REDACTED:565— REDACTED:565-607 | REDACTED:620-664 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×3
Edited copy of a member (30 corresponding lines) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:145— minimax/agent-harness/cli_anything/minimax/minimax_cli.py:145-174 | novita/agent-harness/cli_anything/novita/novita_cli.py:135-173 — 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) gimp/agent-harness/cli_anything/gimp/core/canvas.py:16— gimp/agent-harness/cli_anything/gimp/core/canvas.py:16-55 | gimp/agent-harness/cli_anything/gimp/core/canvas.py:108-137 — 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) freecad/agent-harness/cli_anything/freecad/core/draft.py:702— freecad/agent-harness/cli_anything/freecad/core/draft.py:702-731 | freecad/agent-harness/cli_anything/freecad/core/draft.py:741-776 — 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 copy of a member (23 corresponding lines) · ×3
Edited copy of a member (23 corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:292— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:292-314 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:516-538 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:197— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:197-219 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:259-281 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) cloudcompare/agent-harness/cli_anything/cloudcompare/core/project.py:118— cloudcompare/agent-harness/cli_anything/cloudcompare/core/project.py:118-140 | krita/agent-harness/cli_anything/krita/core/project.py:148-174 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×3
Edited copy of a member (32 corresponding lines) REDACTED:378— REDACTED:378-424 | REDACTED:370-401 — 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) zotero/agent-harness/cli_anything/zotero/utils/zotero_sqlite.py:663— zotero/agent-harness/cli_anything/zotero/utils/zotero_sqlite.py:663-694 | zotero/agent-harness/cli_anything/zotero/utils/zotero_sqlite.py:704-744 — 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) freecad/agent-harness/cli_anything/freecad/core/body.py:693— freecad/agent-harness/cli_anything/freecad/core/body.py:693-724 | freecad/agent-harness/cli_anything/freecad/core/body.py:1217-1248 — 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 (45 corresponding lines) · ×3
Edited copy of a member (45 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/parts.py:1045— freecad/agent-harness/cli_anything/freecad/core/parts.py:1045-1089 | freecad/agent-harness/cli_anything/freecad/core/parts.py:1149-1193 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (45 corresponding lines) freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:55— freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:55-124 | krita/agent-harness/cli_anything/krita/utils/krita_backend.py:49-93 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (45 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/body.py:499— freecad/agent-harness/cli_anything/freecad/core/body.py:499-543 | freecad/agent-harness/cli_anything/freecad/core/body.py:1019-1063 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×3
Edited copies of one member (3 members, 13+ corresponding lines) tigris/agent-harness/cli_anything/tigris/core/iam.py:72— tigris/agent-harness/cli_anything/tigris/core/iam.py:72-84 | tigris/agent-harness/cli_anything/tigris/core/object.py:118-132 | tigris/agent-harness/cli_anything/tigris/core/object.py:140-154 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:96— comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:96-111 | notebooklm/agent-harness/cli_anything/notebooklm/notebooklm_cli.py:38-50 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:85-101 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) cli-hub/cli_hub/installer.py:340— cli-hub/cli_hub/installer.py:340-353 | cli-hub/cli_hub/installer.py:357-369 | cli-hub/cli_hub/installer.py:373-386 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×3
Edited copies of one member (3 members, 9+ corresponding lines) blender/agent-harness/cli_anything/blender/blender_cli.py:475— blender/agent-harness/cli_anything/blender/blender_cli.py:475-490 | blender/agent-harness/cli_anything/blender/blender_cli.py:642-650 | blender/agent-harness/cli_anything/blender/blender_cli.py:709-717 — 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) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:389— iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:389-397 | iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:519-527 | iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:621-631 — 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) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:407— iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:407-415 | iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:537-546 | iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:1135-1144 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×3
Edited copies of one member (3 members, 8+ corresponding lines) wavetone/agent-harness/cli_anything/wavetone/wavetone_cli.py:160— wavetone/agent-harness/cli_anything/wavetone/wavetone_cli.py:160-167 | wavetone/agent-harness/cli_anything/wavetone/wavetone_cli.py:177-184 | wavetone/agent-harness/cli_anything/wavetone/wavetone_cli.py:210-226 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) freecad/agent-harness/cli_anything/freecad/core/assembly.py:171— freecad/agent-harness/cli_anything/freecad/core/assembly.py:171-187 | freecad/agent-harness/cli_anything/freecad/core/fem.py:583-615 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:83-90 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) drawio/agent-harness/cli_anything/drawio/core/session.py:92— drawio/agent-harness/cli_anything/drawio/core/session.py:92-99 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:99-106 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:111-121 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 8+ corresponding lines) · ×3
Edited copies of one member (4 members, 8+ corresponding lines) freecad/agent-harness/cli_anything/freecad/freecad_cli.py:1955— freecad/agent-harness/cli_anything/freecad/freecad_cli.py:1955-1963 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:1977-1987 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2000-2009 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:4163-4170 — 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.
Edited copies of one member (4 members, 8+ corresponding lines) cli-hub/cli_hub/installer.py:196— cli-hub/cli_hub/installer.py:196-203 | cli-hub/cli_hub/installer.py:258-272 | cli-hub/cli_hub/installer.py:276-285 | cli-hub/cli_hub/installer.py:289-298 — 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.
Edited copies of one member (4 members, 8+ corresponding lines) calibre/agent-harness/cli_anything/calibre/calibre_cli.py:68— calibre/agent-harness/cli_anything/calibre/calibre_cli.py:68-80 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/eth2_quickstart_cli.py:89-96 | n8n/agent-harness/cli_anything/n8n/n8n_cli.py:326-333 | renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:132-145 — 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 (4 members, 7+ corresponding lines) · ×3
Edited copies of one member (4 members, 7+ corresponding lines) freecad/agent-harness/cli_anything/freecad/freecad_cli.py:417— freecad/agent-harness/cli_anything/freecad/freecad_cli.py:417-424 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:478-487 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:3329-3335 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:3567-3573 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 7+ corresponding lines) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1557— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1557-1566 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1573-1582 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1602-1608 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2088-2096 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 7+ corresponding lines) freecad/agent-harness/cli_anything/freecad/freecad_cli.py:1300— freecad/agent-harness/cli_anything/freecad/freecad_cli.py:1300-1306 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:1315-1321 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:1821-1829 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:1840-1847 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×3
Edited copy of a member (3 corresponding lines) QGIS/agent-harness/cli_anything/qgis/core/layers.py:149— QGIS/agent-harness/cli_anything/qgis/core/layers.py:149-151 | QGIS/agent-harness/cli_anything/qgis/core/layouts.py:57-59 — 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) docs/scripts/blender_preview_story_demo.py:60— docs/scripts/blender_preview_story_demo.py:60-62 | openrefine/agent-harness/cli_anything/openrefine/core/operations.py:19-22 — 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) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:30— renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:30-32 | sbox/agent-harness/cli_anything/sbox/core/localization.py:49-51 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (21 lines × 2) REDACTED:1808— REDACTED:1808-1828 | REDACTED:1850-1870 — both copies are in the same file, so extract the 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, `REDACTED:1846` calls `get_active_user`, `error` and `REDACTED:1807` 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 (21 lines × 2) n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:489— n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:489-509 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:489-509 — before extracting anything, compare `n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py` and `wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 372 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. 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 (21 lines × 2) zotero/agent-harness/cli_anything/zotero/core/rendering.py:46— zotero/agent-harness/cli_anything/zotero/core/rendering.py:46-66 | zotero/agent-harness/cli_anything/zotero/core/rendering.py:78-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. 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) nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:485— nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:485-503 | unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py:1054-1072 — 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 (19 lines × 2) docs/scripts/blender_preview_story_demo.py:260— docs/scripts/blender_preview_story_demo.py:260-278 | docs/scripts/freecad_live_preview_demo.py:4411-4429 — 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 (19 lines × 2) nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:30— nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:30-48 | nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_publisher.swift:33-51 — before extracting anything, compare `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift` and `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_publisher.swift` 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. 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 `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17–18 lines × 2) audacity/agent-harness/cli_anything/audacity/eval/tasks/export_wav.py:23— audacity/agent-harness/cli_anything/audacity/eval/tasks/export_wav.py:23-39 | audacity/agent-harness/cli_anything/audacity/eval/tasks/track_clip_flow.py:18-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `audacity/agent-harness/cli_anything/audacity/eval/tasks/export_wav.py:21` calls `task_artifacts_dir` and `audacity/agent-harness/cli_anything/audacity/eval/tasks/track_clip_flow.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 (17–18 lines × 2) REDACTED:219— REDACTED:219-236 | REDACTED:76-92 — 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 (17–18 lines × 2) sbox/agent-harness/cli_anything/sbox/core/export.py:431— sbox/agent-harness/cli_anything/sbox/core/export.py:431-448 | sbox/agent-harness/cli_anything/sbox/core/export.py:488-504 — both copies are in the same file, so extract the 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 (17 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:485— blender/agent-harness/cli_anything/blender/core/preview.py:485-501 | freecad/agent-harness/cli_anything/freecad/core/preview.py:500-516 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:455-471 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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 `blender/agent-harness/cli_anything/blender/core/preview.py:485` 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 (17 lines × 3) cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:42— cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:42-58 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:88-104 | eez-studio/agent-harness/cli_anything/eez_studio/eez_studio_cli.py:67-83 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (17 lines × 3) REDACTED:34— REDACTED:34-50 | REDACTED:65-81 | REDACTED:103-119 — 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 `REDACTED:34` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:655— blender/agent-harness/cli_anything/blender/core/preview.py:655-668 | freecad/agent-harness/cli_anything/freecad/core/preview.py:665-678 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:619-632 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. 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 (14 lines × 3) lldb/agent-harness/cli_anything/lldb/utils/errors.py:13— lldb/agent-harness/cli_anything/lldb/utils/errors.py:13-26 | renderdoc/agent-harness/cli_anything/renderdoc/utils/errors.py:13-29 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/errors.py:13-26 — before extracting anything, compare `lldb/agent-harness/cli_anything/lldb/utils/errors.py` and `renderdoc/agent-harness/cli_anything/renderdoc/utils/errors.py` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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 (14 lines × 3) drawio/agent-harness/cli_anything/drawio/core/session.py:145— drawio/agent-harness/cli_anything/drawio/core/session.py:145-158 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:186-199 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:226-239 — before extracting anything, compare `drawio/agent-harness/cli_anything/drawio/core/session.py` and `openscreen/agent-harness/cli_anything/openscreen/core/session.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 101 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. 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 (12–13 lines × 2) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:651— cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:651-662 | cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:706-718 — both copies are in the same file, so extract the 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 (12–13 lines × 2) docs/scripts/blender_preview_story_demo.py:307— docs/scripts/blender_preview_story_demo.py:307-318 | docs/scripts/freecad_live_preview_demo.py:4457-4469 — 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 `docs/scripts/blender_preview_story_demo.py:307` 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–13 lines × 2) docs/scripts/blender_preview_story_demo.py:468— docs/scripts/blender_preview_story_demo.py:468-479 | docs/scripts/freecad_live_preview_demo.py:4641-4653 — 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 `docs/scripts/blender_preview_story_demo.py:468` 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) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:375— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:375-386 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:400-411 | novita/agent-harness/cli_anything/novita/novita_cli.py:289-300 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (12 lines × 3) shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1405— shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1405-1416 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1425-1436 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1447-1458 — 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 (12 lines × 3) audacity/agent-harness/cli_anything/audacity/core/effects.py:154— audacity/agent-harness/cli_anything/audacity/core/effects.py:154-165 | blender/agent-harness/cli_anything/blender/core/modifiers.py:119-131 | gimp/agent-harness/cli_anything/gimp/core/filters.py:218-229 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. 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 × 4) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:369— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:369-379 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:394-404 | novita/agent-harness/cli_anything/novita/novita_cli.py:283-293 | rms/agent-harness/cli_anything/rms/rms_cli.py:1099-1109 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (11 lines × 4) kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:164— kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:164-174 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:198-208 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:227-237 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:282-292 — 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 (11 lines × 4) REDACTED:1925— REDACTED:1925-1935 | REDACTED:1970-1980 | REDACTED:2075-2085 | REDACTED:2173-2183 — 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, `REDACTED:1968` calls `error` and `REDACTED:1924` 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 lines × 3) docs/scripts/blender_orbital_relay_drone_demo.py:181— docs/scripts/blender_orbital_relay_drone_demo.py:181-190 | docs/scripts/blender_orbital_relay_drone_demo.py:210-219 | docs/scripts/blender_orbital_relay_drone_demo.py:228-237 — 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 `docs/scripts/blender_orbital_relay_drone_demo.py:181` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `docs/scripts/blender_orbital_relay_drone_demo.py:220` calls `add_modifier`, `_object_index` and `docs/scripts/blender_orbital_relay_drone_demo.py:191` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 3) REDACTED:272— REDACTED:272-281 | REDACTED:300-309 | REDACTED:472-481 — 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, `REDACTED:282` calls `set`, `_nsattr` and `REDACTED:482` 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) openscreen/agent-harness/cli_anything/openscreen/core/timeline.py:130— openscreen/agent-harness/cli_anything/openscreen/core/timeline.py:130-139 | openscreen/agent-harness/cli_anything/openscreen/core/timeline.py:169-178 | openscreen/agent-harness/cli_anything/openscreen/core/timeline.py:258-267 — 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 `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 × 4) REDACTED:1937— REDACTED:1937-1941 | REDACTED:1987-1991 | REDACTED:2092-2096 | REDACTED:2190-2194 — 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) freecad/agent-harness/cli_anything/freecad/core/assembly.py:33— freecad/agent-harness/cli_anything/freecad/core/assembly.py:33-37 | freecad/agent-harness/cli_anything/freecad/core/cam.py:29-33 | freecad/agent-harness/cli_anything/freecad/core/fem.py:33-37 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:28-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 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 (5 lines × 4) lldb/agent-harness/cli_anything/lldb/utils/output.py:13— lldb/agent-harness/cli_anything/lldb/utils/output.py:13-17 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/output.py:11-15 | renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py:13-17 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/output.py:13-17 — before extracting anything, compare `lldb/agent-harness/cli_anything/lldb/utils/output.py` and `renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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.
security.validate_url (cognitive 20) browser/agent-harness/cli_anything/browser/utils/security.py:92— security.validate_url has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (4 pts), boolean chains 2, error handling 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.
security.validate_url (cognitive 20) safari/agent-harness/cli_anything/safari/utils/security.py:80— security.validate_url has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (4 pts), boolean chains 2, error handling 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.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) lldb/agent-harness/cli_anything/lldb/utils/output.py:21— lldb/agent-harness/cli_anything/lldb/utils/output.py:21-42 | renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py:21-45 — 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) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:614— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:614-635 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1167-1189 — 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· Members sharing a duplicated core (24 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (24 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:51— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:51-60 | QGIS/agent-harness/cli_anything/qgis/qgis_cli.py:54-63 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:63-72 | audacity/agent-harness/cli_anything/audacity/audacity_cli.py:77-86 | blender/agent-harness/cli_anything/blender/blender_cli.py:138-147 | browser/agent-harness/cli_anything/browser/browser_cli.py:58-67 | comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:73-82 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:63-73 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:64-73 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:86-95 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:66-75 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:64-73 | live2d/agent-harness/cli_anything/live2d/live2d_cli.py:70-79 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:64-73 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:50-59 | novita/agent-harness/cli_anything/novita/novita_cli.py:59-68 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:64-73 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:52-61 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:53-62 | rms/agent-harness/cli_anything/rms/rms_cli.py:57-66 | safari/agent-harness/cli_anything/safari/safari_cli.py:103-112 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:139-149 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/web_yu_pri_cli.py:55-64 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:62-71 — These 24 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 24 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 24 times.
Members sharing a duplicated core (24 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:64— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:64-70 | QGIS/agent-harness/cli_anything/qgis/qgis_cli.py:67-73 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:76-82 | audacity/agent-harness/cli_anything/audacity/audacity_cli.py:90-96 | blender/agent-harness/cli_anything/blender/blender_cli.py:151-157 | browser/agent-harness/cli_anything/browser/browser_cli.py:71-77 | comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:86-92 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:77-84 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:77-83 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:99-105 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:79-85 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:77-83 | live2d/agent-harness/cli_anything/live2d/live2d_cli.py:83-89 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:77-83 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:63-69 | novita/agent-harness/cli_anything/novita/novita_cli.py:72-78 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:77-83 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:65-71 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:66-72 | rms/agent-harness/cli_anything/rms/rms_cli.py:70-76 | safari/agent-harness/cli_anything/safari/safari_cli.py:116-122 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:153-160 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/web_yu_pri_cli.py:68-74 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:75-81 — These 24 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 24 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 24 times.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×2
Edited copy of a member (21 corresponding lines) docs/scripts/blender_preview_story_demo.py:431— docs/scripts/blender_preview_story_demo.py:431-451 | docs/scripts/freecad_live_preview_demo.py:4574-4594 — 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) macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:207— macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:207-229 | macrocli/agent-harness/cli_anything/macrocli/backends/gui_macro.py:48-68 — 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 (31 corresponding lines) · ×2
Edited copy of a member (31 corresponding lines) docs/scripts/blender_preview_story_demo.py:260— docs/scripts/blender_preview_story_demo.py:260-290 | docs/scripts/freecad_live_preview_demo.py:4411-4441 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) inkscape/agent-harness/cli_anything/inkscape/core/gradients.py:20— inkscape/agent-harness/cli_anything/inkscape/core/gradients.py:20-50 | inkscape/agent-harness/cli_anything/inkscape/core/gradients.py:62-99 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (66 corresponding lines) · ×2
Edited copy of a member (66 corresponding lines) cloudcompare/agent-harness/cli_anything/cloudcompare/core/export.py:56— cloudcompare/agent-harness/cli_anything/cloudcompare/core/export.py:56-121 | cloudcompare/agent-harness/cli_anything/cloudcompare/core/export.py:130-195 — These two members are one piece of code written twice and then edited apart: 66 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (66 corresponding lines) browser/agent-harness/cli_anything/browser/utils/security.py:93— browser/agent-harness/cli_anything/browser/utils/security.py:93-165 | safari/agent-harness/cli_anything/safari/utils/security.py:81-146 — These two members are one piece of code written twice and then edited apart: 66 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (41 corresponding lines) · ×2
Edited copy of a member (41 corresponding lines) nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:30— nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:30-79 | nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_publisher.swift:33-73 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (41 corresponding lines) sbox/agent-harness/cli_anything/sbox/core/codegen.py:121— sbox/agent-harness/cli_anything/sbox/core/codegen.py:121-168 | sbox/agent-harness/cli_anything/sbox/core/codegen.py:178-218 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×2
Edited copy of a member (38 corresponding lines) blender/agent-harness/cli_anything/blender/core/render.py:77— blender/agent-harness/cli_anything/blender/core/render.py:77-146 | obs-studio/agent-harness/cli_anything/obs_studio/core/output.py:77-114 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/sketch.py:198— freecad/agent-harness/cli_anything/freecad/core/sketch.py:198-236 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:245-282 — 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 (3 members, 25+ corresponding lines) · ×2
Edited copies of one member (3 members, 25+ corresponding lines) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:87— macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:87-117 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:76-109 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:164-188 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 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, 25+ corresponding lines) wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:88— wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:88-114 | wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:264-289 | wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:296-320 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 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 (40 corresponding lines) · ×2
Edited copy of a member (40 corresponding lines) drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:307— drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:307-347 | drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:354-393 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (40 corresponding lines) mailchimp/agent-harness/cli_anything/mailchimp/mailchimp_cli.py:41— mailchimp/agent-harness/cli_anything/mailchimp/mailchimp_cli.py:41-80 | seaclip/agent-harness/cli_anything/seaclip/seaclip_cli.py:112-153 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 24+ corresponding lines) · ×2
Edited copies of one member (3 members, 24+ corresponding lines) inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:43— inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:43-73 | inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:82-105 | inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:114-137 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 24+ corresponding lines) QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:102— QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:102-125 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:105-129 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:102-125 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×2
Edited copy of a member (50 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/sketch.py:1201— freecad/agent-harness/cli_anything/freecad/core/sketch.py:1201-1262 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:1271-1320 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (50 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/body.py:1612— freecad/agent-harness/cli_anything/freecad/core/body.py:1612-1663 | freecad/agent-harness/cli_anything/freecad/core/body.py:1673-1722 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×2
Edited copies of one member (3 members, 19+ corresponding lines) openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:774— openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:774-795 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:799-818 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:822-840 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 19+ corresponding lines) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:39— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:39-57 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:38-61 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:34-52 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×2
Edited copy of a member (34 corresponding lines) cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:116— cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:116-149 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:796-836 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) musescore/agent-harness/cli_anything/musescore/core/media.py:14— musescore/agent-harness/cli_anything/musescore/core/media.py:14-47 | musescore/agent-harness/cli_anything/musescore/core/project.py:65-98 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (37 corresponding lines) · ×2
Edited copy of a member (37 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/measure.py:415— freecad/agent-harness/cli_anything/freecad/core/measure.py:415-453 | freecad/agent-harness/cli_anything/freecad/core/measure.py:457-493 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (37 corresponding lines) musescore/agent-harness/cli_anything/musescore/core/instruments.py:18— musescore/agent-harness/cli_anything/musescore/core/instruments.py:18-54 | musescore/agent-harness/cli_anything/musescore/core/parts.py:14-54 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (51 corresponding lines) · ×2
Edited copy of a member (51 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/body.py:1482— freecad/agent-harness/cli_anything/freecad/core/body.py:1482-1532 | freecad/agent-harness/cli_anything/freecad/core/body.py:1542-1597 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (51 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/body.py:386— freecad/agent-harness/cli_anything/freecad/core/body.py:386-437 | freecad/agent-harness/cli_anything/freecad/core/body.py:959-1009 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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, 12+ corresponding lines) · ×2
Edited copies of one member (3 members, 12+ corresponding lines) REDACTED:534— REDACTED:534-570 | REDACTED:405-419 | REDACTED:272-283 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:294— cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:294-307 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:327-340 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:620-631 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×2
Edited copy of a member (36 corresponding lines) iterm2/agent-harness/cli_anything/iterm2_ctl/core/prompt.py:83— iterm2/agent-harness/cli_anything/iterm2_ctl/core/prompt.py:83-121 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/prompt.py:129-164 — 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) freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:139— freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:139-178 | krita/agent-harness/cli_anything/krita/utils/krita_backend.py:106-141 — 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 copies of one member (3 members, 15+ corresponding lines) · ×2
Edited copies of one member (3 members, 15+ corresponding lines) calibre/agent-harness/cli_anything/calibre/calibre_cli.py:309— calibre/agent-harness/cli_anything/calibre/calibre_cli.py:309-325 | calibre/agent-harness/cli_anything/calibre/calibre_cli.py:586-603 | calibre/agent-harness/cli_anything/calibre/calibre_cli.py:749-763 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2400— freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2400-2415 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2517-2531 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2562-2578 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×2
Edited copies of one member (3 members, 10+ corresponding lines) blender/agent-harness/cli_anything/blender/blender_cli.py:383— blender/agent-harness/cli_anything/blender/blender_cli.py:383-392 | blender/agent-harness/cli_anything/blender/blender_cli.py:623-633 | blender/agent-harness/cli_anything/blender/blender_cli.py:689-700 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 10+ corresponding lines) lldb/agent-harness/cli_anything/lldb/lldb_cli.py:81— lldb/agent-harness/cli_anything/lldb/lldb_cli.py:81-90 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:18-27 | renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:102-112 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 7+ corresponding lines) · ×2
Edited copies of one member (6 members, 7+ corresponding lines) joplin/agent-harness/cli_anything/joplin/joplin_cli.py:344— joplin/agent-harness/cli_anything/joplin/joplin_cli.py:344-350 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:401-407 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:416-422 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:532-538 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:547-553 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:723-729 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
Edited copies of one member (6 members, 7+ corresponding lines) joplin/agent-harness/cli_anything/joplin/joplin_cli.py:255— joplin/agent-harness/cli_anything/joplin/joplin_cli.py:255-261 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:286-292 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:371-377 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:601-607 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:624-634 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:645-651 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 15+ corresponding lines) · ×2
Edited copies of one member (4 members, 15+ corresponding lines) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:536— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:536-553 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:685-699 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:779-799 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1054-1069 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 15+ corresponding lines) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:138— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:138-153 | blender/agent-harness/cli_anything/blender/blender_cli.py:199-213 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:125-139 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:105-119 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 5+ corresponding lines) · ×2
Edited copies of one member (3 members, 5+ corresponding lines) lldb/agent-harness/cli_anything/lldb/lldb_cli.py:94— lldb/agent-harness/cli_anything/lldb/lldb_cli.py:94-102 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:31-39 | unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py:68-72 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 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, 5+ corresponding lines) inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:784— inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:784-788 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:446-450 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:454-458 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 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 (35 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:386— freecad/agent-harness/cli_anything/freecad/core/body.py:386-420 | freecad/agent-harness/cli_anything/freecad/core/body.py:959-993 — both copies are in the same file, so extract the 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 (35 lines × 2) freecad/agent-harness/cli_anything/freecad/core/sketch.py:378— freecad/agent-harness/cli_anything/freecad/core/sketch.py:378-412 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:669-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 (31 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:735— freecad/agent-harness/cli_anything/freecad/core/body.py:735-765 | freecad/agent-harness/cli_anything/freecad/core/body.py:858-888 — both copies are in the same file, so extract the 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 (31 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:153— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:153-183 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:715-745 — both copies are in the same file, so extract the 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 `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:153` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:141— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:141-168 | cli-anything-plugin/preview_bundle.py:141-168 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:141-168 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:141-168 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:141-168 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:141-168 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 256 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. 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 (28 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:375— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:375-402 | cli-anything-plugin/preview_bundle.py:375-402 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:375-402 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:375-402 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:375-402 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:375-402 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 256 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. 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 (25–28 lines × 2) musescore/agent-harness/cli_anything/musescore/core/instruments.py:18— musescore/agent-harness/cli_anything/musescore/core/instruments.py:18-42 | musescore/agent-harness/cli_anything/musescore/core/parts.py:14-41 — 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 (25–28 lines × 2) videocaptioner/agent-harness/cli_anything/videocaptioner/core/pipeline.py:58— videocaptioner/agent-harness/cli_anything/videocaptioner/core/pipeline.py:58-85 | videocaptioner/agent-harness/cli_anything/videocaptioner/core/subtitle.py:44-68 — 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 `videocaptioner/agent-harness/cli_anything/videocaptioner/core/pipeline.py:58` 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 (23–27 lines × 2) openscreen/agent-harness/cli_anything/openscreen/core/timeline.py:281— openscreen/agent-harness/cli_anything/openscreen/core/timeline.py:281-307 | openscreen/agent-harness/cli_anything/openscreen/core/timeline.py:332-354 — both copies are in the same file, so extract the 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 (23–27 lines × 2) sbox/agent-harness/cli_anything/sbox/core/session.py:244— sbox/agent-harness/cli_anything/sbox/core/session.py:244-270 | sbox/agent-harness/cli_anything/sbox/core/session.py:273-295 — both copies are in the same file, so extract the 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 (21–22 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:64— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:64-85 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:59-79 — before extracting anything, compare `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 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 `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:64` 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 (21–22 lines × 2) docs/scripts/blender_orbital_relay_drone_demo.py:212— docs/scripts/blender_orbital_relay_drone_demo.py:212-232 | docs/scripts/blender_orbital_relay_drone_demo.py:374-395 — both copies are in the same file, so extract the 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 `docs/scripts/blender_orbital_relay_drone_demo.py:212` 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, `docs/scripts/blender_orbital_relay_drone_demo.py:211` calls `add_modifier`, `_object_index`, `add_object` and `docs/scripts/blender_orbital_relay_drone_demo.py:374` 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 (22 lines × 2) freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:149— freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:149-170 | krita/agent-harness/cli_anything/krita/utils/krita_backend.py:112-133 — 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 `freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:149` 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 (22 lines × 2) drawio/agent-harness/cli_anything/drawio/core/connectors.py:98— drawio/agent-harness/cli_anything/drawio/core/connectors.py:98-119 | drawio/agent-harness/cli_anything/drawio/core/shapes.py:131-152 — before extracting anything, compare `drawio/agent-harness/cli_anything/drawio/core/connectors.py` and `drawio/agent-harness/cli_anything/drawio/core/shapes.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 (21 lines × 6) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:177— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:177-197 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:178-198 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:188-208 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:177-197 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:188-208 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:177-197 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (21 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:111— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:111-131 | cli-anything-plugin/preview_bundle.py:111-131 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:111-131 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:111-131 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:111-131 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:111-131 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 256 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. 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 (20 lines × 2) calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:133— calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:133-152 | calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:172-191 — both copies are in the same file, so extract the 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 `timeout` to `int = 300` in one and `int = 30` 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 (20 lines × 2) joplin/agent-harness/cli_anything/joplin/core/notebooks.py:36— joplin/agent-harness/cli_anything/joplin/core/notebooks.py:36-55 | joplin/agent-harness/cli_anything/joplin/core/notes.py:71-92 — 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 (18–19 lines × 2) docs/scripts/blender_preview_story_demo.py:321— docs/scripts/blender_preview_story_demo.py:321-338 | docs/scripts/freecad_live_preview_demo.py:4471-4489 — 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 `docs/scripts/blender_preview_story_demo.py:321` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–19 lines × 2) docs/scripts/freecad_live_preview_demo.py:3836— docs/scripts/freecad_live_preview_demo.py:3836-3854 | docs/scripts/freecad_live_preview_demo.py:3889-3906 — both copies are in the same file, so extract the 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16–18 lines × 7) audacity/agent-harness/cli_anything/audacity/core/session.py:85— audacity/agent-harness/cli_anything/audacity/core/session.py:85-102 | blender/agent-harness/cli_anything/blender/core/session.py:79-96 | gimp/agent-harness/cli_anything/gimp/core/session.py:79-96 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:79-96 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:79-94 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:81-98 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:79-94 — before extracting anything, compare `audacity/agent-harness/cli_anything/audacity/core/session.py` and `blender/agent-harness/cli_anything/blender/core/session.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 132 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. 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 (16–18 lines × 7) audacity/agent-harness/cli_anything/audacity/core/session.py:105— audacity/agent-harness/cli_anything/audacity/core/session.py:105-122 | blender/agent-harness/cli_anything/blender/core/session.py:99-116 | gimp/agent-harness/cli_anything/gimp/core/session.py:99-116 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:99-116 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:97-112 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:101-118 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:97-112 — before extracting anything, compare `audacity/agent-harness/cli_anything/audacity/core/session.py` and `blender/agent-harness/cli_anything/blender/core/session.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 132 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. 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 (14–16 lines × 3) audacity/agent-harness/cli_anything/audacity/utils/sox_backend.py:61— audacity/agent-harness/cli_anything/audacity/utils/sox_backend.py:61-76 | audacity/agent-harness/cli_anything/audacity/utils/sox_backend.py:100-114 | audacity/agent-harness/cli_anything/audacity/utils/sox_backend.py:138-151 — 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 (14–16 lines × 3) inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:58— inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:58-73 | inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:92-105 | inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:124-137 — 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 (16 lines × 3) calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:239— calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:239-254 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:289-304 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:287-302 — before extracting anything, compare `calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py` and `n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 3) cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:342— cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:342-357 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:386-401 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:431-446 — 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 `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 (15–16 lines × 2) REDACTED:173— REDACTED:173-188 | REDACTED:240-254 — 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 `REDACTED:173` 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 (15–16 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:126— kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:126-141 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:256-270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:246— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:246-260 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:224-238 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:292-306 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:292-306 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:292-306 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:292-306 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:292-306 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:246-260 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:292-306 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:292-306 | cli-anything-plugin/repl_skin.py:292-306 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:292-306 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:292-306 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:292-306 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:292-306 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:292-306 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:292-306 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:257-271 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:292-306 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:292-306 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:292-306 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:292-306 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:292-306 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:292-306 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:292-306 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:292-306 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:292-306 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:292-306 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:292-306 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:246-260 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:292-306 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:230-244 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:292-306 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:292-306 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:296-310 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:292-306 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:292-306 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:292-306 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:292-306 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:292-306 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:292-306 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:292-306 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:292-306 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:292-306 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:292-306 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:292-306 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:292-306 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:292-306 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:292-306 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:292-306 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:292-306 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:292-306 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:292-306 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:257-271 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:246-260 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:224-238 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:294-308 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:292-306 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:292-306 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:292-306 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:292-306 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:245` calls `get` and `calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:244` 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 (15 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:350— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:350-364 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:328-342 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:396-410 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:396-410 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:396-410 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:396-410 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:396-410 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:350-364 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:396-410 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:396-410 | cli-anything-plugin/repl_skin.py:396-410 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:396-410 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:396-410 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:396-410 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:396-410 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:396-410 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:396-410 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:361-375 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:396-410 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:396-410 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:396-410 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:396-410 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:396-410 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:396-410 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:396-410 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:396-410 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:396-410 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:396-410 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:396-410 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:350-364 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:396-410 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:336-350 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:396-410 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:396-410 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:400-414 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:396-410 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:396-410 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:396-410 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:396-410 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:396-410 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:396-410 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:396-410 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:396-410 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:396-410 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:396-410 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:396-410 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:396-410 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:396-410 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:396-410 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:396-410 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:396-410 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:396-410 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:396-410 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:361-375 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:350-364 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:328-342 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:398-412 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:396-410 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:396-410 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:396-410 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:396-410 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 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 (13–14 lines × 9) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:125— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:125-137 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:113-125 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:126-138 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:136-148 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:125-137 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:116-129 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:136-148 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:125-137 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:113-125 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 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 (13–14 lines × 9) blender/agent-harness/cli_anything/blender/blender_cli.py:1121— blender/agent-harness/cli_anything/blender/blender_cli.py:1121-1134 | browser/agent-harness/cli_anything/browser/browser_cli.py:409-422 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:782-795 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:724-736 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:431-443 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:462-475 | safari/agent-harness/cli_anything/safari/safari_cli.py:590-602 | videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:347-359 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:481-494 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 9 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 9 times. 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, `browser/agent-harness/cli_anything/browser/browser_cli.py:424` calls `any`, `startswith` and `blender/agent-harness/cli_anything/blender/blender_cli.py:1135` 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 (14 lines × 4) kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:737— kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:737-750 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:772-785 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:591-604 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:825-838 — 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. 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 lines × 4) seaclip/agent-harness/cli_anything/seaclip/core/activity.py:27— seaclip/agent-harness/cli_anything/seaclip/core/activity.py:27-40 | seaclip/agent-harness/cli_anything/seaclip/core/agents.py:26-39 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:30-43 | seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py:26-39 — 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. 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 lines × 7) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:111— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:111-123 | blender/agent-harness/cli_anything/blender/blender_cli.py:172-184 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:98-110 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:120-132 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:100-112 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:98-110 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:98-110 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times.
Duplicated block (13 lines × 7) audacity/agent-harness/cli_anything/audacity/core/session.py:70— audacity/agent-harness/cli_anything/audacity/core/session.py:70-82 | blender/agent-harness/cli_anything/blender/core/session.py:64-76 | gimp/agent-harness/cli_anything/gimp/core/session.py:64-76 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:64-76 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:64-76 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:66-78 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:64-76 — before extracting anything, compare `audacity/agent-harness/cli_anything/audacity/core/session.py` and `blender/agent-harness/cli_anything/blender/core/session.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 132 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. 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 × 4) QGIS/agent-harness/cli_anything/qgis/core/session.py:20— QGIS/agent-harness/cli_anything/qgis/core/session.py:20-32 | eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:37-48 | openrefine/agent-harness/cli_anything/openrefine/core/session.py:93-104 | zotero/agent-harness/cli_anything/zotero/core/session.py:50-61 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `QGIS/agent-harness/cli_anything/qgis/core/session.py:17` calls `makedirs`, `dirname`, `abspath` and `zotero/agent-harness/cli_anything/zotero/core/session.py:48` 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 (12 lines × 4) rms/agent-harness/cli_anything/rms/core/alerts.py:7— rms/agent-harness/cli_anything/rms/core/alerts.py:7-38 | rms/agent-harness/cli_anything/rms/core/hotspots.py:7-26 | rms/agent-harness/cli_anything/rms/core/logs.py:7-18 | rms/agent-harness/cli_anything/rms/core/remote_access.py:7-22 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
Duplicated block (11–12 lines × 3) blender/agent-harness/cli_anything/blender/core/lighting.py:160— blender/agent-harness/cli_anything/blender/core/lighting.py:160-170 | blender/agent-harness/cli_anything/blender/core/lighting.py:348-358 | blender/agent-harness/cli_anything/blender/core/objects.py:234-245 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `blender/agent-harness/cli_anything/blender/core/objects.py:234` 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–12 lines × 3) lldb/agent-harness/cli_anything/lldb/lldb_cli.py:674— lldb/agent-harness/cli_anything/lldb/lldb_cli.py:674-684 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:481-492 | unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py:1050-1061 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. 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, `lldb/agent-harness/cli_anything/lldb/lldb_cli.py:686` calls `get` and `nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:493` 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 (9–11 lines × 2) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:449— cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:449-457 | cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:512-522 — both copies are in the same file, so extract the 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–11 lines × 2) gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:136— gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:136-146 | gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:431-439 — both copies are in the same file, so extract the 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 `gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:441` calls `getsize` and `gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:148` 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) libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:29— libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:29-38 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:58-67 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:87-96 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:118-127 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:137-146 — 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. 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 (10 lines × 5) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:379— renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:379-392 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:442-465 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:891-911 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1331-1340 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1368-1384 — 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. 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, `renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:394` calls `_pso_for_stage` and `renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:467` 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 lines × 4) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:81— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:81-90 | browser/agent-harness/cli_anything/browser/browser_cli.py:87-96 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:81-90 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:82-91 — 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 `3MF/agent-harness/cli_anything/threemf/threemf_cli.py:81` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 4) browser/agent-harness/cli_anything/browser/browser_cli.py:81— browser/agent-harness/cli_anything/browser/browser_cli.py:81-90 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:75-84 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:76-85 | videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:46-55 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (9–10 lines × 2) freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:477— freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:477-485 | freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.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 (9–10 lines × 2) sbox/agent-harness/cli_anything/sbox/core/scene.py:534— sbox/agent-harness/cli_anything/sbox/core/scene.py:534-543 | sbox/agent-harness/cli_anything/sbox/core/scene.py:1325-1333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 4) lldb/agent-harness/cli_anything/lldb/lldb_cli.py:674— lldb/agent-harness/cli_anything/lldb/lldb_cli.py:674-682 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:481-489 | renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:993-1001 | unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py:1050-1058 — 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. 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, `nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:480` calls `basename`, `get` and `renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:992` 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 (9 lines × 4) nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:481— nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:481-489 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:430-438 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:461-469 | unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py:1050-1058 — 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. 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–9 lines × 3) docs/scripts/blender_orbital_relay_drone_demo.py:167— docs/scripts/blender_orbital_relay_drone_demo.py:167-174 | docs/scripts/blender_orbital_relay_drone_demo.py:175-182 | docs/scripts/blender_orbital_relay_drone_demo.py:190-198 — 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 `docs/scripts/blender_orbital_relay_drone_demo.py:190` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `docs/scripts/blender_orbital_relay_drone_demo.py:201` calls `_build_stage_01_hull_blockout`, `add_object` and `docs/scripts/blender_orbital_relay_drone_demo.py:175` 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–9 lines × 3) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:318— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:318-325 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:366-374 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:459-466 — 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 (11 lines × 9) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:158— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:158-168 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:146-156 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:159-169 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:169-179 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:158-168 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:150-160 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:169-179 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:158-168 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:146-156 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 9) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:226— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:226-236 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:359-369 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:397-407 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:207-217 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:155-165 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_system.py:102-112 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_system.py:128-138 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:222-232 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:290-300 — there are 9 copies across 6 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 9 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_system.py:118` calls `group`, `role_group` and `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_system.py:141` 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 × 6) audacity/agent-harness/cli_anything/audacity/core/project.py:68— audacity/agent-harness/cli_anything/audacity/core/project.py:68-75 | blender/agent-harness/cli_anything/blender/core/scene.py:135-142 | gimp/agent-harness/cli_anything/gimp/core/project.py:77-84 | REDACTED:102-109 | kdenlive/agent-harness/cli_anything/kdenlive/core/project.py:134-141 | obs-studio/agent-harness/cli_anything/obs_studio/core/project.py:93-100 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `audacity/agent-harness/cli_anything/audacity/core/project.py:81` calls `makedirs`, `dirname`, `abspath` and `gimp/agent-harness/cli_anything/gimp/core/project.py:90` 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 × 6) shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1386— shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1386-1393 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1407-1414 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1427-1434 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1449-1456 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1467-1474 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1498-1505 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7–8 lines × 2) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1906— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1906-1913 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1999-2005 — both copies are in the same file, so extract the 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 `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1906` 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) unrealinsights/agent-harness/cli_anything/unrealinsights/core/capture.py:48— unrealinsights/agent-harness/cli_anything/unrealinsights/core/capture.py:48-55 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/unrealinsights_backend.py:122-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `engine_root` to `str` in one and `str | Path` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:61— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:61-67 | cli-anything-plugin/preview_bundle.py:61-67 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:61-67 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:61-67 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:61-67 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:61-67 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 256 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. 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 × 6) docs/scripts/blender_orbital_relay_drone_demo.py:173— docs/scripts/blender_orbital_relay_drone_demo.py:173-179 | docs/scripts/blender_orbital_relay_drone_demo.py:181-187 | docs/scripts/blender_orbital_relay_drone_demo.py:210-216 | docs/scripts/blender_orbital_relay_drone_demo.py:219-225 | docs/scripts/blender_orbital_relay_drone_demo.py:228-234 | docs/scripts/blender_orbital_relay_drone_demo.py:382-388 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_orbital_relay_drone_demo.py:173` 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 × 4) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:189— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:189-196 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:179-185 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:184-191 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:176-183 — before extracting anything, compare `audacity/agent-harness/cli_anything/audacity/audacity_cli.py` and `gimp/agent-harness/cli_anything/gimp/gimp_cli.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 122 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 `audacity/agent-harness/cli_anything/audacity/audacity_cli.py:189` 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 × 4) freecad/agent-harness/cli_anything/freecad/core/assembly.py:64— freecad/agent-harness/cli_anything/freecad/core/assembly.py:64-70 | freecad/agent-harness/cli_anything/freecad/core/cam.py:48-54 | freecad/agent-harness/cli_anything/freecad/core/fem.py:64-76 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:71-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 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 (5 lines × 7) audacity/agent-harness/cli_anything/audacity/core/clips.py:149— audacity/agent-harness/cli_anything/audacity/core/clips.py:149-153 | audacity/agent-harness/cli_anything/audacity/core/clips.py:184-188 | audacity/agent-harness/cli_anything/audacity/core/clips.py:237-241 | audacity/agent-harness/cli_anything/audacity/core/effects.py:265-270 | audacity/agent-harness/cli_anything/audacity/core/effects.py:286-291 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:207-212 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:236-241 — there are 7 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind `track_index` to `int` in one and `int = 0` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 7) audacity/agent-harness/cli_anything/audacity/core/session.py:46— audacity/agent-harness/cli_anything/audacity/core/session.py:46-50 | blender/agent-harness/cli_anything/blender/core/session.py:42-46 | gimp/agent-harness/cli_anything/gimp/core/session.py:42-46 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:42-46 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:42-46 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:42-46 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:42-46 — before extracting anything, compare `audacity/agent-harness/cli_anything/audacity/core/session.py` and `blender/agent-harness/cli_anything/blender/core/session.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 132 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.
AX2 · Stateful singletons· Process-global static state · ×1
Process-global static state: BridgeMod slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:41— `BridgeMod` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_listener, _serverThread; e.g. `_listener` at line 42). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
shotcut_cli._run_repl (cyclomatic 130) shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1192— shotcut_cli._run_repl has cyclomatic complexity 130 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mubu_probe.main (cyclomatic 104) REDACTED:1656— mubu_probe.main has cyclomatic complexity 104 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
video_doctor.caption_doctor (cyclomatic 73) cli-hub-matrix/video-creation/scripts/video_doctor.py:523— video_doctor.caption_doctor has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
fixers.autofix (cyclomatic 62) n8n/agent-harness/cli_anything/n8n/core/fixers.py:24— fixers.autofix has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BridgeMod.FormatMultiplayerBattleMarkdown (cyclomatic 55) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:672— BridgeMod.FormatMultiplayerBattleMarkdown has cyclomatic complexity 55 (threshold 15). Of this number, 43 points are the body's own statements and 12 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drawio_cli._run_repl (cyclomatic 51) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:664— drawio_cli._run_repl has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
openscreen_cli.repl (cyclomatic 48) openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:584— openscreen_cli.repl 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.
BridgeMod.FormatAsMarkdown (cyclomatic 44) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:10— BridgeMod.FormatAsMarkdown has cyclomatic complexity 44 (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.
mlt_xml.build_mlt_xml (cyclomatic 44) kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:133— mlt_xml.build_mlt_xml 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.
video_doctor.audio_doctor (cyclomatic 44) cli-hub-matrix/video-creation/scripts/video_doctor.py:2139— video_doctor.audio_doctor has cyclomatic complexity 44 (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.
BridgeMod.FormatBattleMarkdown (cyclomatic 43) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:133— BridgeMod.FormatBattleMarkdown has cyclomatic complexity 43 (threshold 15). Of this number, 33 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
parser._parse_message_payload (cyclomatic 43) nslogger/agent-harness/cli_anything/nslogger/core/parser.py:84— parser._parse_message_payload 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.
video_doctor.sources_doctor (cyclomatic 42) cli-hub-matrix/video-creation/scripts/video_doctor.py:1041— video_doctor.sources_doctor 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.
n8n_cli.workflow_patch (cyclomatic 41) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1446— n8n_cli.workflow_patch has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
discovery.list_installations (cyclomatic 36) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/discovery.py:276— discovery.list_installations 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.
document._object_to_svg_element (cyclomatic 35) REDACTED:322— document._object_to_svg_element has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
macrocli_cli.macro_record (cyclomatic 34) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:448— macrocli_cli.macro_record 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.
n8n_cli.workflow_validate (cyclomatic 34) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1290— n8n_cli.workflow_validate 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.
cloudcompare_cli.repl (cyclomatic 33) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:155— cloudcompare_cli.repl 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.
BridgeMod.FormatMapMarkdown (cyclomatic 32) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:363— BridgeMod.FormatMapMarkdown has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cli.matrix_preflight (cyclomatic 32) cli-hub/cli_hub/cli.py:663— cli.matrix_preflight 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.
preview._normalize_trajectory (cyclomatic 32) cli-hub/cli_hub/preview.py:330— preview._normalize_trajectory has cyclomatic complexity 32 (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.
linter.lint_model (cyclomatic 32) live2d/agent-harness/cli_anything/live2d/core/linter.py:61— linter.lint_model 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.
REDACTED.matrixFlipCard (cyclomatic 32) REDACTED:2296— REDACTED.matrixFlipCard has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 12 of the 32 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 2330, 2325, 2353, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
BridgeMod.BuildMultiplayerGameState (cyclomatic 31) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:24— BridgeMod.BuildMultiplayerGameState 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.
export._apply_single_filter (cyclomatic 31) gimp/agent-harness/cli_anything/gimp/core/export.py:325— export._apply_single_filter has cyclomatic complexity 31 (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.
live2d_cli.flatten (cyclomatic 31) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1865— live2d_cli.flatten 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.
live2d_cli.runtime_check (cyclomatic 31) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1964— live2d_cli.runtime_check 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.
filter.filter_messages (cyclomatic 31) nslogger/agent-harness/cli_anything/nslogger/core/filter.py:9— filter.filter_messages 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.
live2d_cli.batch (cyclomatic 30) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:954— live2d_cli.batch 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.
video_doctor.manifest_audio_overlap_review (cyclomatic 30) cli-hub-matrix/video-creation/scripts/video_doctor.py:1966— video_doctor.manifest_audio_overlap_review 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.
BridgeMod.BuildGameState (cyclomatic 28) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:42— BridgeMod.BuildGameState 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.
cli.matrix_install (cyclomatic 28) cli-hub/cli_hub/cli.py:854— cli.matrix_install 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.
gimp_backend._filter_to_script_fu (cyclomatic 28) gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:269— gimp_backend._filter_to_script_fu has cyclomatic complexity 28 (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.
generate._generate_module (cyclomatic 28) mailchimp/agent-harness/cli_anything/mailchimp/_codegen/generate.py:269— generate._generate_module 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.
zotero_cli._handle_repl_builtin (cyclomatic 28) zotero/agent-harness/cli_anything/zotero/zotero_cli.py:872— zotero_cli._handle_repl_builtin has cyclomatic complexity 28 (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.
REDACTED.iconFor (cyclomatic 28) REDACTED:1674— REDACTED.iconFor has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
builder.buildLayer (cyclomatic 28) sketch/agent-harness/src/builder.js:190— builder.buildLayer has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
siyuan_cli._handle_doc_repl (cyclomatic 27) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:270— siyuan_cli._handle_doc_repl 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.
validate.validate_project (cyclomatic 26) sbox/agent-harness/cli_anything/sbox/core/validate.py:97— validate.validate_project 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.
export.render (cyclomatic 25) openscreen/agent-harness/cli_anything/openscreen/core/export.py:52— export.render has cyclomatic complexity 25 (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.
preview.capture (cyclomatic 25) openscreen/agent-harness/cli_anything/openscreen/core/preview.py:99— preview.capture has cyclomatic complexity 25 (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.
analysis._prompt_context (cyclomatic 25) zotero/agent-harness/cli_anything/zotero/core/analysis.py:39— analysis._prompt_context has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
REDACTED.renderNpmCard (cyclomatic 25) REDACTED:2579— REDACTED.renderNpmCard has cyclomatic complexity 25 (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.
layout.layoutVerticalStack (cyclomatic 25) sketch/agent-harness/src/layout.js:78— layout.layoutVerticalStack has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
BridgeMod.ExecuteUsePotion (cyclomatic 24) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:365— BridgeMod.ExecuteUsePotion 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. This is NOT this file's highest cyclomatic complexity: BridgeMod.ExecuteAction (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
BridgeMod.FormatShopMarkdown (cyclomatic 24) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:316— BridgeMod.FormatShopMarkdown 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.
cli.matrix_info (cyclomatic 24) cli-hub/cli_hub/cli.py:566— cli.matrix_info 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.
commands.validator_plan (cyclomatic 24) eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/core/commands.py:27— commands.validator_plan has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
packager.package_model (cyclomatic 24) live2d/agent-harness/cli_anything/live2d/core/packager.py:40— packager.package_model 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.
replay.analyze_capture (cyclomatic 24) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/replay.py:376— replay.analyze_capture 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.
openrefine_cli.repl (cyclomatic 24) openrefine/agent-harness/cli_anything/openrefine/openrefine_cli.py:97— openrefine_cli.repl 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.
pipeline.dump_shader_reflection (cyclomatic 24) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:746— pipeline.dump_shader_reflection 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.
codegen.generate_component (cyclomatic 24) sbox/agent-harness/cli_anything/sbox/core/codegen.py:11— codegen.generate_component 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.
transitions.add_transition (cyclomatic 24) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:170— transitions.add_transition 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.
storage.analyze_project_storage (cyclomatic 24) unimol_tools/agent-harness/cli_anything/unimol_tools/core/storage.py:49— storage.analyze_project_storage has cyclomatic complexity 24 (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.
lighting.set_camera (cyclomatic 23) blender/agent-harness/cli_anything/blender/core/lighting.py:131— lighting.set_camera 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.
objects.add_object (cyclomatic 23) blender/agent-harness/cli_anything/blender/core/objects.py:41— objects.add_object 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.
LLDBDebugAdapter._emit_execution_event (cyclomatic 23) lldb/agent-harness/cli_anything/lldb/dap.py:728— LLDBDebugAdapter._emit_execution_event has cyclomatic complexity 23 (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.
nslogger_cli._run_repl (cyclomatic 23) nslogger/agent-harness/cli_anything/nslogger/nslogger_cli.py:545— nslogger_cli._run_repl 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.
siyuan_cli._handle_block_repl (cyclomatic 23) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:338— siyuan_cli._handle_block_repl 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.
REDACTED.initDeckGestures (cyclomatic 23) REDACTED:1988— REDACTED.initDeckGestures has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 2021, endDrag, a function literal at line 1994, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
layout.layoutHorizontalStack (cyclomatic 23) sketch/agent-harness/src/layout.js:133— layout.layoutHorizontalStack 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.
export._apply_single_effect (cyclomatic 22) audacity/agent-harness/cli_anything/audacity/core/export.py:355— export._apply_single_effect 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.
lighting.add_light (cyclomatic 22) blender/agent-harness/cli_anything/blender/core/lighting.py:245— lighting.add_light 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.
text.set_text_property (cyclomatic 22) inkscape/agent-harness/cli_anything/inkscape/core/text.py:109— text.set_text_property 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.
transitions.add_transition (cyclomatic 22) kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:54— transitions.add_transition 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.
macrocli_cli.macro_parameterize (cyclomatic 22) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:591— macrocli_cli.macro_parameterize 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.
generate._generate_command_func (cyclomatic 22) mailchimp/agent-harness/cli_anything/mailchimp/_codegen/generate.py:138— generate._generate_command_func 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.
mermaid_cli.repl (cyclomatic 22) mermaid/agent-harness/cli_anything/mermaid/mermaid_cli.py:191— mermaid_cli.repl 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.
video_doctor.lint_doctor (cyclomatic 22) cli-hub-matrix/video-creation/scripts/video_doctor.py:1727— video_doctor.lint_doctor 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.
layout.intrinsicSize (cyclomatic 22) sketch/agent-harness/src/layout.js:40— layout.intrinsicSize 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.
BridgeMod.BuildCardSelectState (cyclomatic 21) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1054— BridgeMod.BuildCardSelectState has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
export.verify_file (cyclomatic 21) anygen/agent-harness/cli_anything/anygen/core/export.py:7— export.verify_file 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.
lighting.set_light (cyclomatic 21) blender/agent-harness/cli_anything/blender/core/lighting.py:319— lighting.set_light 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.
differ.diff_models (cyclomatic 21) live2d/agent-harness/cli_anything/live2d/core/differ.py:42— differ.diff_models 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.
live2d_cli.find_replace (cyclomatic 21) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1342— live2d_cli.find_replace 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.
gpu_trace._build_trace_analysis (cyclomatic 21) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/gpu_trace.py:368— gpu_trace._build_trace_analysis 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.
discovery.discover_binaries (cyclomatic 21) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/discovery.py:214— discovery.discover_binaries 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.
NSLoggerListener._handle_client (cyclomatic 21) REDACTED:430— NSLoggerListener._handle_client 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.
extract_tools._find_brace_end (cyclomatic 21) safari/agent-harness/scripts/extract_tools.py:206— extract_tools._find_brace_end 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.
timeline.remove_track (cyclomatic 21) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:320— timeline.remove_track 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.
mubu_cli.handle_repl_builtin (cyclomatic 21) mubu/agent-harness/cli_anything/mubu/mubu_cli.py:305— mubu_cli.handle_repl_builtin 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.
BridgeMod.ExecuteStartNewGame (cyclomatic 20) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:147— BridgeMod.ExecuteStartNewGame 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. This is NOT this file's highest cyclomatic complexity: BridgeMod.ExecuteAction (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
BridgeMod.FormatCardSelectMarkdown (cyclomatic 20) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:576— BridgeMod.FormatCardSelectMarkdown has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
objects.set_object_property (cyclomatic 20) blender/agent-harness/cli_anything/blender/core/objects.py:220— objects.set_object_property 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.
materials.create_material (cyclomatic 20) freecad/agent-harness/cli_anything/freecad/core/materials.py:240— materials.create_material 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.
freecad_macro_gen._gen_bodies (cyclomatic 20) freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:244— freecad_macro_gen._gen_bodies has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
snapshot.generate_html (cyclomatic 20) live2d/agent-harness/cli_anything/live2d/core/snapshot.py:22— snapshot.generate_html 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.
gpu_trace.capture_trace (cyclomatic 20) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/gpu_trace.py:583— gpu_trace.capture_trace has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
workflow_demo.main (cyclomatic 20) shotcut/agent-harness/workflow_demo.py:34— workflow_demo.main 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.
skill_generator.extract_commands_from_cli (cyclomatic 20) REDACTED:108— skill_generator.extract_commands_from_cli 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.
REDACTED.renderHarnessCard (cyclomatic 20) REDACTED:2500— REDACTED.renderHarnessCard has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
render.set_render_settings (cyclomatic 19) blender/agent-harness/cli_anything/blender/core/render.py:64— render.set_render_settings 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.
library.library_info (cyclomatic 19) calibre/agent-harness/cli_anything/calibre/core/library.py:12— library.library_info 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.
ccswitch_cli._write_live_config (cyclomatic 19) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:350— ccswitch_cli._write_live_config 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.
installer.install_matrix (cyclomatic 19) cli-hub/cli_hub/installer.py:463— installer.install_matrix 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.
comparer.compare_models (cyclomatic 19) live2d/agent-harness/cli_anything/live2d/core/comparer.py:54— comparer.compare_models 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.
GUIAgentBackend._instruct (cyclomatic 19) macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:239— GUIAgentBackend._instruct 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.
visual_anchor._get_window_bounds (cyclomatic 19) macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py:222— visual_anchor._get_window_bounds 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.
parsing.parse_unified_help (cyclomatic 19) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/parsing.py:22— parsing.parse_unified_help 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.
prefab.modify_component (cyclomatic 19) sbox/agent-harness/cli_anything/sbox/core/prefab.py:262— prefab.modify_component 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.
preview.capture (cyclomatic 19) shotcut/agent-harness/cli_anything/shotcut/core/preview.py:112— preview.capture 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.
BridgeMod.FormatEventMarkdown (cyclomatic 18) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:248— BridgeMod.FormatEventMarkdown 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.
cli.list_clis (cyclomatic 18) cli-hub/cli_hub/cli.py:181— cli.list_clis 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.
export._render_via_pillow (cyclomatic 18) gimp/agent-harness/cli_anything/gimp/core/export.py:87— export._render_via_pillow 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.
export._render_object (cyclomatic 18) inkscape/agent-harness/cli_anything/inkscape/core/export.py:219— export._render_object 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.
live2d_cli.param_list (cyclomatic 18) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1797— live2d_cli.param_list 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.
llm_assist.generate_macro (cyclomatic 18) macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py:294— llm_assist.generate_macro 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.
runtime._check_condition (cyclomatic 18) macrocli/agent-harness/cli_anything/macrocli/core/runtime.py:62— runtime._check_condition 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.
project.set_setting (cyclomatic 18) openscreen/agent-harness/cli_anything/openscreen/core/project.py:139— project.set_setting 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.
unimol_tools_cli.cleanup_models (cyclomatic 18) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:655— unimol_tools_cli.cleanup_models 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.
video_doctor.main (cyclomatic 18) cli-hub-matrix/video-creation/scripts/video_doctor.py:2534— video_doctor.main 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.
native_bonjour_listener.swift.parseArguments (cyclomatic 18) nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:30— native_bonjour_listener.swift.parseArguments 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.
REDACTED.renderDeck (cyclomatic 18) REDACTED:2031— REDACTED.renderDeck has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2051, 2042). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
effects.validate_params (cyclomatic 17) audacity/agent-harness/cli_anything/audacity/core/effects.py:183— effects.validate_params 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.
export.render_mix (cyclomatic 17) audacity/agent-harness/cli_anything/audacity/core/export.py:122— export.render_mix 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.
export._render_clip (cyclomatic 17) audacity/agent-harness/cli_anything/audacity/core/export.py:272— export._render_clip 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.
modifiers.validate_params (cyclomatic 17) blender/agent-harness/cli_anything/blender/core/modifiers.py:150— modifiers.validate_params 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.
domshell_backend._call_execute (cyclomatic 17) browser/agent-harness/cli_anything/browser/utils/domshell_backend.py:497— domshell_backend._call_execute 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.
matrix.resolve_install_scope (cyclomatic 17) cli-hub/cli_hub/matrix.py:352— matrix.resolve_install_scope 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.
freecad_macro_gen._gen_placements (cyclomatic 17) freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:441— freecad_macro_gen._gen_placements 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.
filters.validate_params (cyclomatic 17) gimp/agent-harness/cli_anything/gimp/core/filters.py:246— filters.validate_params 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.
document.project_to_svg (cyclomatic 17) REDACTED:218— document.project_to_svg 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.
lldb_cli.repl (cyclomatic 17) lldb/agent-harness/cli_anything/lldb/lldb_cli.py:640— lldb_cli.repl 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.
replay._build_analysis (cyclomatic 17) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/replay.py:300— replay._build_analysis 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.
filters._validate_filter_params (cyclomatic 17) obs-studio/agent-harness/cli_anything/obs_studio/core/filters.py:139— filters._validate_filter_params 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.
ollama_cli.generate_chat (cyclomatic 17) ollama/agent-harness/cli_anything/ollama/ollama_cli.py:280— ollama_cli.generate_chat 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.
scene.query_objects (cyclomatic 17) sbox/agent-harness/cli_anything/sbox/core/scene.py:968— scene.query_objects 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.
scene._category_for_ref (cyclomatic 17) sbox/agent-harness/cli_anything/sbox/core/scene.py:1096— scene._category_for_ref 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.
timeline._remove_adjacent_transitions (cyclomatic 17) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:35— timeline._remove_adjacent_transitions 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.
timeline.add_clip (cyclomatic 17) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:438— timeline.add_clip 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.
skill_generator.extract_commands_from_cli (cyclomatic 17) REDACTED:248— skill_generator.extract_commands_from_cli 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.
threemf_backend.cross_section_circles (cyclomatic 16) 3MF/agent-harness/cli_anything/threemf/utils/threemf_backend.py:243— threemf_backend.cross_section_circles 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.
clips.add_clip (cyclomatic 16) audacity/agent-harness/cli_anything/audacity/core/clips.py:60— clips.add_clip 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.
animation.add_keyframe (cyclomatic 16) blender/agent-harness/cli_anything/blender/core/animation.py:17— animation.add_keyframe 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.
lighting.add_camera (cyclomatic 16) blender/agent-harness/cli_anything/blender/core/lighting.py:58— lighting.add_camera 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.
materials.set_material_property (cyclomatic 16) blender/agent-harness/cli_anything/blender/core/materials.py:147— materials.set_material_property 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.
preview._publish_live_session (cyclomatic 16) blender/agent-harness/cli_anything/blender/core/preview.py:458— preview._publish_live_session 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.
export._parse_epub_chapters (cyclomatic 16) REDACTED:174— export._parse_epub_chapters 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.
matrix.preflight_matrix (cyclomatic 16) cli-hub/cli_hub/matrix.py:224— matrix.preflight_matrix has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
measure.check_geometry (cyclomatic 16) freecad/agent-harness/cli_anything/freecad/core/measure.py:647— measure.check_geometry 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.
odf_utils.validate_odf (cyclomatic 16) REDACTED:626— odf_utils.validate_odf 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.
live2d_cli.manifest (cyclomatic 16) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1563— live2d_cli.manifest 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.
SemanticUIBackend._wait_for_window (cyclomatic 16) macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:441— SemanticUIBackend._wait_for_window 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.
parameterize.llm_suggest_parameters (cyclomatic 16) macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py:207— parameterize.llm_suggest_parameters 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.
macrocli_cli.macro_info (cyclomatic 16) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:267— macrocli_cli.macro_info 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.
n8n_cli.workflow_test (cyclomatic 16) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1783— n8n_cli.workflow_test 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.
pm2_cli._output (cyclomatic 16) pm2/agent-harness/cli_anything/pm2/pm2_cli.py:16— pm2_cli._output 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.
diff._diff_from_snapshots (cyclomatic 16) renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:331— diff._diff_from_snapshots 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.
pipeline.export_shader_reflection (cyclomatic 16) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:885— pipeline.export_shader_reflection 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.
preview.capture (cyclomatic 16) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:111— preview.capture 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.
codegen.generate_class (cyclomatic 16) sbox/agent-harness/cli_anything/sbox/core/codegen.py:521— codegen.generate_class 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.
transitions._remove_transition_and_restore (cyclomatic 16) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:485— transitions._remove_transition_and_restore 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.
state_adapter.normalize_state (cyclomatic 16) slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/core/state_adapter.py:8— state_adapter.normalize_state 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.
slay_the_spire_ii_cli.repl (cyclomatic 16) slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/slay_the_spire_ii_cli.py:293— slay_the_spire_ii_cli.repl 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.
update_registry_dates._extract_pypi_package (cyclomatic 16) .github/scripts/update_registry_dates.py:138— update_registry_dates._extract_pypi_package 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.
freecad_live_preview_demo.collect_demo (cyclomatic 16) docs/scripts/freecad_live_preview_demo.py:3411— freecad_live_preview_demo.collect_demo 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.
freecad_live_preview_demo.generate_curiosity_true_motion_showcase (cyclomatic 16) docs/scripts/freecad_live_preview_demo.py:3927— freecad_live_preview_demo.generate_curiosity_true_motion_showcase 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.
mubu_probe.recent_documents (cyclomatic 16) REDACTED:647— mubu_probe.recent_documents 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.
fixers.autofix (cognitive 226) n8n/agent-harness/cli_anything/n8n/core/fixers.py:24— fixers.autofix has cognitive complexity 226 (threshold 15). Drivers by points: if/else 41 (162 pts), loops 16 (58 pts), boolean chains 6 (nesting depth added 163). 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.
shotcut_cli._run_repl (cognitive 210) shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1192— shotcut_cli._run_repl has cognitive complexity 210 (threshold 15). Drivers by points: if/else 45 (117 pts), ternaries 11 (32 pts), loops 11 (31 pts), boolean chains 24, error handling 3 (6 pts) (nesting depth added 116). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mubu_probe.main (cognitive 187) REDACTED:1656— mubu_probe.main has cognitive complexity 187 (threshold 15). Drivers by points: if/else 73 (143 pts), boolean chains 18, ternaries 6 (12 pts), error handling 4 (8 pts), loops 3 (6 pts) (nesting depth added 83). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BridgeMod.FormatMultiplayerBattleMarkdown (cognitive 122) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:672— BridgeMod.FormatMultiplayerBattleMarkdown has cognitive complexity 122 (threshold 15). Of this number, 99 points are the body's own statements and 23 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
video_doctor.caption_doctor (cognitive 110) cli-hub-matrix/video-creation/scripts/video_doctor.py:523— video_doctor.caption_doctor has cognitive complexity 110 (threshold 15). Drivers by points: if/else 35 (69 pts), boolean chains 24, ternaries 9 (12 pts), loops 3 (5 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.
n8n_cli.workflow_patch (cognitive 101) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1446— n8n_cli.workflow_patch has cognitive complexity 101 (threshold 15). Drivers by points: if/else 26 (70 pts), loops 7 (24 pts), boolean chains 7 (nesting depth added 61). 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.
video_doctor.manifest_audio_overlap_review (cognitive 86) cli-hub-matrix/video-creation/scripts/video_doctor.py:1966— video_doctor.manifest_audio_overlap_review has cognitive complexity 86 (threshold 15). Drivers by points: if/else 9 (34 pts), ternaries 6 (30 pts), boolean chains 9, error handling 2 (7 pts), loops 3 (6 pts) (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawio_cli._run_repl (cognitive 80) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:664— drawio_cli._run_repl has cognitive complexity 80 (threshold 15). Drivers by points: if/else 18 (45 pts), ternaries 7 (21 pts), loops 4 (10 pts), error handling 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.
n8n_cli.workflow_validate (cognitive 77) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1290— n8n_cli.workflow_validate has cognitive complexity 77 (threshold 15). Drivers by points: if/else 24 (52 pts), loops 8 (22 pts), boolean chains 3 (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.
openscreen_cli.repl (cognitive 75) openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:584— openscreen_cli.repl has cognitive complexity 75 (threshold 15). Drivers by points: if/else 18 (41 pts), error handling 5 (15 pts), ternaries 4 (12 pts), boolean chains 6, loops 1 (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.
video_doctor.sources_doctor (cognitive 75) cli-hub-matrix/video-creation/scripts/video_doctor.py:1041— video_doctor.sources_doctor has cognitive complexity 75 (threshold 15). Drivers by points: if/else 22 (55 pts), boolean chains 15, loops 2 (3 pts), error handling 1 (2 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.
validate.validate_project (cognitive 74) sbox/agent-harness/cli_anything/sbox/core/validate.py:97— validate.validate_project has cognitive complexity 74 (threshold 15). Drivers by points: if/else 14 (39 pts), loops 5 (14 pts), ternaries 4 (14 pts), error handling 2 (6 pts), boolean chains 1 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BridgeMod.FormatBattleMarkdown (cognitive 73) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:133— BridgeMod.FormatBattleMarkdown has cognitive complexity 73 (threshold 15). Of this number, 55 points are the body's own statements and 18 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mlt_xml.build_mlt_xml (cognitive 72) kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:133— mlt_xml.build_mlt_xml has cognitive complexity 72 (threshold 15). Drivers by points: if/else 20 (41 pts), loops 15 (23 pts), ternaries 7, boolean chains 1 (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.
openrefine_cli.repl (cognitive 64) openrefine/agent-harness/cli_anything/openrefine/openrefine_cli.py:97— openrefine_cli.repl has cognitive complexity 64 (threshold 15). Drivers by points: if/else 23 (48 pts), error handling 5 (10 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
linter.lint_model (cognitive 59) live2d/agent-harness/cli_anything/live2d/core/linter.py:61— linter.lint_model has cognitive complexity 59 (threshold 15). Drivers by points: if/else 20 (44 pts), loops 7 (9 pts), boolean chains 3, error handling 1 (3 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.
live2d_cli.runtime_check (cognitive 58) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1964— live2d_cli.runtime_check has cognitive complexity 58 (threshold 15). Drivers by points: if/else 26 (45 pts), loops 4 (9 pts), boolean chains 4 (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.
cloudcompare_cli.repl (cognitive 57) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:155— cloudcompare_cli.repl has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (26 pts), ternaries 6 (9 pts), error handling 4 (8 pts), boolean chains 7, loops 3 (7 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.
packager.package_model (cognitive 57) live2d/agent-harness/cli_anything/live2d/core/packager.py:40— packager.package_model has cognitive complexity 57 (threshold 15). Drivers by points: if/else 26 (44 pts), loops 5 (9 pts), ternaries 1 (4 pts) (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.
transitions.retime_transitions_for_clip (cognitive 57) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:602— transitions.retime_transitions_for_clip has cognitive complexity 57 (threshold 15). Drivers by points: if/else 7 (33 pts), loops 4 (17 pts), ternaries 1 (7 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.
discovery.list_installations (cognitive 56) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/discovery.py:276— discovery.list_installations has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (34 pts), boolean chains 9, loops 6 (9 pts), ternaries 4 (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.
BridgeMod.BuildMultiplayerGameState (cognitive 55) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:24— BridgeMod.BuildMultiplayerGameState has cognitive complexity 55 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BridgeMod.FormatAsMarkdown (cognitive 54) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:10— BridgeMod.FormatAsMarkdown has cognitive complexity 54 (threshold 15). 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.
video_doctor.audio_doctor (cognitive 54) cli-hub-matrix/video-creation/scripts/video_doctor.py:2139— video_doctor.audio_doctor has cognitive complexity 54 (threshold 15). Drivers by points: if/else 22 (28 pts), boolean chains 16, loops 3 (7 pts), ternaries 2 (3 pts) (nesting depth added 11). 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.
cli.matrix_install (cognitive 53) cli-hub/cli_hub/cli.py:854— cli.matrix_install has cognitive complexity 53 (threshold 15). Drivers by points: if/else 21 (32 pts), ternaries 7 (17 pts), boolean chains 2, 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.
BridgeMod.FormatMapMarkdown (cognitive 52) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:363— BridgeMod.FormatMapMarkdown has cognitive complexity 52 (threshold 15). Of this number, 49 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
document._object_to_svg_element (cognitive 52) REDACTED:322— document._object_to_svg_element has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (38 pts), loops 6 (12 pts), boolean chains 2 (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.
live2d_cli.batch (cognitive 52) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:954— live2d_cli.batch has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (27 pts), loops 6 (16 pts), boolean chains 5, ternaries 2 (4 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.
cli.matrix_preflight (cognitive 50) cli-hub/cli_hub/cli.py:663— cli.matrix_preflight has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (30 pts), ternaries 6 (8 pts), boolean chains 7, loops 2 (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.
macrocli_cli.macro_record (cognitive 50) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:448— macrocli_cli.macro_record has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (31 pts), boolean chains 8, error handling 4 (5 pts), loops 1 (3 pts), ternaries 2 (3 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.
BridgeMod.BuildGameState (cognitive 49) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:42— BridgeMod.BuildGameState has cognitive complexity 49 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
live2d_cli.flatten (cognitive 47) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1865— live2d_cli.flatten has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 12 (16 pts), ternaries 5, 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.
parser._parse_message_payload (cognitive 46) nslogger/agent-harness/cli_anything/nslogger/core/parser.py:84— parser._parse_message_payload has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 8 (22 pts), boolean chains 12, if/else 7 (11 pts), loops 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.
macrocli_cli.macro_parameterize (cognitive 45) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:591— macrocli_cli.macro_parameterize has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (27 pts), error handling 3 (9 pts), loops 2 (5 pts), boolean chains 4 (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.
nslogger_cli._run_repl (cognitive 45) nslogger/agent-harness/cli_anything/nslogger/nslogger_cli.py:545— nslogger_cli._run_repl has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (25 pts), error handling 7 (15 pts), boolean chains 2, ternaries 1 (2 pts), loops 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.
live2d_cli.watch (cognitive 44) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1177— live2d_cli.watch has cognitive complexity 44 (threshold 15). Drivers by points: loops 8 (26 pts), if/else 4 (16 pts), boolean chains 1, error handling 1 (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.
NSLoggerListener._handle_client (cognitive 44) REDACTED:430— NSLoggerListener._handle_client has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (25 pts), error handling 5 (11 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
filter.filter_messages (cognitive 42) nslogger/agent-harness/cli_anything/nslogger/core/filter.py:9— filter.filter_messages has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 14, ternaries 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.
generate._generate_module (cognitive 41) mailchimp/agent-harness/cli_anything/mailchimp/_codegen/generate.py:269— generate._generate_module has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 11, loops 2 (4 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.
live2d_cli.find_replace (cognitive 40) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1342— live2d_cli.find_replace has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 6 (7 pts), ternaries 1 (2 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.
library.library_info (cognitive 39) calibre/agent-harness/cli_anything/calibre/core/library.py:12— library.library_info has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 2 (5 pts), boolean chains 2, error handling 1 (2 pts), ternaries 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.
odf_utils._add_paragraph_element (cognitive 39) REDACTED:132— odf_utils._add_paragraph_element has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 2, loops 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.
differ.diff_models (cognitive 39) live2d/agent-harness/cli_anything/live2d/core/differ.py:42— differ.diff_models has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 12 (15 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.
pipeline.dump_shader_reflection (cognitive 39) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:746— pipeline.dump_shader_reflection has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (30 pts), error handling 2 (4 pts), loops 2, ternaries 2, 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.
timeline.remove_track (cognitive 39) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:320— timeline.remove_track has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 5, loops 3 (5 pts), ternaries 1 (4 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.
transitions._remove_transition_and_restore (cognitive 39) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:485— transitions._remove_transition_and_restore has cognitive complexity 39 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 4 (11 pts), boolean chains 5 (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.
visual_anchor._get_window_bounds (cognitive 38) macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py:222— visual_anchor._get_window_bounds has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (21 pts), error handling 2 (9 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
macrocli_cli.macro_info (cognitive 38) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:267— macrocli_cli.macro_info has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 5 (15 pts), ternaries 1 (4 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.
siyuan_cli._handle_doc_repl (cognitive 38) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:270— siyuan_cli._handle_doc_repl has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 8, 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.
export._render_clip (cognitive 37) audacity/agent-harness/cli_anything/audacity/core/export.py:272— export._render_clip has cognitive complexity 37 (threshold 15). Drivers by points: loops 4 (13 pts), ternaries 2 (10 pts), if/else 5 (8 pts), boolean chains 4, error handling 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.
cli.matrix_info (cognitive 37) cli-hub/cli_hub/cli.py:566— cli.matrix_info has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (23 pts), loops 5 (9 pts), ternaries 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.
extract_tools._find_brace_end (cognitive 37) safari/agent-harness/scripts/extract_tools.py:206— extract_tools._find_brace_end has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 4 (10 pts), boolean chains 6, ternaries 1 (4 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.
preview._normalize_trajectory (cognitive 36) cli-hub/cli_hub/preview.py:330— preview._normalize_trajectory has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 13, if/else 9 (11 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 5). 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.
transitions.add_transition (cognitive 36) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:170— transitions.add_transition has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (26 pts), loops 5 (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.
freecad_macro_gen._gen_placements (cognitive 35) freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:441— freecad_macro_gen._gen_placements has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 6 (18 pts), if/else 8 (14 pts), boolean chains 2, loops 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.
live2d_cli.param_list (cognitive 35) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1797— live2d_cli.param_list has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 8 (14 pts), error handling 2 (5 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.
imports._perform_attachment_upload (cognitive 35) REDACTED:368— imports._perform_attachment_upload has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (25 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 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.
unimol_tools_cli.models_compare (cognitive 34) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:579— unimol_tools_cli.models_compare has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 2 (10 pts), loops 1 (3 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.
zotero_cli._handle_repl_builtin (cognitive 34) zotero/agent-harness/cli_anything/zotero/zotero_cli.py:872— zotero_cli._handle_repl_builtin has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (21 pts), error handling 3 (7 pts), boolean chains 6 (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.
freecad_cli.output (cognitive 33) freecad/agent-harness/cli_anything/freecad/freecad_cli.py:59— freecad_cli.output has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (11 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.
parsing.parse_unified_help (cognitive 33) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/parsing.py:22— parsing.parse_unified_help has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 5, 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.
filters._validate_filter_params (cognitive 33) obs-studio/agent-harness/cli_anything/obs_studio/core/filters.py:139— filters._validate_filter_params has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (28 pts), boolean chains 4, 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.
codegen.generate_component (cognitive 33) sbox/agent-harness/cli_anything/sbox/core/codegen.py:11— codegen.generate_component has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 6 (11 pts), boolean chains 6, ternaries 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
storage.analyze_project_storage (cognitive 33) unimol_tools/agent-harness/cli_anything/unimol_tools/core/storage.py:49— storage.analyze_project_storage has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6, ternaries 6, error handling 1 (4 pts), loops 1 (2 pts) (nesting depth added 9). 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.
export.verify_file (cognitive 32) anygen/agent-harness/cli_anything/anygen/core/export.py:7— export.verify_file has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 9 (10 pts), error handling 4 (9 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.
macrocli_cli.macro_run (cognitive 32) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:182— macrocli_cli.macro_run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 1 (4 pts), error handling 1 (2 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.
pm2_cli._output (cognitive 32) pm2/agent-harness/cli_anything/pm2/pm2_cli.py:16— pm2_cli._output has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3 (9 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
timeline.remove_clip (cognitive 32) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:539— timeline.remove_clip has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
layout.layoutHorizontalStack (cognitive 32) sketch/agent-harness/src/layout.js:133— layout.layoutHorizontalStack has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 10, loops 3 (6 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.
objects.add_object (cognitive 31) blender/agent-harness/cli_anything/blender/core/objects.py:41— objects.add_object has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 5, loops 2 (4 pts), ternaries 4 (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.
matrix_skill._render_capability_tooling (cognitive 31) cli-hub/cli_hub/matrix_skill.py:293— matrix_skill._render_capability_tooling has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 4 (7 pts), ternaries 2 (7 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.
snapshot.generate_html (cognitive 31) live2d/agent-harness/cli_anything/live2d/core/snapshot.py:22— snapshot.generate_html has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 5 (7 pts), loops 5 (7 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.
lldb_cli.repl (cognitive 31) lldb/agent-harness/cli_anything/lldb/lldb_cli.py:640— lldb_cli.repl has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (21 pts), error handling 4 (8 pts), boolean chains 1, 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.
instruments.remove_instrument (cognitive 31) musescore/agent-harness/cli_anything/musescore/core/instruments.py:111— instruments.remove_instrument has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (18 pts), ternaries 2 (7 pts), loops 2 (6 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.
workflow_demo.main (cognitive 31) shotcut/agent-harness/workflow_demo.py:34— workflow_demo.main has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (20 pts), error handling 2 (5 pts), loops 3 (4 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.
slay_the_spire_ii_cli.repl (cognitive 31) slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/slay_the_spire_ii_cli.py:293— slay_the_spire_ii_cli.repl has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 6 (12 pts), ternaries 1 (3 pts), boolean chains 1, loops 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.
native_bonjour_listener.swift.parseArguments (cognitive 31) nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:30— native_bonjour_listener.swift.parseArguments has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (23 pts), ternaries 1 (4 pts), match/switch 1 (2 pts), boolean chains 1, 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.
audio_utils.mix_audio (cognitive 30) audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:46— audio_utils.mix_audio has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 5 (16 pts), if/else 8 (11 pts), loops 2 (3 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.
query.search (cognitive 30) chromadb/agent-harness/cli_anything/chromadb/core/query.py:27— query.search has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 4 (12 pts), boolean chains 2, loops 1 (2 pts), error handling 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.
installer.install_matrix (cognitive 30) cli-hub/cli_hub/installer.py:463— installer.install_matrix has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 3 (6 pts), boolean chains 1, 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.
firefly_iii_cli.repl (cognitive 30) firefly-iii/agent-harness/cli_anything/firefly_iii/firefly_iii_cli.py:153— firefly_iii_cli.repl has cognitive complexity 30 (threshold 15). Drivers by points: error handling 6 (15 pts), if/else 7 (14 pts), loops 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.
freecad_macro_gen._gen_bodies (cognitive 30) freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:244— freecad_macro_gen._gen_bodies has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (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.
replay.analyze_capture (cognitive 30) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/replay.py:376— replay.analyze_capture has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 9, boolean chains 6, loops 1 (2 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.
discovery.discover_binaries (cognitive 30) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/discovery.py:214— discovery.discover_binaries has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (9 pts), boolean chains 5, ternaries 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
export.render (cognitive 30) openscreen/agent-harness/cli_anything/openscreen/core/export.py:52— export.render has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (23 pts), error handling 2 (3 pts), loops 3, boolean chains 1 (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.
timeline._remove_adjacent_transitions (cognitive 30) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:35— timeline._remove_adjacent_transitions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 2, loops 2 (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.
skill_generator._click_decorator_info (cognitive 30) REDACTED:34— skill_generator._click_decorator_info has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 2 (5 pts), boolean chains 4, ternaries 1 (2 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.
video_doctor.lint_doctor (cognitive 30) cli-hub-matrix/video-creation/scripts/video_doctor.py:1727— video_doctor.lint_doctor has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 9, loops 2 (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.
analysis._prompt_context (cognitive 30) zotero/agent-harness/cli_anything/zotero/core/analysis.py:39— analysis._prompt_context has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (9 pts), loops 5 (9 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.
BridgeMod.FormatEventMarkdown (cognitive 29) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:248— BridgeMod.FormatEventMarkdown has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
effects.validate_params (cognitive 29) audacity/agent-harness/cli_anything/audacity/core/effects.py:183— effects.validate_params has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 4, 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.
modifiers.validate_params (cognitive 29) blender/agent-harness/cli_anything/blender/core/modifiers.py:150— modifiers.validate_params has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 4, 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.
filters.validate_params (cognitive 29) gimp/agent-harness/cli_anything/gimp/core/filters.py:246— filters.validate_params has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 4, 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.
SemanticUIBackend._wait_for_window (cognitive 29) macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:441— SemanticUIBackend._wait_for_window has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 3 (6 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
diff._diff_from_snapshots (cognitive 29) renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:331— diff._diff_from_snapshots has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (23 pts), loops 3 (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.
skill_generator.extract_commands_from_cli (cognitive 29) REDACTED:108— skill_generator.extract_commands_from_cli has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 8, loops 4 (6 pts), ternaries 2 (5 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.
gimp_backend._filter_to_script_fu (cognitive 28) gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:269— gimp_backend._filter_to_script_fu has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25 (26 pts), boolean chains 2 (nesting depth added 1). 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.
transitions.add_transition (cognitive 28) kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:54— transitions.add_transition has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (22 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.
SemanticUIBackend._get_controls (cognitive 28) macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:532— SemanticUIBackend._get_controls has cognitive complexity 28 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (7 pts), error handling 2 (6 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
preview.capture (cognitive 28) openscreen/agent-harness/cli_anything/openscreen/core/preview.py:99— preview.capture has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 11, ternaries 8 (11 pts), if/else 3, error handling 1 (2 pts), loops 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.
timeline._update_tractor_out (cognitive 28) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:232— timeline._update_tractor_out has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (5 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
siyuan_cli._handle_block_repl (cognitive 28) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:338— siyuan_cli._handle_block_repl has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 6 (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.
REDACTED.matrixFlipCard (cognitive 28) REDACTED:2296— REDACTED.matrixFlipCard has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 17, ternaries 5 (6 pts), if/else 5 (nesting depth added 1). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 2330, 2325, 2353, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
layout.layoutVerticalStack (cognitive 28) sketch/agent-harness/src/layout.js:78— layout.layoutVerticalStack has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 11, loops 2 (4 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.
threemf_backend.cross_section_circles (cognitive 27) 3MF/agent-harness/cli_anything/threemf/utils/threemf_backend.py:243— threemf_backend.cross_section_circles has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 3 (7 pts), loops 2 (3 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.
objects.set_object_property (cognitive 27) blender/agent-harness/cli_anything/blender/core/objects.py:220— objects.set_object_property has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (24 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.
browser_cli.repl (cognitive 27) browser/agent-harness/cli_anything/browser/browser_cli.py:377— browser_cli.repl has cognitive complexity 27 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 5 (10 pts), ternaries 2 (5 pts), boolean chains 1, loops 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.
ccswitch_cli._write_live_config (cognitive 27) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:350— ccswitch_cli._write_live_config has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (27 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.
materials.create_material (cognitive 27) freecad/agent-harness/cli_anything/freecad/core/materials.py:240— materials.create_material has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 5, 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.
godot_cli._out (cognitive 27) godot/agent-harness/cli_anything/godot/godot_cli.py:28— godot_cli._out has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (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.
runtime._check_condition (cognitive 27) macrocli/agent-harness/cli_anything/macrocli/core/runtime.py:62— runtime._check_condition has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), error handling 1 (2 pts), loops 1 (2 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.
mermaid_cli.repl (cognitive 27) mermaid/agent-harness/cli_anything/mermaid/mermaid_cli.py:191— mermaid_cli.repl has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 5 (14 pts), if/else 5 (9 pts), error handling 1 (2 pts), boolean chains 1, loops 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.
timeline._absolute_insertion_point (cognitive 27) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:162— timeline._absolute_insertion_point has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (22 pts), ternaries 1 (4 pts), loops 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.
transitions._return_frames_to_other_clip (cognitive 27) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:535— transitions._return_frames_to_other_clip has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (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.
mubu_cli.handle_repl_builtin (cognitive 27) mubu/agent-harness/cli_anything/mubu/mubu_cli.py:305— mubu_cli.handle_repl_builtin has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (17 pts), ternaries 3 (6 pts), error handling 2 (4 pts) (nesting depth added 7). 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.
render.set_render_settings (cognitive 26) blender/agent-harness/cli_anything/blender/core/render.py:64— render.set_render_settings has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (24 pts), loops 1 (2 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.
domshell_backend._call_execute (cognitive 26) browser/agent-harness/cli_anything/browser/utils/domshell_backend.py:497— domshell_backend._call_execute has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5, error handling 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.
GUIMacroBackend._execute_steps (cognitive 26) macrocli/agent-harness/cli_anything/macrocli/backends/gui_macro.py:153— GUIMacroBackend._execute_steps has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 2 (4 pts), error handling 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.
n8n_cli.repl (cognitive 26) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:340— n8n_cli.repl has cognitive complexity 26 (threshold 15). Drivers by points: error handling 6 (11 pts), if/else 5 (10 pts), loops 3 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ollama_cli.generate_chat (cognitive 26) ollama/agent-harness/cli_anything/ollama/ollama_cli.py:280— ollama_cli.generate_chat has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 5, loops 2 (4 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.
pm2_cli._run_repl (cognitive 26) pm2/agent-harness/cli_anything/pm2/pm2_cli.py:245— pm2_cli._run_repl has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 2 (6 pts), ternaries 1 (4 pts), loops 2 (3 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.
prefab.modify_component (cognitive 26) sbox/agent-harness/cli_anything/sbox/core/prefab.py:262— prefab.modify_component has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
shotcut_cli._print_timeline_visual (cognitive 26) shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:344— shotcut_cli._print_timeline_visual has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mubu_probe.rich_text_to_html (cognitive 26) REDACTED:891— mubu_probe.rich_text_to_html has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (23 pts), ternaries 1 (2 pts), loops 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.
export.render_mix (cognitive 25) audacity/agent-harness/cli_anything/audacity/core/export.py:122— export.render_mix has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lighting.set_light (cognitive 25) blender/agent-harness/cli_anything/blender/core/lighting.py:319— lighting.set_light has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 1 (2 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.
eez_studio_cli.repl (cognitive 25) eez-studio/agent-harness/cli_anything/eez_studio/eez_studio_cli.py:155— eez_studio_cli.repl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 4 (8 pts), boolean chains 2, 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.
gimp_cli.repl (cognitive 25) gimp/agent-harness/cli_anything/gimp/gimp_cli.py:738— gimp_cli.repl has cognitive complexity 25 (threshold 15). Drivers by points: error handling 6 (12 pts), if/else 5 (9 pts), ternaries 1 (3 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.
document.project_to_svg (cognitive 25) REDACTED:218— document.project_to_svg has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 5 (6 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
text.set_text_property (cognitive 25) inkscape/agent-harness/cli_anything/inkscape/core/text.py:109— text.set_text_property has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 6 (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.
live2d_cli.atlas (cognitive 25) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1236— live2d_cli.atlas has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (7 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generate._generate_command_func (cognitive 25) mailchimp/agent-harness/cli_anything/mailchimp/_codegen/generate.py:138— generate._generate_command_func has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), loops 6 (7 pts), ternaries 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, 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.
replay._build_analysis (cognitive 25) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/replay.py:300— replay._build_analysis has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (25 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.
nsight_graphics_cli.repl (cognitive 25) nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:455— nsight_graphics_cli.repl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 4 (8 pts), ternaries 1 (2 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.
diff._diff_bindings (cognitive 25) renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:188— diff._diff_bindings has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 2, ternaries 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.
pipeline.export_shader_reflection (cognitive 25) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:885— pipeline.export_shader_reflection has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 3 (5 pts), loops 2 (3 pts), error handling 1 (2 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.
safari_cli.repl (cognitive 25) safari/agent-harness/cli_anything/safari/safari_cli.py:553— safari_cli.repl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 5 (10 pts), ternaries 1 (3 pts), loops 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.
extract_tools._split_top_level (cognitive 25) safari/agent-harness/scripts/extract_tools.py:263— extract_tools._split_top_level has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
models_manager.compare_models (cognitive 25) unimol_tools/agent-harness/cli_anything/unimol_tools/core/models_manager.py:144— models_manager.compare_models has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 5 (6 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.
unrealinsights_cli.repl (cognitive 25) unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py:1020— unrealinsights_cli.repl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 4 (8 pts), ternaries 1 (2 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.
native_bonjour_publisher.swift.parseArguments (cognitive 25) nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_publisher.swift:33— native_bonjour_publisher.swift.parseArguments has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (17 pts), ternaries 1 (4 pts), match/switch 1 (2 pts), boolean chains 1, 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.
REDACTED.renderNpmCard (cognitive 25) REDACTED:2579— REDACTED.renderNpmCard has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 13, boolean chains 8, if/else 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
blender_cli.repl (cognitive 24) blender/agent-harness/cli_anything/blender/blender_cli.py:1074— blender_cli.repl has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 5 (10 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.
firefly_iii_cli.output (cognitive 24) firefly-iii/agent-harness/cli_anything/firefly_iii/firefly_iii_cli.py:32— firefly_iii_cli.output has cognitive complexity 24 (threshold 15). Drivers by points: loops 4 (13 pts), if/else 6 (9 pts), error handling 1 (2 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.
freecad_backend.find_freecad (cognitive 24) freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:54— freecad_backend.find_freecad has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (7 pts), boolean chains 1, ternaries 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.
godot_cli.session (cognitive 24) godot/agent-harness/cli_anything/godot/godot_cli.py:313— godot_cli.session has cognitive complexity 24 (threshold 15). Drivers by points: error handling 6 (11 pts), if/else 7 (11 pts), loops 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.
krita_cli.repl (cognitive 24) krita/agent-harness/cli_anything/krita/krita_cli.py:541— krita_cli.repl has cognitive complexity 24 (threshold 15). Drivers by points: error handling 7 (12 pts), if/else 5 (9 pts), ternaries 1 (2 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.
comparer.compare_models (cognitive 24) live2d/agent-harness/cli_anything/live2d/core/comparer.py:54— comparer.compare_models has cognitive complexity 24 (threshold 15). Drivers by points: loops 13 (15 pts), if/else 6 (9 pts) (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.
live2d_cli.manifest (cognitive 24) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1563— live2d_cli.manifest has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 6 (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.
sbox_cli.repl (cognitive 24) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2338— sbox_cli.repl has cognitive complexity 24 (threshold 15). Drivers by points: error handling 7 (13 pts), if/else 5 (10 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.
unimol_tools_cli.cleanup_models (cognitive 24) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:655— unimol_tools_cli.cleanup_models has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 7). 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.
zoom_cli.repl (cognitive 24) zoom/agent-harness/cli_anything/zoom/zoom_cli.py:438— zoom_cli.repl has cognitive complexity 24 (threshold 15). Drivers by points: error handling 7 (13 pts), if/else 5 (8 pts), ternaries 1 (2 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.
skill_generator.extract_commands_from_cli (cognitive 24) REDACTED:248— skill_generator.extract_commands_from_cli has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 4, loops 3 (4 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.
freecad_live_preview_demo.collect_demo (cognitive 24) docs/scripts/freecad_live_preview_demo.py:3411— freecad_live_preview_demo.collect_demo has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, error handling 2 (3 pts), ternaries 1 (3 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.
REDACTED.iconFor (cognitive 24) REDACTED:1674— REDACTED.iconFor has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (7 pts), ternaries 5 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
builder.buildLayer (cognitive 24) sketch/agent-harness/src/builder.js:190— builder.buildLayer has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 19, if/else 2 (4 pts), match/switch 1 (nesting depth added 2). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BridgeMod.ExecuteStartNewGame (cognitive 23) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:147— BridgeMod.ExecuteStartNewGame has cognitive complexity 23 (threshold 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.
audacity_cli.repl (cognitive 23) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:773— audacity_cli.repl has cognitive complexity 23 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 5 (9 pts), ternaries 1 (3 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.
cli.list_clis (cognitive 23) cli-hub/cli_hub/cli.py:181— cli.list_clis has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 2 (5 pts), loops 3 (4 pts), boolean chains 1, error handling 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.
commands.validator_plan (cognitive 23) eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/core/commands.py:27— commands.validator_plan has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 19, if/else 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
measure.check_geometry (cognitive 23) freecad/agent-harness/cli_anything/freecad/core/measure.py:647— measure.check_geometry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2, loops 1 (2 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.
export._apply_single_filter (cognitive 23) gimp/agent-harness/cli_anything/gimp/core/export.py:325— export._apply_single_filter has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (23 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.
scene.read_scene (cognitive 23) godot/agent-harness/cli_anything/godot/core/scene.py:51— scene.read_scene has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, ternaries 1 (3 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.
kdenlive_cli.repl (cognitive 23) kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:685— kdenlive_cli.repl has cognitive complexity 23 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 5 (9 pts), ternaries 1 (3 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.
odf_utils.validate_odf (cognitive 23) REDACTED:626— odf_utils.validate_odf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 4 (7 pts), loops 1, 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.
RecordedStep.to_step_dict (cognitive 23) macrocli/agent-harness/cli_anything/macrocli/core/recorder.py:72— RecordedStep.to_step_dict has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (22 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.
mscx_xml.get_instruments (cognitive 23) musescore/agent-harness/cli_anything/musescore/utils/mscx_xml.py:211— mscx_xml.get_instruments has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, loops 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.
NSLoggerListener._listen_native_bonjour (cognitive 23) REDACTED:575— NSLoggerListener._listen_native_bonjour has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 1, error handling 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.
rekordbox_cli.cli (cognitive 23) rekordbox/agent-harness/cli_anything/rekordbox/rekordbox_cli.py:158— rekordbox_cli.cli has cognitive complexity 23 (threshold 15). Drivers by points: error handling 4 (11 pts), if/else 4 (10 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extract_tools._find_matching_paren (cognitive 23) safari/agent-harness/scripts/extract_tools.py:176— extract_tools._find_matching_paren has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts), ternaries 1 (4 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.
codegen.generate_class (cognitive 23) sbox/agent-harness/cli_anything/sbox/core/codegen.py:521— codegen.generate_class has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 3 (5 pts), ternaries 3 (5 pts), boolean chains 1 (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.
scene.query_objects (cognitive 23) sbox/agent-harness/cli_anything/sbox/core/scene.py:968— scene.query_objects has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 6, ternaries 2, 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.
timeline.split_clip (cognitive 23) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:732— timeline.split_clip has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (21 pts), boolean chains 1, 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.
video_doctor.scan_audio_artifacts (cognitive 23) cli-hub-matrix/video-creation/scripts/video_doctor.py:1893— video_doctor.scan_audio_artifacts has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (7 pts), error handling 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.
freecad_live_preview_demo.build_terminal_lines (cognitive 23) docs/scripts/freecad_live_preview_demo.py:4301— freecad_live_preview_demo.build_terminal_lines has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (7 pts), ternaries 1 (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.
intrinsicSize (cognitive 23) sketch/agent-harness/src/layout.js:40— intrinsicSize has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 9, ternaries 1 (2 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.
BridgeMod.ExecuteUsePotion (cognitive 22) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:365— BridgeMod.ExecuteUsePotion has cognitive complexity 22 (threshold 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.
BridgeMod.FormatShopMarkdown (cognitive 22) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:316— BridgeMod.FormatShopMarkdown has cognitive complexity 22 (threshold 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.
lighting.add_light (cognitive 22) blender/agent-harness/cli_anything/blender/core/lighting.py:245— lighting.add_light has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, ternaries 4, loops 1 (2 pts) (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.
materials.set_material_property (cognitive 22) blender/agent-harness/cli_anything/blender/core/materials.py:147— materials.set_material_property has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, loops 1 (2 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.
matrix.resolve_install_scope (cognitive 22) cli-hub/cli_hub/matrix.py:352— matrix.resolve_install_scope has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 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.
layers._read_tiff_dimensions (cognitive 22) gimp/agent-harness/cli_anything/gimp/core/layers.py:355— layers._read_tiff_dimensions has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 3 (6 pts), boolean chains 1, error handling 1, 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.
LLDBDebugAdapter._emit_execution_event (cognitive 22) lldb/agent-harness/cli_anything/lldb/dap.py:728— LLDBDebugAdapter._emit_execution_event has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, boolean chains 8, ternaries 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.
minimax_backend.chat_completion_stream (cognitive 22) minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:305— minimax_backend.chat_completion_stream has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 2 (4 pts), 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.
minimax_backend.tts_synthesize (cognitive 22) minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:360— minimax_backend.tts_synthesize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 2 (4 pts), loops 2 (3 pts), boolean chains 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.
novita_backend.chat_completion_stream (cognitive 22) novita/agent-harness/cli_anything/novita/utils/novita_backend.py:124— novita_backend.chat_completion_stream has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 2 (4 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.
stats.compute_stats (cognitive 22) nslogger/agent-harness/cli_anything/nslogger/core/stats.py:8— stats.compute_stats has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, ternaries 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.
preview.capture (cognitive 22) shotcut/agent-harness/cli_anything/shotcut/core/preview.py:112— preview.capture has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 6, if/else 4, error handling 1 (2 pts), loops 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.
validate_root_skills.main (cognitive 22) .github/scripts/validate_root_skills.py:37— validate_root_skills.main has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 4 (8 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.
video_doctor.parse_ass (cognitive 22) cli-hub-matrix/video-creation/scripts/video_doctor.py:426— video_doctor.parse_ass has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 1 (3 pts), boolean chains 2, 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.
catalog.find_items (cognitive 22) REDACTED:97— catalog.find_items has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 5 (9 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
zotero_cli.run_repl (cognitive 22) zotero/agent-harness/cli_anything/zotero/zotero_cli.py:1022— zotero_cli.run_repl has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 4 (7 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.
REDACTED.initDeckGestures (cognitive 22) REDACTED:1988— REDACTED.initDeckGestures has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, boolean chains 9. Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 2021, endDrag, a function literal at line 1994, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
BridgeMod.BuildCardSelectState (cognitive 21) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1054— BridgeMod.BuildCardSelectState has cognitive complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
comfyui_cli.repl (cognitive 21) comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:366— comfyui_cli.repl has cognitive complexity 21 (threshold 15). Drivers by points: error handling 6 (11 pts), if/else 3 (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.
freecad_cli.repl (cognitive 21) freecad/agent-harness/cli_anything/freecad/freecad_cli.py:4826— freecad_cli.repl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 3 (6 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.
export._render_via_pillow (cognitive 21) gimp/agent-harness/cli_anything/gimp/core/export.py:87— export._render_via_pillow has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 1, error handling 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.
dependency.build_dependency_graph (cognitive 21) live2d/agent-harness/cli_anything/live2d/core/dependency.py:50— dependency.build_dependency_graph has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 2 (7 pts), error handling 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
live2d_cli.stats (cognitive 21) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1652— live2d_cli.stats has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 5 (10 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.
MacroRecorder.interactive_agent_review (cognitive 21) macrocli/agent-harness/cli_anything/macrocli/core/recorder.py:622— MacroRecorder.interactive_agent_review has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 3 (6 pts), ternaries 1 (3 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.
output.set_output_settings (cognitive 21) obs-studio/agent-harness/cli_anything/obs_studio/core/output.py:67— output.set_output_settings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (21 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.
project.set_setting (cognitive 21) openscreen/agent-harness/cli_anything/openscreen/core/project.py:139— project.set_setting has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 3 (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.
pipeline._extract_debug_source (cognitive 21) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:541— pipeline._extract_debug_source has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 1, 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.
extract_tools._parse_field (cognitive 21) safari/agent-harness/scripts/extract_tools.py:323— extract_tools._parse_field has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (3 pts), boolean chains 2, 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.
export._rewrite_refs_in_project (cognitive 21) sbox/agent-harness/cli_anything/sbox/core/export.py:350— export._rewrite_refs_in_project has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), error handling 1 (3 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.
prefab._build_root_object (cognitive 21) sbox/agent-harness/cli_anything/sbox/core/prefab.py:29— prefab._build_root_object has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session._resolve_refs (cognitive 21) shotcut/agent-harness/cli_anything/shotcut/core/session.py:136— Session._resolve_refs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (4 pts), ternaries 1 (3 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.
transitions.list_transitions (cognitive 21) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:402— transitions.list_transitions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (13 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.
video_doctor.parse_ass_metadata (cognitive 21) cli-hub-matrix/video-creation/scripts/video_doctor.py:466— video_doctor.parse_ass_metadata has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 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.
blender_orbital_relay_drone_demo._assign_materials (cognitive 21) docs/scripts/blender_orbital_relay_drone_demo.py:446— blender_orbital_relay_drone_demo._assign_materials has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 7 (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.
mubu_probe.recent_documents (cognitive 21) REDACTED:647— mubu_probe.recent_documents has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 4 (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.
BridgeMod.HandleRequest (cognitive 20) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:110— BridgeMod.HandleRequest has cognitive complexity 20 (threshold 15). 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.
BridgeMod.CollectKeywordsFromState (cognitive 20) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:842— BridgeMod.CollectKeywordsFromState has cognitive complexity 20 (threshold 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.
lighting.set_camera (cognitive 20) blender/agent-harness/cli_anything/blender/core/lighting.py:131— lighting.set_camera has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (19 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.
browser_cli.cli (cognitive 20) browser/agent-harness/cli_anything/browser/browser_cli.py:109— browser_cli.cli has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
documents.get_documents (cognitive 20) chromadb/agent-harness/cli_anything/chromadb/core/documents.py:62— documents.get_documents has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (7 pts), boolean chains 3, loops 1 (2 pts), error handling 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.
matrix.preflight_matrix (cognitive 20) cli-hub/cli_hub/matrix.py:224— matrix.preflight_matrix has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, loops 1, ternaries 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.
layers._read_jpeg_dimensions (cognitive 20) gimp/agent-harness/cli_anything/gimp/core/layers.py:296— layers._read_jpeg_dimensions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 1, error handling 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.
validator.validate_model (cognitive 20) live2d/agent-harness/cli_anything/live2d/core/validator.py:35— validator.validate_model has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 4 (5 pts), boolean chains 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.
GUIAgentBackend._instruct (cognitive 20) macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:239— GUIAgentBackend._instruct has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), error handling 4 (5 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
llm_assist.generate_macro (cognitive 20) macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py:294— llm_assist.generate_macro has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, error handling 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.
musescore_cli.repl (cognitive 20) musescore/agent-harness/cli_anything/musescore/musescore_cli.py:554— musescore_cli.repl has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 4 (8 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.
n8n_cli.workflow_test (cognitive 20) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1783— n8n_cli.workflow_test has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 2 (4 pts), ternaries 3, boolean chains 1, loops 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.
gpu_trace._build_trace_analysis (cognitive 20) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/gpu_trace.py:368— gpu_trace._build_trace_analysis has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 1). 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.
openrefine_cli._repl_to_args (cognitive 20) openrefine/agent-harness/cli_anything/openrefine/openrefine_cli.py:193— openrefine_cli._repl_to_args has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
scene._diff_two_objects (cognitive 20) sbox/agent-harness/cli_anything/sbox/core/scene.py:1171— scene._diff_two_objects has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cleanup.batch_cleanup (cognitive 20) unimol_tools/agent-harness/cli_anything/unimol_tools/core/cleanup.py:213— cleanup.batch_cleanup has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2, loops 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.
unimol_tools_cli.models_rank (cognitive 20) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:406— unimol_tools_cli.models_rank has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 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.
joplin_backend._strip_benign_node_warnings (cognitive 20) joplin/agent-harness/cli_anything/joplin/utils/joplin_backend.py:60— joplin_backend._strip_benign_node_warnings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 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.
imports._resolve_target (cognitive 20) REDACTED:82— imports._resolve_target has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (6 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.
inspector.inspect_mesh (cognitive 19) 3MF/agent-harness/cli_anything/threemf/core/inspector.py:54— inspector.inspect_mesh has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2, ternaries 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.
parser._rebuild_model_xml (cognitive 19) REDACTED:298— parser._rebuild_model_xml has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 1 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clips.add_clip (cognitive 19) audacity/agent-harness/cli_anything/audacity/core/clips.py:60— clips.add_clip has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7, ternaries 4 (7 pts), boolean chains 2, error handling 1 (2 pts), loops 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.
export._parse_epub_chapters (cognitive 19) REDACTED:174— export._parse_epub_chapters has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, error handling 1 (2 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.
matrix.unmanaged_providers (cognitive 19) cli-hub/cli_hub/matrix.py:411— matrix.unmanaged_providers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts), boolean chains 1, ternaries 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.
preview._render_trajectory_text_lines (cognitive 19) cli-hub/cli_hub/preview.py:480— preview._render_trajectory_text_lines has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 1 (2 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.
project.validate_project (cognitive 19) eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:309— project.validate_project has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, 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.
sketch.edit_element (cognitive 19) freecad/agent-harness/cli_anything/freecad/core/sketch.py:980— sketch.edit_element has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (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.
styles.set_style (cognitive 19) inkscape/agent-harness/cli_anything/inkscape/core/styles.py:66— styles.set_style has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 1 (2 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.
live2d_cli.deps (cognitive 19) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:435— live2d_cli.deps has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (9 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dap.read_message (cognitive 19) lldb/agent-harness/cli_anything/lldb/dap.py:30— dap.read_message has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (4 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parameterize.llm_suggest_parameters (cognitive 19) macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py:207— parameterize.llm_suggest_parameters has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, error handling 3 (4 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.
expressions.validate_expression (cognitive 19) n8n/agent-harness/cli_anything/n8n/core/expressions.py:23— expressions.validate_expression has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
repl_skin._print_table (cognitive 19) n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:652— repl_skin._print_table has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4 (6 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.
gpu_trace.capture_trace (cognitive 19) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/gpu_trace.py:583— gpu_trace.capture_trace has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 4 (nesting depth added 1). 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.
obsidian_cli.repl (cognitive 19) obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:404— obsidian_cli.repl has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (6 pts), ternaries 1 (2 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.
ollama_cli.repl (cognitive 19) ollama/agent-harness/cli_anything/ollama/ollama_cli.py:436— ollama_cli.repl has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (6 pts), ternaries 1 (2 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.
pm2_backend.run_pm2 (cognitive 19) pm2/agent-harness/cli_anything/pm2/utils/pm2_backend.py:65— pm2_backend.run_pm2 has cognitive complexity 19 (threshold 15). Drivers by points: error handling 4 (9 pts), if/else 2 (5 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rekordbox_cli.install_mapping (cognitive 19) rekordbox/agent-harness/cli_anything/rekordbox/rekordbox_cli.py:503— rekordbox_cli.install_mapping has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 pts), error handling 1 (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.
rms_cli.config_get (cognitive 19) rms/agent-harness/cli_anything/rms/rms_cli.py:1098— rms_cli.config_get has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (7 pts), boolean chains 2, loops 1 (2 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.
seaclip_cli._run_repl (cognitive 19) seaclip/agent-harness/cli_anything/seaclip/seaclip_cli.py:111— seaclip_cli._run_repl has cognitive complexity 19 (threshold 15). Drivers by points: error handling 6 (12 pts), if/else 3 (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.
siyuan_cli.repl (cognitive 19) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:149— siyuan_cli.repl has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 3 (5 pts), boolean chains 3, 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.
unimol_tools_cli.models_history (cognitive 19) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:480— unimol_tools_cli.models_history has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), ternaries 1 (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.
update_registry_dates._extract_pypi_package (cognitive 19) .github/scripts/update_registry_dates.py:138— update_registry_dates._extract_pypi_package has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, ternaries 1 (2 pts), error handling 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.
freecad_live_preview_demo.generate_curiosity_true_motion_showcase (cognitive 19) docs/scripts/freecad_live_preview_demo.py:3927— freecad_live_preview_demo.generate_curiosity_true_motion_showcase has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 3 (6 pts), boolean chains 3, ternaries 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
catalog.list_styles (cognitive 19) REDACTED:233— catalog.list_styles has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 3 (7 pts), loops 2 (3 pts), error handling 1 (2 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.
skill_generator.extract_commands_from_cli (cognitive 19) REDACTED:113— skill_generator.extract_commands_from_cli has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 6, loops 4 (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.
REDACTED.renderHarnessCard (cognitive 19) REDACTED:2500— REDACTED.renderHarnessCard has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 12 (13 pts), boolean chains 5, if/else 1 (nesting depth added 1). 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.
BridgeMod.FormatCardSelectMarkdown (cognitive 18) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:576— BridgeMod.FormatCardSelectMarkdown has cognitive complexity 18 (threshold 15). 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.
BridgeMod.StripRichTextTags (cognitive 18) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Helpers.cs:35— BridgeMod.StripRichTextTags has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BridgeMod.BuildPlayerState (cognitive 18) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:377— BridgeMod.BuildPlayerState has cognitive complexity 18 (threshold 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.
BridgeMod.BuildEnemyState (cognitive 18) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:547— BridgeMod.BuildEnemyState has cognitive complexity 18 (threshold 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.
anygen_backend.create_task (cognitive 18) anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:195— anygen_backend.create_task has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 1 (2 pts) (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.
metadata._parse_opf_to_dict (cognitive 18) REDACTED:89— metadata._parse_opf_to_dict has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 3 (7 pts), loops 2, 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.
installer.plan_matrix_install (cognitive 18) cli-hub/cli_hub/installer.py:406— installer.plan_matrix_install has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (5 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.
preview._trajectory_candidate_refs (cognitive 18) cli-hub/cli_hub/preview.py:168— preview._trajectory_candidate_refs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
preview._load_trajectory (cognitive 18) cli-hub/cli_hub/preview.py:400— preview._load_trajectory has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cloudanalyzer_cli._start_repl (cognitive 18) cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:710— cloudanalyzer_cli._start_repl has cognitive complexity 18 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 5 (8 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sketch.add_constraint (cognitive 18) freecad/agent-harness/cli_anything/freecad/core/sketch.py:443— sketch.add_constraint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, 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.
inkscape_cli.repl (cognitive 18) inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:1022— inkscape_cli.repl has cognitive complexity 18 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 4 (7 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
libreoffice_cli.repl (cognitive 18) libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:717— libreoffice_cli.repl has cognitive complexity 18 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 4 (7 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
odf_utils._build_calc_content (cognitive 18) REDACTED:315— odf_utils._build_calc_content has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (6 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.
replay._summarize_functions (cognitive 18) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/replay.py:168— replay._summarize_functions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 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.
nsight_graphics_cli._print_gpu_trace_summary (cognitive 18) nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:52— nsight_graphics_cli._print_gpu_trace_summary has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (6 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.
discovery._read_registry_installations (cognitive 18) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/discovery.py:123— discovery._read_registry_installations has cognitive complexity 18 (threshold 15). Drivers by points: error handling 4 (9 pts), if/else 2 (4 pts), loops 2 (3 pts), boolean chains 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.
generate.encode_message (cognitive 18) nslogger/agent-harness/cli_anything/nslogger/utils/generate.py:30— generate.encode_message has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 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.
obs_studio_cli.repl (cognitive 18) obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:776— obs_studio_cli.repl has cognitive complexity 18 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 4 (7 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
diff._diff_stages (cognitive 18) renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:258— diff._diff_stages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 1, ternaries 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.
pipeline.export_shader (cognitive 18) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:436— pipeline.export_shader has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 3, 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.
preview.capture (cognitive 18) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:111— preview.capture has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 3, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
export._scan_project_refs (cognitive 18) sbox/agent-harness/cli_anything/sbox/core/export.py:211— export._scan_project_refs has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (5 pts), error handling 1 (3 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.
scene._walk_for_refs (cognitive 18) sbox/agent-harness/cli_anything/sbox/core/scene.py:1070— scene._walk_for_refs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
project.project_info (cognitive 18) shotcut/agent-harness/cli_anything/shotcut/core/project.py:144— project.project_info has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3, boolean chains 2, error handling 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.
timeline._resolve_insert_index (cognitive 18) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:110— timeline._resolve_insert_index has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 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.
timeline.add_clip (cognitive 18) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:438— timeline.add_clip has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (9 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
access_key.list_keys (cognitive 18) tigris/agent-harness/cli_anything/tigris/core/access_key.py:23— access_key.list_keys has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1 (3 pts), error handling 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.
iam.list_policies (cognitive 18) tigris/agent-harness/cli_anything/tigris/core/iam.py:33— iam.list_policies has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1 (3 pts), error handling 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. This shape REPEATS in the file: one other method here (iam.list_users) 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.
iam.list_users (cognitive 18) tigris/agent-harness/cli_anything/tigris/core/iam.py:99— iam.list_users has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1 (3 pts), error handling 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. This shape REPEATS in the file: one other method here (iam.list_policies) 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.
object.list_objects (cognitive 18) tigris/agent-harness/cli_anything/tigris/core/object.py:45— object.list_objects has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1 (3 pts), error handling 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.
tigris_cli._run_repl (cognitive 18) tigris/agent-harness/cli_anything/tigris/tigris_cli.py:104— tigris_cli._run_repl has cognitive complexity 18 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 4 (7 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wavetone_cli.repl (cognitive 18) wavetone/agent-harness/cli_anything/wavetone/wavetone_cli.py:89— wavetone_cli.repl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 4 (8 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.
generate_meta_skill.main (cognitive 18) .github/scripts/generate_meta_skill.py:7— generate_meta_skill.main has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 3, ternaries 1 (3 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.
video_doctor.sound_design_overlap_review (cognitive 18) cli-hub-matrix/video-creation/scripts/video_doctor.py:2093— video_doctor.sound_design_overlap_review has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 6, loops 2 (3 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.
mubu_cli.run_repl (cognitive 18) mubu/agent-harness/cli_anything/mubu/mubu_cli.py:390— mubu_cli.run_repl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
threemf_cli.repl (cognitive 17) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:366— threemf_cli.repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
adguardhome_cli.repl (cognitive 17) adguardhome/agent-harness/cli_anything/adguardhome/adguardhome_cli.py:107— adguardhome_cli.repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
export._apply_single_effect (cognitive 17) audacity/agent-harness/cli_anything/audacity/core/export.py:355— export._apply_single_effect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), ternaries 1 (4 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.
calibre_cli.books_export_chapters (cognitive 17) calibre/agent-harness/cli_anything/calibre/calibre_cli.py:391— calibre_cli.books_export_chapters has cognitive complexity 17 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 5 (6 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 6). 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.
ccswitch_cli._merge_codex_provider_toml (cognitive 17) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:141— ccswitch_cli._merge_codex_provider_toml has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), ternaries 3, error handling 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.
chromadb_cli._run_repl (cognitive 17) chromadb/agent-harness/cli_anything/chromadb/chromadb_cli.py:59— chromadb_cli._run_repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cli.can (cognitive 17) cli-hub/cli_hub/cli.py:431— cli.can has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (6 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.
exa_cli._print_results (cognitive 17) exa/agent-harness/cli_anything/exa/exa_cli.py:66— exa_cli._print_results has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), ternaries 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.
export.render_to_png (cognitive 17) inkscape/agent-harness/cli_anything/inkscape/core/export.py:53— export.render_to_png has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 5, loops 2 (3 pts), ternaries 2, error handling 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.
importer._parse_writer_content (cognitive 17) REDACTED:179— importer._parse_writer_content has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 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.
live2d_cli.orphan (cognitive 17) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1409— live2d_cli.orphan has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 5 (7 pts), boolean chains 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.
session_client.ensure_server (cognitive 17) lldb/agent-harness/cli_anything/lldb/utils/session_client.py:134— session_client.ensure_server has cognitive complexity 17 (threshold 15). Drivers by points: error handling 3 (8 pts), if/else 4 (8 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.
SemanticUIBackend._menu_click (cognitive 17) macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:351— SemanticUIBackend._menu_click has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (2 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.
semantic_ui._atspi_find_control (cognitive 17) macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:97— semantic_ui._atspi_find_control has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 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.
MacroParameter.validate_value (cognitive 17) macrocli/agent-harness/cli_anything/macrocli/core/macro_model.py:55— MacroParameter.validate_value has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, error handling 1 (3 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.
parameterize.parameterize_yaml_file (cognitive 17) macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py:129— parameterize.parameterize_yaml_file has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), error handling 2 (5 pts), boolean chains 4, 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.
MacroRegistry._load_from_manifest (cognitive 17) macrocli/agent-harness/cli_anything/macrocli/core/registry.py:66— MacroRegistry._load_from_manifest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, error handling 1 (2 pts), loops 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.
macrocli_cli.macro_validate (cognitive 17) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:314— macrocli_cli.macro_validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (7 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.
macrocli_cli.repl (cognitive 17) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:900— macrocli_cli.repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mailchimp_cli._start_repl (cognitive 17) mailchimp/agent-harness/cli_anything/mailchimp/mailchimp_cli.py:40— mailchimp_cli._start_repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
minimax_cli.repl (cognitive 17) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:496— minimax_cli.repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fixers._set_nested (cognitive 17) n8n/agent-harness/cli_anything/n8n/core/fixers.py:185— fixers._set_nested has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, 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.
rekordbox_cli.playlist_add (cognitive 17) rekordbox/agent-harness/cli_anything/rekordbox/rekordbox_cli.py:307— rekordbox_cli.playlist_add has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2, ternaries 1 (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.
preview.diff (cognitive 17) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:285— preview.diff has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rms_cli.repl (cognitive 17) rms/agent-harness/cli_anything/rms/rms_cli.py:1176— rms_cli.repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
export.list_assets (cognitive 17) sbox/agent-harness/cli_anything/sbox/core/export.py:53— export.list_assets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 4, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
snapshot.list_snapshots (cognitive 17) tigris/agent-harness/cli_anything/tigris/core/snapshot.py:24— snapshot.list_snapshots has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 pts), boolean chains 2, error handling 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.
unimol_tools_cli.output (cognitive 17) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:28— unimol_tools_cli.output has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UniMolBackend._convert_metrics_to_json (cognitive 17) REDACTED:141— UniMolBackend._convert_metrics_to_json has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 5 (7 pts), loops 1 (2 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.
UniMolBackend.predict (cognitive 17) REDACTED:165— UniMolBackend.predict has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1, error handling 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.
videocaptioner_cli.repl (cognitive 17) videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:318— videocaptioner_cli.repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
zotero_http._build_url (cognitive 17) REDACTED:25— zotero_http._build_url has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
REDACTED.renderDeck (cognitive 17) REDACTED:2031— REDACTED.renderDeck has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2051, 2042). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
loadTokens (cognitive 17) sketch/agent-harness/src/builder.js:62— loadTokens has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 2). Of this number, 13 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
BridgeMod.BuildHandSelectState (cognitive 16) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1209— BridgeMod.BuildHandSelectState has cognitive complexity 16 (threshold 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.
qgis_backend._extract_payload_message (cognitive 16) QGIS/agent-harness/cli_anything/qgis/utils/qgis_backend.py:140— qgis_backend._extract_payload_message has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 1 (2 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.
animation.add_keyframe (cognitive 16) blender/agent-harness/cli_anything/blender/core/animation.py:17— animation.add_keyframe has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lighting.add_camera (cognitive 16) blender/agent-harness/cli_anything/blender/core/lighting.py:58— lighting.add_camera has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 4, loops 1 (2 pts), ternaries 2 (nesting depth added 1). 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.
preview._publish_live_session (cognitive 16) blender/agent-harness/cli_anything/blender/core/preview.py:458— preview._publish_live_session has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, ternaries 5, if/else 3 (4 pts), loops 1 (nesting depth added 1). 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.
calibre_cli.repl (cognitive 16) calibre/agent-harness/cli_anything/calibre/calibre_cli.py:88— calibre_cli.repl has cognitive complexity 16 (threshold 15). Drivers by points: error handling 3 (6 pts), if/else 3 (6 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
preview.capture (cognitive 16) freecad/agent-harness/cli_anything/freecad/core/preview.py:313— preview.capture has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 3 (4 pts), boolean chains 3, loops 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.
freecad_backend.get_version (cognitive 16) freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:221— freecad_backend.get_version has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 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.
text._wrap_paragraph (cognitive 16) inkscape/agent-harness/cli_anything/inkscape/core/text.py:306— text._wrap_paragraph has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), ternaries 1 (2 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.
iterm2_ctl_cli.repl (cognitive 16) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:1412— iterm2_ctl_cli.repl has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 4 (7 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
filters.set_filter_param (cognitive 16) kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:218— filters.set_filter_param has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
export._build_html (cognitive 16) libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:214— export._build_html has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
texture_info._read_dimensions_fallback (cognitive 16) live2d/agent-harness/cli_anything/live2d/core/texture_info.py:66— texture_info._read_dimensions_fallback has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (2 pts), boolean chains 1, error handling 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.
live2d_cli.param_edit (cognitive 16) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1111— live2d_cli.param_edit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MacroRuntime.execute (cognitive 16) macrocli/agent-harness/cli_anything/macrocli/core/runtime.py:140— MacroRuntime.execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (3 pts), boolean chains 1, loops 1, 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.
n8n_cli.health_check (cognitive 16) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1552— n8n_cli.health_check has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, ternaries 3 (5 pts), error handling 3, boolean chains 1 (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.
obs_utils._finite_number (cognitive 16) obs-studio/agent-harness/cli_anything/obs_studio/utils/obs_utils.py:11— obs_utils._finite_number has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 4 (6 pts) (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.
quietshrink_cli.doctor (cognitive 16) quietshrink/agent-harness/cli_anything/quietshrink/quietshrink_cli.py:165— quietshrink_cli.doctor has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), error handling 2 (3 pts), if/else 3, boolean chains 2, loops 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.
preview._compact_diff (cognitive 16) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:64— preview._compact_diff has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 1 (2 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.
renderdoc_cli.repl (cognitive 16) renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:962— renderdoc_cli.repl has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 3 (6 pts), loops 1, 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.
extract_tools._coerce_default (cognitive 16) safari/agent-harness/scripts/extract_tools.py:444— extract_tools._coerce_default has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, error handling 1 (2 pts) (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.
scene._category_for_ref (cognitive 16) sbox/agent-harness/cli_anything/sbox/core/scene.py:1096— scene._category_for_ref has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 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.
sbox_cli.codegen_component (cognitive 16) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1127— sbox_cli.codegen_component has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, ternaries 2 (5 pts), loops 1 (2 pts), error handling 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.
unimol_tools_cli.archive_command (cognitive 16) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:782— unimol_tools_cli.archive_command has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 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.
capture.resolve_capture_target (cognitive 16) unrealinsights/agent-harness/cli_anything/unrealinsights/core/capture.py:69— capture.resolve_capture_target has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (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.
blender_preview_story_demo.draw_trace_panel (cognitive 16) docs/scripts/blender_preview_story_demo.py:293— blender_preview_story_demo.draw_trace_panel has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 3 (5 pts), loops 3 (4 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.
freecad_live_preview_demo.draw_terminal_panel (cognitive 16) docs/scripts/freecad_live_preview_demo.py:4444— freecad_live_preview_demo.draw_terminal_panel has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 3 (5 pts), loops 3 (4 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.
experimental.move_item_to_collection (cognitive 16) zotero/agent-harness/cli_anything/zotero/core/experimental.py:121— experimental.move_item_to_collection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, loops 1 (2 pts) (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.
openai_api._extract_text (cognitive 16) REDACTED:13— openai_api._extract_text has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, loops 2 (3 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.
builder.build (cognitive 16) sketch/agent-harness/src/builder.js:326— builder.build has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, loops 3 (6 pts), if/else 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MethodTooLong: BridgeMod.BuildMultiplayerGameState slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:24— MethodTooLong — BuildMultiplayerGameState runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication· Near-duplicate member family (61 members, 36 shared lines) · ×1
Near-duplicate member family (61 members, 36 shared lines) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:370— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:370-414 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:348-392 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:416-460 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:416-460 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:416-460 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:416-460 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:416-460 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:370-414 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:416-460 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:416-460 | cli-anything-plugin/repl_skin.py:416-460 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:416-460 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:416-460 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:416-460 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:416-460 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:416-460 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:416-460 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:381-425 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:416-460 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:416-460 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:416-460 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:416-460 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:416-460 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:416-460 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:416-460 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:416-460 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:416-460 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:416-460 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:416-460 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:370-414 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:416-460 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:355-400 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:416-460 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:416-460 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:420-462 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:416-460 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:416-460 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:416-460 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:416-460 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:416-460 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:416-460 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:416-460 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:416-460 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:416-460 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:416-460 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:416-460 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:416-460 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:416-460 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:416-460 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:416-460 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:416-460 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:416-460 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:416-460 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:381-425 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:370-414 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:348-392 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:418-462 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:416-460 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:416-460 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:416-460 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:416-460 — These 61 members are variants of one another: a block of 36 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 61 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 61 times.
D4 · Code Duplication· Near-duplicate member family (12 members, 12 shared lines) · ×1
Near-duplicate member family (12 members, 12 shared lines) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:100— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:100-126 | blender/agent-harness/cli_anything/blender/blender_cli.py:161-187 | browser/agent-harness/cli_anything/browser/browser_cli.py:81-100 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:88-122 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:87-113 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:109-135 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:89-115 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:87-113 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:73-92 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:87-113 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:75-101 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:76-95 — These 12 members are variants of one another: a block of 12 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
Near-duplicate member pair (85 shared lines) docs/scripts/blender_preview_story_demo.py:300— docs/scripts/blender_preview_story_demo.py:300-419 | docs/scripts/freecad_live_preview_demo.py:4451-4562 — These two members are variants of one another: 85 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 (79 shared lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:25— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:25-220 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:43-221 — These two members are variants of one another: 79 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (65 shared lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:134— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:134-210 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:673-774 — These two members are variants of one another: 65 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (59 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (59 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:441— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:441-462 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:419-440 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:487-508 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:487-508 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:487-508 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:487-508 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:487-508 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:441-462 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:487-508 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:487-508 | cli-anything-plugin/repl_skin.py:487-508 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:487-508 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:487-508 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:487-508 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:487-508 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:487-508 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:487-508 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:452-473 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:487-508 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:487-508 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:487-508 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:487-508 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:487-508 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:487-508 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:487-508 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:487-508 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:487-508 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:487-508 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:487-508 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:441-462 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:487-508 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:427-448 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:487-508 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:487-508 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:487-508 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:487-508 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:487-508 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:487-508 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:487-508 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:487-508 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:487-508 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:487-508 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:487-508 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:487-508 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:487-508 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:487-508 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:487-508 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:487-508 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:487-508 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:487-508 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:487-508 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:487-508 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:452-473 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:441-462 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:419-440 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:487-508 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:487-508 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:487-508 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:487-508 — These 59 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 59 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 59 times.
D4 · Code Duplication· Members sharing a duplicated core (22 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (22 members, 50+ identical tokens) QGIS/agent-harness/cli_anything/qgis/core/session.py:13— QGIS/agent-harness/cli_anything/qgis/core/session.py:13-39 | anygen/agent-harness/cli_anything/anygen/core/session.py:11-33 | audacity/agent-harness/cli_anything/audacity/core/session.py:14-36 | blender/agent-harness/cli_anything/blender/core/session.py:11-33 | drawio/agent-harness/cli_anything/drawio/core/session.py:19-42 | eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:31-56 | freecad/agent-harness/cli_anything/freecad/core/session.py:18-48 | gimp/agent-harness/cli_anything/gimp/core/session.py:11-33 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:11-33 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:11-33 | krita/agent-harness/cli_anything/krita/utils/io.py:9-36 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:11-33 | macrocli/agent-harness/cli_anything/macrocli/core/session.py:20-42 | minimax/agent-harness/cli_anything/minimax/core/session.py:12-34 | mubu/agent-harness/cli_anything/mubu/mubu_cli.py:136-157 | novita/agent-harness/cli_anything/novita/core/session.py:12-34 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:11-33 | openrefine/agent-harness/cli_anything/openrefine/core/session.py:88-111 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:19-42 | rms/agent-harness/cli_anything/rms/core/session.py:11-33 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:19-42 | zotero/agent-harness/cli_anything/zotero/core/session.py:45-66 — These 22 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 22 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 22 times.
D4 · Code Duplication· Members sharing a duplicated core (19 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (19 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:36— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:36-47 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:49-59 | audacity/agent-harness/cli_anything/audacity/audacity_cli.py:54-64 | blender/agent-harness/cli_anything/blender/blender_cli.py:53-63 | browser/agent-harness/cli_anything/browser/browser_cli.py:44-54 | comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:47-58 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:48-59 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:50-60 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:72-82 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:52-62 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:50-60 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:35-46 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:50-60 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:38-48 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:39-49 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:36-47 | rms/agent-harness/cli_anything/rms/rms_cli.py:43-53 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:53-64 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:47-58 — These 19 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 19 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 19 times.
D4 · Code Duplication· Members sharing a duplicated core (15 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (15 members, 50+ identical tokens) seaclip/agent-harness/cli_anything/seaclip/core/activity.py:19— seaclip/agent-harness/cli_anything/seaclip/core/activity.py:19-49 | seaclip/agent-harness/cli_anything/seaclip/core/agents.py:18-48 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:22-53 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:62-79 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:87-104 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:112-129 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:136-153 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:20-37 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:44-66 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:73-90 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:97-114 | seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py:18-49 | seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py:58-79 | seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py:86-103 | seaclip/agent-harness/cli_anything/seaclip/seaclip_cli.py:34-54 — These 15 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 15 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 15 times.
D4 · Code Duplication· Members sharing a duplicated core (13 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (13 members, 50+ identical tokens) comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:18— comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:18-50 | comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:54-86 | comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:90-122 | comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:126-156 | REDACTED:30-54 | REDACTED:60-85 | REDACTED:91-123 | REDACTED:129-154 | REDACTED:159-183 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:16-53 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:58-91 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:96-129 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:134-171 — These 13 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 13 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 13 times.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (8 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:462— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:462-478 | blender/agent-harness/cli_anything/blender/blender_cli.py:327-351 | blender/agent-harness/cli_anything/blender/blender_cli.py:545-562 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:481-496 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:421-437 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:509-526 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:301-327 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:427-445 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication· Edited copy of a member (120 corresponding lines) · ×1
Edited copy of a member (120 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/preview.py:728— freecad/agent-harness/cli_anything/freecad/core/preview.py:728-848 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:682-801 — These two members are one piece of code written twice and then edited apart: 120 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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, 96+ corresponding lines) · ×1
Edited copies of one member (3 members, 96+ corresponding lines) blender/agent-harness/cli_anything/blender/core/preview.py:470— blender/agent-harness/cli_anything/blender/core/preview.py:470-568 | freecad/agent-harness/cli_anything/freecad/core/preview.py:485-581 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:441-536 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 96 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 (73 corresponding lines) · ×1
Edited copy of a member (73 corresponding lines) macrocli/agent-harness/cli_anything/macrocli/backends/native_api.py:90— macrocli/agent-harness/cli_anything/macrocli/backends/native_api.py:90-169 | macrocli/agent-harness/cli_anything/macrocli/backends/native_api.py:174-246 — These two members are one piece of code written twice and then edited apart: 73 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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, 56+ corresponding lines) · ×1
Edited copies of one member (3 members, 56+ corresponding lines) lldb/agent-harness/cli_anything/lldb/lldb_cli.py:641— lldb/agent-harness/cli_anything/lldb/lldb_cli.py:641-707 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:456-511 | unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py:1021-1080 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 56 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 (48 corresponding lines) · ×1
Edited copy of a member (48 corresponding lines) exa/agent-harness/cli_anything/exa/utils/repl_skin.py:101— exa/agent-harness/cli_anything/exa/utils/repl_skin.py:101-148 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:101-148 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (76 corresponding lines) · ×1
Edited copy of a member (76 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/sketch.py:292— freecad/agent-harness/cli_anything/freecad/core/sketch.py:292-367 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:731-810 — These two members are one piece of code written twice and then edited apart: 76 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (59 corresponding lines) · ×1
Edited copy of a member (59 corresponding lines) gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:84— gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:84-154 | gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:163-221 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (39 corresponding lines) · ×1
Edited copy of a member (39 corresponding lines) minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:313— minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:313-357 | novita/agent-harness/cli_anything/novita/utils/novita_backend.py:132-170 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (7 members, 54+ corresponding lines) · ×1
Edited copies of one member (7 members, 54+ corresponding lines) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:774— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:774-827 | blender/agent-harness/cli_anything/blender/blender_cli.py:1075-1148 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:739-809 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:1023-1078 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:686-750 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:718-785 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:777-838 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 54 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 53+ corresponding lines) · ×1
Edited copies of one member (4 members, 53+ corresponding lines) obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:405— obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:405-457 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:437-489 | safari/agent-harness/cli_anything/safari/safari_cli.py:554-617 | videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:319-373 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 53 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (49 corresponding lines) · ×1
Edited copy of a member (49 corresponding lines) sbox/agent-harness/cli_anything/sbox/core/export.py:405— sbox/agent-harness/cli_anything/sbox/core/export.py:405-457 | sbox/agent-harness/cli_anything/sbox/core/export.py:466-514 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 23+ corresponding lines) · ×1
Edited copies of one member (8 members, 23+ corresponding lines) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:367— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:367-390 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:448-471 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:490-512 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:532-554 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:572-595 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:778-808 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:883-918 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1346-1374 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 23 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 8 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 37+ corresponding lines) · ×1
Edited copies of one member (4 members, 37+ corresponding lines) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:101— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:101-137 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:102-138 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:101-137 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:101-137 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 37 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) inkscape/agent-harness/cli_anything/inkscape/core/layers.py:124— inkscape/agent-harness/cli_anything/inkscape/core/layers.py:124-151 | obs-studio/agent-harness/cli_anything/obs_studio/core/sources.py:169-192 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×1
Edited copies of one member (3 members, 18+ corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:777— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:777-794 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:797-817 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:820-840 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 20+ corresponding lines) · ×1
Edited copies of one member (3 members, 20+ corresponding lines) calibre/agent-harness/cli_anything/calibre/calibre_cli.py:360— calibre/agent-harness/cli_anything/calibre/calibre_cli.py:360-380 | calibre/agent-harness/cli_anything/calibre/calibre_cli.py:450-483 | calibre/agent-harness/cli_anything/calibre/calibre_cli.py:552-571 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 23+ corresponding lines) · ×1
Edited copies of one member (5 members, 23+ corresponding lines) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:623— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:623-648 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1127-1149 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1198-1224 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1244-1270 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1299-1326 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 17+ corresponding lines) · ×1
Edited copies of one member (4 members, 17+ corresponding lines) chromadb/agent-harness/cli_anything/chromadb/core/collections.py:52— chromadb/agent-harness/cli_anything/chromadb/core/collections.py:52-69 | chromadb/agent-harness/cli_anything/chromadb/core/documents.py:29-53 | chromadb/agent-harness/cli_anything/chromadb/core/documents.py:106-122 | chromadb/agent-harness/cli_anything/chromadb/core/documents.py:129-146 — 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 (56 corresponding lines) · ×1
Edited copy of a member (56 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/body.py:600— freecad/agent-harness/cli_anything/freecad/core/body.py:600-656 | freecad/agent-harness/cli_anything/freecad/core/body.py:1120-1175 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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, 40+ corresponding lines) · ×1
Edited copies of one member (3 members, 40+ corresponding lines) browser/agent-harness/cli_anything/browser/utils/domshell_backend.py:680— browser/agent-harness/cli_anything/browser/utils/domshell_backend.py:680-731 | browser/agent-harness/cli_anything/browser/utils/domshell_backend.py:776-815 | browser/agent-harness/cli_anything/browser/utils/domshell_backend.py:933-973 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 40 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, 24+ corresponding lines) · ×1
Edited copies of one member (4 members, 24+ corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:441— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:441-469 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:627-650 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:890-914 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:936-959 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 33+ corresponding lines) · ×1
Edited copies of one member (3 members, 33+ corresponding lines) calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:84— calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:84-119 | calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:126-158 | calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:165-197 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 33 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 (53 corresponding lines) · ×1
Edited copy of a member (53 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/sketch.py:378— freecad/agent-harness/cli_anything/freecad/core/sketch.py:378-440 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:669-721 — 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 copies of one member (3 members, 36+ corresponding lines) · ×1
Edited copies of one member (3 members, 36+ corresponding lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:273— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:273-308 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:311-350 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:353-395 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 36 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 (6 members, 16+ corresponding lines) · ×1
Edited copies of one member (6 members, 16+ corresponding lines) tigris/agent-harness/cli_anything/tigris/core/access_key.py:110— tigris/agent-harness/cli_anything/tigris/core/access_key.py:110-125 | tigris/agent-harness/cli_anything/tigris/core/access_key.py:135-150 | tigris/agent-harness/cli_anything/tigris/core/bucket.py:72-87 | tigris/agent-harness/cli_anything/tigris/core/iam.py:138-153 | tigris/agent-harness/cli_anything/tigris/core/object.py:87-108 | tigris/agent-harness/cli_anything/tigris/core/object.py:188-211 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 15+ corresponding lines) · ×1
Edited copies of one member (5 members, 15+ corresponding lines) calibre/agent-harness/cli_anything/calibre/calibre_cli.py:335— calibre/agent-harness/cli_anything/calibre/calibre_cli.py:335-352 | calibre/agent-harness/cli_anything/calibre/calibre_cli.py:611-625 | calibre/agent-harness/cli_anything/calibre/calibre_cli.py:724-742 | calibre/agent-harness/cli_anything/calibre/calibre_cli.py:772-786 | calibre/agent-harness/cli_anything/calibre/calibre_cli.py:800-814 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 36+ corresponding lines) · ×1
Edited copies of one member (5 members, 36+ corresponding lines) freecad/agent-harness/cli_anything/freecad/core/parts.py:675— freecad/agent-harness/cli_anything/freecad/core/parts.py:675-710 | freecad/agent-harness/cli_anything/freecad/core/parts.py:720-759 | freecad/agent-harness/cli_anything/freecad/core/parts.py:848-887 | freecad/agent-harness/cli_anything/freecad/core/parts.py:897-936 | freecad/agent-harness/cli_anything/freecad/core/parts.py:1099-1139 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 36 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 10+ corresponding lines) · ×1
Edited copies of one member (4 members, 10+ corresponding lines) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:501— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:501-511 | blender/agent-harness/cli_anything/blender/blender_cli.py:584-593 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:518-527 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:469-480 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 16+ corresponding lines) · ×1
Edited copies of one member (4 members, 16+ corresponding lines) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:84— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:84-112 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:258-274 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:78-102 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:241-256 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 30+ corresponding lines) · ×1
Edited copies of one member (5 members, 30+ corresponding lines) cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:285— cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:285-314 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:324-357 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:367-401 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:412-446 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:844-873 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 30 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, 43+ corresponding lines) · ×1
Edited copies of one member (3 members, 43+ corresponding lines) freecad/agent-harness/cli_anything/freecad/core/parts.py:767— freecad/agent-harness/cli_anything/freecad/core/parts.py:767-809 | freecad/agent-harness/cli_anything/freecad/core/parts.py:946-990 | freecad/agent-harness/cli_anything/freecad/core/parts.py:1330-1372 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 43 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, 44+ corresponding lines) · ×1
Edited copies of one member (3 members, 44+ corresponding lines) freecad/agent-harness/cli_anything/freecad/core/assembly.py:118— freecad/agent-harness/cli_anything/freecad/core/assembly.py:118-163 | freecad/agent-harness/cli_anything/freecad/core/assembly.py:545-590 | freecad/agent-harness/cli_anything/freecad/core/cam.py:66-109 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 44 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 (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) freecad/agent-harness/cli_anything/freecad/core/techdraw.py:161— freecad/agent-harness/cli_anything/freecad/core/techdraw.py:161-204 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:255-299 — 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 (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) firefly-iii/agent-harness/cli_anything/firefly_iii/core/recurrences.py:58— firefly-iii/agent-harness/cli_anything/firefly_iii/core/recurrences.py:58-84 | firefly-iii/agent-harness/cli_anything/firefly_iii/core/transactions.py:72-104 — 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 (5 members, 13+ corresponding lines) · ×1
Edited copies of one member (5 members, 13+ corresponding lines) musescore/agent-harness/cli_anything/musescore/musescore_cli.py:195— musescore/agent-harness/cli_anything/musescore/musescore_cli.py:195-214 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:230-250 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:264-283 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:412-424 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:433-445 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 31+ corresponding lines) · ×1
Edited copies of one member (4 members, 31+ corresponding lines) freecad/agent-harness/cli_anything/freecad/core/body.py:813— freecad/agent-harness/cli_anything/freecad/core/body.py:813-847 | freecad/agent-harness/cli_anything/freecad/core/body.py:1259-1289 | freecad/agent-harness/cli_anything/freecad/core/body.py:1337-1371 | freecad/agent-harness/cli_anything/freecad/core/body.py:1382-1412 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 31 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) cli-hub/cli_hub/preview.py:71— cli-hub/cli_hub/preview.py:71-77 | renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py:49-56 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/output.py:45-54 — 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 (5 members, 7+ corresponding lines) · ×1
Edited copies of one member (5 members, 7+ corresponding lines) cli-hub/cli_hub/installer.py:123— cli-hub/cli_hub/installer.py:123-129 | cli-hub/cli_hub/installer.py:133-140 | cli-hub/cli_hub/installer.py:144-151 | cli-hub/cli_hub/installer.py:231-239 | cli-hub/cli_hub/installer.py:243-251 — 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 (4 members, 11+ corresponding lines) · ×1
Edited copies of one member (4 members, 11+ corresponding lines) wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:475— wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:475-487 | wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:493-504 | wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:510-520 | wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:526-537 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 6+ corresponding lines) · ×1
Edited copies of one member (6 members, 6+ corresponding lines) inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:307— inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:307-312 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:339-344 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:356-361 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:400-405 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:866-875 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:887-896 — These 6 members are one piece of code written 6 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 6 times and the copies 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) drawio/agent-harness/cli_anything/drawio/core/session.py:132— drawio/agent-harness/cli_anything/drawio/core/session.py:132-142 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:173-183 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:195-205 — 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 (3 members, 38+ corresponding lines) · ×1
Edited copies of one member (3 members, 38+ corresponding lines) freecad/agent-harness/cli_anything/freecad/core/body.py:171— freecad/agent-harness/cli_anything/freecad/core/body.py:171-217 | freecad/agent-harness/cli_anything/freecad/core/body.py:228-269 | freecad/agent-harness/cli_anything/freecad/core/body.py:552-589 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 38 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 3+ corresponding lines) · ×1
Edited copies of one member (5 members, 3+ corresponding lines) blender/agent-harness/cli_anything/blender/core/lighting.py:23— blender/agent-harness/cli_anything/blender/core/lighting.py:23-25 | blender/agent-harness/cli_anything/blender/core/materials.py:34-37 | freecad/agent-harness/cli_anything/freecad/core/body.py:62-65 | freecad/agent-harness/cli_anything/freecad/core/materials.py:175-178 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:88-91 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 3 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 copy of a member (2 corresponding lines) · ×1
Edited copy of a member (2 corresponding lines) 3MF/agent-harness/cli_anything/threemf/core/inspector.py:267— 3MF/agent-harness/cli_anything/threemf/core/inspector.py:267-268 | 3MF/agent-harness/cli_anything/threemf/core/modifier.py:176-177 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 4+ corresponding lines) · ×1
Edited copies of one member (4 members, 4+ corresponding lines) anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:56— anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:56-60 | minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:223-226 | novita/agent-harness/cli_anything/novita/utils/novita_backend.py:38-41 | rms/agent-harness/cli_anything/rms/utils/rms_backend.py:38-41 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (63 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:718— blender/agent-harness/cli_anything/blender/core/preview.py:718-780 | freecad/agent-harness/cli_anything/freecad/core/preview.py:728-790 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:682-744 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. 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 (51–54 lines × 2) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:78— renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:78-131 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1183-1233 — both copies are in the same file, so extract the 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 (50 lines × 2) freecad/agent-harness/cli_anything/freecad/core/preview.py:799— freecad/agent-harness/cli_anything/freecad/core/preview.py:799-848 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:752-801 — before extracting anything, compare `freecad/agent-harness/cli_anything/freecad/core/preview.py` and `shotcut/agent-harness/cli_anything/shotcut/core/preview.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 375 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 `freecad/agent-harness/cli_anything/freecad/core/preview.py:799` 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 (49 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:182— kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:182-230 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:176-224 — before extracting anything, compare `kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py` and `shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 163 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. 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 (47–48 lines × 2) freecad/agent-harness/cli_anything/freecad/core/export.py:260— freecad/agent-harness/cli_anything/freecad/core/export.py:260-307 | krita/agent-harness/cli_anything/krita/core/export.py:338-384 — 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 (48 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:107— kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:107-154 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:101-148 — before extracting anything, compare `kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py` and `shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 163 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 (47 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:422— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:422-468 | cli-anything-plugin/preview_bundle.py:422-468 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:422-468 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:422-468 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:422-468 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:422-468 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 256 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. 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 (39–46 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:418— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:418-456 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:449-494 — before extracting anything, compare `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 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 `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:418` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (39–45 lines × 2) browser/agent-harness/cli_anything/browser/utils/security.py:93— browser/agent-harness/cli_anything/browser/utils/security.py:93-137 | safari/agent-harness/cli_anything/safari/utils/security.py:81-119 — 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 `browser/agent-harness/cli_anything/browser/utils/security.py:93` 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 (45 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:278— freecad/agent-harness/cli_anything/freecad/core/body.py:278-322 | freecad/agent-harness/cli_anything/freecad/core/body.py:331-375 — both copies are in the same file, so extract the 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 (41 lines × 2) exa/agent-harness/cli_anything/exa/utils/repl_skin.py:101— exa/agent-harness/cli_anything/exa/utils/repl_skin.py:101-141 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:101-141 — before extracting anything, compare `exa/agent-harness/cli_anything/exa/utils/repl_skin.py` and `unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 363 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. 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 (17–38 lines × 4) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:468— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:468-505 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:503-538 | novita/agent-harness/cli_anything/novita/novita_cli.py:376-409 | rms/agent-harness/cli_anything/rms/rms_cli.py:1211-1227 — 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 `rms/agent-harness/cli_anything/rms/rms_cli.py:1211` 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. Note first that the copies are not typed on the same thing: `ReplSkin` names `cli_anything.anygen.utils.repl_skin` in one and `cli_anything.minimax.utils.repl_skin` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (30–38 lines × 2) REDACTED:1869— REDACTED:1869-1906 | REDACTED:1937-1966 — both copies are in the same file, so extract the 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:1869` 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 (37 lines × 3) blender/agent-harness/cli_anything/blender/blender_cli.py:98— blender/agent-harness/cli_anything/blender/blender_cli.py:98-134 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:116-152 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:99-135 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. 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 (33–36 lines × 2) QGIS/agent-harness/cli_anything/qgis/core/export.py:63— QGIS/agent-harness/cli_anything/qgis/core/export.py:63-98 | QGIS/agent-harness/cli_anything/qgis/core/export.py:108-140 — both copies are in the same file, so extract the 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 (35 lines × 52) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:134— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:134-168 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:134-168 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:134-168 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:134-168 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:134-168 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:134-168 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:134-168 | cli-anything-plugin/repl_skin.py:134-168 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:134-168 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:134-168 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:134-168 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:134-168 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:134-168 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:134-168 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:134-168 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:134-168 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:134-168 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:134-168 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:134-168 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:134-168 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:134-168 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:134-168 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:134-168 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:134-168 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:134-168 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:134-168 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:134-168 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:134-168 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:139-173 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:134-168 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:134-168 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:134-168 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:134-168 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:134-168 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:134-168 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:134-168 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:134-168 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:134-168 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:134-168 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:134-168 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:134-168 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:134-168 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:134-168 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:134-168 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:134-168 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:134-168 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:134-168 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:135-169 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:134-168 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:134-168 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:134-168 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:134-168 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 413 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 `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:134` 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 (45 lines × 52) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:189— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:189-233 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:189-233 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:189-233 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:189-233 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:189-233 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:189-233 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:189-233 | cli-anything-plugin/repl_skin.py:189-233 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:189-233 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:189-233 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:189-233 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:189-233 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:189-233 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:189-233 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:189-233 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:189-233 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:189-233 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:189-233 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:189-233 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:189-233 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:189-233 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:189-233 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:189-233 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:189-233 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:189-233 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:189-233 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:189-233 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:189-233 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:194-238 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:189-233 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:189-233 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:189-233 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:189-233 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:189-233 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:189-233 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:189-233 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:189-233 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:189-233 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:189-233 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:189-233 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:189-233 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:189-233 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:189-233 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:189-233 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:189-233 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:189-233 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:189-233 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:190-234 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:189-233 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:189-233 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:189-233 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:189-233 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 413 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:236` calls `extend`, `_meta_lines`, `_display_home_path` and `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:234` 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 (34 lines × 4) blender/agent-harness/cli_anything/blender/core/preview.py:388— blender/agent-harness/cli_anything/blender/core/preview.py:388-423 | freecad/agent-harness/cli_anything/freecad/core/preview.py:410-443 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:223-257 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:213-252 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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 `blender/agent-harness/cli_anything/blender/core/preview.py:388` 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, `shotcut/agent-harness/cli_anything/shotcut/core/preview.py:212` calls `_metrics` and `renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:221` 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 (31–34 lines × 2) chromadb/agent-harness/cli_anything/chromadb/chromadb_cli.py:69— chromadb/agent-harness/cli_anything/chromadb/chromadb_cli.py:69-102 | tigris/agent-harness/cli_anything/tigris/tigris_cli.py:118-148 — 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 (32–33 lines × 2) audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:320— audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:320-352 | audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:372-403 — both copies are in the same file, so extract the 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–33 lines × 2) REDACTED:582— REDACTED:582-607 | REDACTED:632-664 — both copies are in the same file, so extract the 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 (32 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:203— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:203-234 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:181-212 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:249-280 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:249-280 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:249-280 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:249-280 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:249-280 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:204-235 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:249-280 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:249-280 | cli-anything-plugin/repl_skin.py:249-280 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:249-280 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:249-280 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:249-280 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:249-280 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:249-280 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:249-280 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:214-245 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:249-280 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:249-280 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:249-280 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:249-280 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:249-280 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:249-280 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:249-280 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:249-280 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:249-280 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:249-280 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:249-280 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:203-234 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:249-280 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:186-217 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:249-280 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:249-280 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:254-285 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:249-280 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:249-280 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:249-280 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:249-280 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:249-280 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:249-280 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:249-280 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:249-280 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:249-280 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:249-280 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:249-280 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:249-280 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:249-280 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:249-280 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:249-280 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:249-280 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:249-280 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:249-280 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:214-245 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:203-234 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:181-212 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:252-283 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:249-280 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:249-280 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:249-280 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:249-280 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 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. 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 (32 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:280— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:280-311 | cli-anything-plugin/preview_bundle.py:280-311 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:280-311 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:280-311 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:280-311 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:280-311 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 256 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. 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 (30–32 lines × 2) REDACTED:388— REDACTED:388-419 | REDACTED:370-399 — 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 `REDACTED:388` 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 (25–32 lines × 2) freecad/agent-harness/cli_anything/freecad/core/draft.py:1174— freecad/agent-harness/cli_anything/freecad/core/draft.py:1174-1198 | freecad/agent-harness/cli_anything/freecad/core/mesh.py:716-747 — 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 (30–31 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:583— blender/agent-harness/cli_anything/blender/core/preview.py:583-613 | freecad/agent-harness/cli_anything/freecad/core/preview.py:596-626 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:551-580 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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. 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 (29–30 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:370— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:370-399 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:348-377 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:416-445 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:416-445 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:416-445 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:416-445 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:416-445 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:370-399 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:416-445 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:416-445 | cli-anything-plugin/repl_skin.py:416-445 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:416-445 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:416-445 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:416-445 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:416-445 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:416-445 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:416-445 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:381-410 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:416-445 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:416-445 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:416-445 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:416-445 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:416-445 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:416-445 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:416-445 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:416-445 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:416-445 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:416-445 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:416-445 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:370-399 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:416-445 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:355-383 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:416-445 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:416-445 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:420-449 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:416-445 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:416-445 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:416-445 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:416-445 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:416-445 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:416-445 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:416-445 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:416-445 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:416-445 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:416-445 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:416-445 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:416-445 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:416-445 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:416-445 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:416-445 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:416-445 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:416-445 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:416-445 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:381-410 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:370-399 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:348-377 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:418-447 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:416-445 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:416-445 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:416-445 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:416-445 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 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 (42 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:182— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:182-223 | cli-anything-plugin/preview_bundle.py:182-223 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:182-223 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:182-223 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:182-223 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:182-223 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 256 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. 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 × 4) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:101— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:101-130 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:102-131 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:101-130 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:101-130 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (30 lines × 2) docs/scripts/blender_preview_story_demo.py:354— docs/scripts/blender_preview_story_demo.py:354-383 | docs/scripts/freecad_live_preview_demo.py:4497-4526 — 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 (26–30 lines × 2) freecad/agent-harness/cli_anything/freecad/core/sketch.py:198— freecad/agent-harness/cli_anything/freecad/core/sketch.py:198-223 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:868-897 — both copies are in the same file, so extract the 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, `freecad/agent-harness/cli_anything/freecad/core/sketch.py:901` calls `ValueError` and `freecad/agent-harness/cli_anything/freecad/core/sketch.py:225` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (27–28 lines × 7) freecad/agent-harness/cli_anything/freecad/core/parts.py:684— freecad/agent-harness/cli_anything/freecad/core/parts.py:684-710 | freecad/agent-harness/cli_anything/freecad/core/parts.py:732-759 | freecad/agent-harness/cli_anything/freecad/core/parts.py:860-887 | freecad/agent-harness/cli_anything/freecad/core/parts.py:909-936 | freecad/agent-harness/cli_anything/freecad/core/parts.py:1062-1089 | freecad/agent-harness/cli_anything/freecad/core/parts.py:1112-1139 | freecad/agent-harness/cli_anything/freecad/core/parts.py:1166-1193 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `freecad/agent-harness/cli_anything/freecad/core/parts.py:1110` calls `_validate_vec3` and `freecad/agent-harness/cli_anything/freecad/core/parts.py:858` 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–28 lines × 3) REDACTED:2049— REDACTED:2049-2059 | REDACTED:2148-2158 | REDACTED:2221-2248 — 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 `REDACTED:2049` 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 (28 lines × 2) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:885— shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:885-912 | shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:916-943 — both copies are in the same file, so extract the 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 (20–27 lines × 3) freecad/agent-harness/cli_anything/freecad/core/draft.py:118— freecad/agent-harness/cli_anything/freecad/core/draft.py:118-144 | freecad/agent-harness/cli_anything/freecad/core/draft.py:283-305 | freecad/agent-harness/cli_anything/freecad/core/draft.py:315-334 — 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 (27 lines × 3) REDACTED:1968— REDACTED:1968-1994 | REDACTED:2073-2099 | REDACTED:2171-2197 — 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 `REDACTED:1968` 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 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:223— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:223-247 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:285-309 — both copies are in the same file, so extract the 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 `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:223` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (27 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:813— freecad/agent-harness/cli_anything/freecad/core/body.py:813-839 | freecad/agent-harness/cli_anything/freecad/core/body.py:1337-1363 — both copies are in the same file, so extract the 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 (37–46 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:1962— freecad/agent-harness/cli_anything/freecad/core/body.py:1962-2007 | freecad/agent-harness/cli_anything/freecad/core/body.py:2020-2056 — both copies are in the same file, so extract the 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–26 lines × 2) macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py:322— macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py:322-347 | macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py:231-255 — 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–26 lines × 2) macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py:172— macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py:172-197 | macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:667-686 — 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 (25 lines × 3) drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:121— drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:121-145 | kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:144-168 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:138-162 — before extracting anything, compare `kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py` and `shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 163 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. 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 (23–25 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:83— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:83-105 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:82-106 — before extracting anything, compare `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 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 `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:83` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (21–24 lines × 5) blender/agent-harness/cli_anything/blender/core/preview.py:405— blender/agent-harness/cli_anything/blender/core/preview.py:405-426 | freecad/agent-harness/cli_anything/freecad/core/preview.py:425-445 | openscreen/agent-harness/cli_anything/openscreen/core/preview.py:203-226 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:239-259 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:233-254 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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 `blender/agent-harness/cli_anything/blender/core/preview.py:405` 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, `openscreen/agent-harness/cli_anything/openscreen/core/preview.py:202` calls `get` and `blender/agent-harness/cli_anything/blender/core/preview.py:403` 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 (26–27 lines × 2) docs/scripts/freecad_live_preview_demo.py:3655— docs/scripts/freecad_live_preview_demo.py:3655-3680 | docs/scripts/freecad_live_preview_demo.py:3758-3784 — both copies are in the same file, so extract the 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 (23 lines × 3) REDACTED:1364— REDACTED:1364-1386 | REDACTED:1405-1427 | REDACTED:1442-1464 — 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 `REDACTED:1364` 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–23 lines × 2) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:242— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:242-264 | 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:295-313 — both copies are in the same file, so extract the 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–23 lines × 2) REDACTED:133— REDACTED:133-155 | REDACTED:219-233 — 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 `REDACTED:133` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22–23 lines × 2) libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:283— libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:283-305 | libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:372-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. 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 × 59) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:441— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:441-462 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:419-440 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:487-508 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:487-508 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:487-508 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:487-508 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:487-508 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:441-462 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:487-508 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:487-508 | cli-anything-plugin/repl_skin.py:487-508 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:487-508 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:487-508 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:487-508 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:487-508 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:487-508 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:487-508 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:452-473 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:487-508 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:487-508 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:487-508 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:487-508 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:487-508 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:487-508 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:487-508 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:487-508 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:487-508 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:487-508 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:487-508 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:441-462 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:487-508 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:427-448 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:487-508 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:487-508 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:487-508 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:487-508 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:487-508 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:487-508 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:487-508 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:487-508 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:487-508 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:487-508 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:487-508 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:487-508 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:487-508 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:487-508 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:487-508 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:487-508 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:487-508 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:487-508 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:487-508 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:487-508 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:452-473 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:441-462 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:419-440 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:487-508 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:487-508 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:487-508 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:487-508 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 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. 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–22 lines × 2) drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:92— drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:92-113 | drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:482-500 — both copies are in the same file, so extract the 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:90` calls `set`, `str` and `drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:480` 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 (18–21 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:488— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:488-505 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:466-483 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:534-551 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:534-551 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:534-551 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:534-551 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:534-551 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:488-505 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:534-551 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:534-551 | cli-anything-plugin/repl_skin.py:534-551 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:534-551 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:534-551 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:534-551 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:534-551 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:534-551 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:534-551 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:499-516 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:534-551 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:534-551 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:534-551 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:534-551 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:534-551 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:534-551 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:534-551 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:534-551 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:534-551 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:534-551 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:534-551 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:488-505 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:534-551 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:480-500 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:534-551 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:534-551 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:535-552 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:534-551 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:534-551 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:534-551 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:534-551 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:534-551 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:534-551 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:534-551 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:534-551 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:534-551 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:534-551 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:534-551 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:534-551 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:534-551 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:534-551 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:534-551 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:534-551 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:534-551 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:534-551 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:499-516 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:488-505 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:466-483 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:535-552 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:534-551 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:534-551 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:534-551 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:534-551 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 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 (21 lines × 3) freecad/agent-harness/cli_anything/freecad/core/parts.py:1045— freecad/agent-harness/cli_anything/freecad/core/parts.py:1045-1065 | freecad/agent-harness/cli_anything/freecad/core/parts.py:1149-1169 | freecad/agent-harness/cli_anything/freecad/core/parts.py:1202-1222 — 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 (16–21 lines × 2) browser/agent-harness/cli_anything/browser/utils/security.py:145— browser/agent-harness/cli_anything/browser/utils/security.py:145-165 | safari/agent-harness/cli_anything/safari/utils/security.py:131-146 — 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 (20 lines × 3) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1156— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1156-1175 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1197-1216 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1230-1249 — 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 `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1156` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1254` calls `option` and `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1180` 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–20 lines × 2) sbox/agent-harness/cli_anything/sbox/core/material.py:43— sbox/agent-harness/cli_anything/sbox/core/material.py:43-62 | sbox/agent-harness/cli_anything/sbox/core/material.py:145-162 — both copies are in the same file, so extract the 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–19 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:466— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:466-483 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:444-461 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:512-529 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:512-529 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:512-529 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:512-529 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:512-529 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:466-483 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:512-529 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:512-529 | cli-anything-plugin/repl_skin.py:512-529 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:512-529 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:512-529 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:512-529 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:512-529 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:512-529 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:512-529 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:477-494 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:512-529 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:512-529 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:512-529 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:512-529 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:512-529 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:512-529 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:512-529 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:512-529 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:512-529 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:512-529 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:512-529 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:466-483 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:512-529 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:457-475 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:512-529 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:512-529 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:513-530 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:512-529 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:512-529 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:512-529 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:512-529 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:512-529 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:512-529 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:512-529 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:512-529 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:512-529 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:512-529 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:512-529 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:512-529 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:512-529 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:512-529 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:512-529 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:512-529 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:512-529 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:512-529 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:477-494 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:466-483 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:444-461 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:513-530 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:512-529 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:512-529 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:512-529 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:512-529 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 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. 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 × 50) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:115— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:115-133 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:115-133 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:115-133 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:115-133 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:115-133 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:115-133 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:115-133 | cli-anything-plugin/repl_skin.py:115-133 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:115-133 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:115-133 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:115-133 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:115-133 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:115-133 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:115-133 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:115-133 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:115-133 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:115-133 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:115-133 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:115-133 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:115-133 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:115-133 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:115-133 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:115-133 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:115-133 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:115-133 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:115-133 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:115-133 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:115-133 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:115-133 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:115-133 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:115-133 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:115-133 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:115-133 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:115-133 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:115-133 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:115-133 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:115-133 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:115-133 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:115-133 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:115-133 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:115-133 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:115-133 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:115-133 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:115-133 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:115-133 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:115-133 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:115-133 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:115-133 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:115-133 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:115-133 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 413 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 `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:115` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 4) tigris/agent-harness/cli_anything/tigris/core/access_key.py:35— tigris/agent-harness/cli_anything/tigris/core/access_key.py:35-53 | tigris/agent-harness/cli_anything/tigris/core/iam.py:45-63 | tigris/agent-harness/cli_anything/tigris/core/iam.py:111-129 | tigris/agent-harness/cli_anything/tigris/core/object.py:57-75 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. 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–19 lines × 3) QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:102— QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:102-119 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:105-123 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:102-119 — before extracting anything, compare `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` and `minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 319 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 (19 lines × 3) blender/agent-harness/cli_anything/blender/blender_cli.py:952— blender/agent-harness/cli_anything/blender/blender_cli.py:952-970 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2293-2311 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1082-1100 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (16–18 lines × 17) anygen/agent-harness/cli_anything/anygen/core/session.py:12— anygen/agent-harness/cli_anything/anygen/core/session.py:12-27 | audacity/agent-harness/cli_anything/audacity/core/session.py:15-30 | blender/agent-harness/cli_anything/blender/core/session.py:12-27 | drawio/agent-harness/cli_anything/drawio/core/session.py:21-36 | freecad/agent-harness/cli_anything/freecad/core/session.py:24-41 | gimp/agent-harness/cli_anything/gimp/core/session.py:12-27 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:12-27 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:12-27 | krita/agent-harness/cli_anything/krita/utils/io.py:15-30 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:12-27 | macrocli/agent-harness/cli_anything/macrocli/core/session.py:21-36 | minimax/agent-harness/cli_anything/minimax/core/session.py:13-28 | novita/agent-harness/cli_anything/novita/core/session.py:13-28 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:12-27 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:21-36 | rms/agent-harness/cli_anything/rms/core/session.py:12-27 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:21-36 — before extracting anything, compare `anygen/agent-harness/cli_anything/anygen/core/session.py` and `audacity/agent-harness/cli_anything/audacity/core/session.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `openscreen/agent-harness/cli_anything/openscreen/core/session.py:20` calls `str` and `anygen/agent-harness/cli_anything/anygen/core/session.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 (17–18 lines × 8) blender/agent-harness/cli_anything/blender/blender_cli.py:1122— blender/agent-harness/cli_anything/blender/blender_cli.py:1122-1139 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:783-800 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:725-741 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:432-448 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:463-480 | safari/agent-harness/cli_anything/safari/safari_cli.py:591-608 | videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:348-364 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:482-499 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 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 8 times. 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 lines × 4) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:801— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:801-818 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:1052-1069 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:759-776 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:812-829 — 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. 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 (16–18 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:298— blender/agent-harness/cli_anything/blender/core/preview.py:298-315 | freecad/agent-harness/cli_anything/freecad/core/preview.py:330-345 | openscreen/agent-harness/cli_anything/openscreen/core/preview.py:113-130 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 387 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 `blender/agent-harness/cli_anything/blender/core/preview.py:298` 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, `freecad/agent-harness/cli_anything/freecad/core/preview.py:329` calls `get_project` and `openscreen/agent-harness/cli_anything/openscreen/core/preview.py:113` 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 (17–18 lines × 3) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1206— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1206-1222 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1252-1268 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1307-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. Read the line range as the matched WINDOW rather than a finished unit: at `cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1206` 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) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:616— shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:616-633 | shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:639-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 (17 lines × 58) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:238— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:238-254 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:216-232 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:284-300 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:284-300 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:284-300 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:284-300 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:284-300 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:284-300 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:284-300 | cli-anything-plugin/repl_skin.py:284-300 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:284-300 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:284-300 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:284-300 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:284-300 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:284-300 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:284-300 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:249-265 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:284-300 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:284-300 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:284-300 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:284-300 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:284-300 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:284-300 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:284-300 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:284-300 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:284-300 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:284-300 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:284-300 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:238-254 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:284-300 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:222-238 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:284-300 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:284-300 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:284-300 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:284-300 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:284-300 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:284-300 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:284-300 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:284-300 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:284-300 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:284-300 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:284-300 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:284-300 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:284-300 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:284-300 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:284-300 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:284-300 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:284-300 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:284-300 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:284-300 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:284-300 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:249-265 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:238-254 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:216-232 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:284-300 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:284-300 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:284-300 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:284-300 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 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 (15–17 lines × 18) QGIS/agent-harness/cli_anything/qgis/core/session.py:21— QGIS/agent-harness/cli_anything/qgis/core/session.py:21-37 | anygen/agent-harness/cli_anything/anygen/core/session.py:18-32 | audacity/agent-harness/cli_anything/audacity/core/session.py:21-35 | blender/agent-harness/cli_anything/blender/core/session.py:18-32 | drawio/agent-harness/cli_anything/drawio/core/session.py:27-41 | freecad/agent-harness/cli_anything/freecad/core/session.py:31-45 | gimp/agent-harness/cli_anything/gimp/core/session.py:18-32 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:18-32 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:18-32 | krita/agent-harness/cli_anything/krita/utils/io.py:21-35 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:18-32 | macrocli/agent-harness/cli_anything/macrocli/core/session.py:27-41 | minimax/agent-harness/cli_anything/minimax/core/session.py:19-33 | novita/agent-harness/cli_anything/novita/core/session.py:19-33 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:18-32 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:27-41 | rms/agent-harness/cli_anything/rms/core/session.py:18-32 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:27-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 18 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 18 times. 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `dict` in one and `Any` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7–17 lines × 4) audacity/agent-harness/cli_anything/audacity/core/clips.py:128— audacity/agent-harness/cli_anything/audacity/core/clips.py:128-134 | blender/agent-harness/cli_anything/blender/core/animation.py:102-118 | blender/agent-harness/cli_anything/blender/core/animation.py:236-251 | freecad/agent-harness/cli_anything/freecad/core/body.py:2138-2146 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (32–40 lines × 3) audacity/agent-harness/cli_anything/audacity/core/effects.py:189— audacity/agent-harness/cli_anything/audacity/core/effects.py:189-228 | blender/agent-harness/cli_anything/blender/core/modifiers.py:156-187 | gimp/agent-harness/cli_anything/gimp/core/filters.py:252-283 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. 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 (16–17 lines × 3) chromadb/agent-harness/cli_anything/chromadb/chromadb_cli.py:64— chromadb/agent-harness/cli_anything/chromadb/chromadb_cli.py:64-80 | seaclip/agent-harness/cli_anything/seaclip/seaclip_cli.py:116-131 | tigris/agent-harness/cli_anything/tigris/tigris_cli.py:113-129 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. 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, `tigris/agent-harness/cli_anything/tigris/tigris_cli.py:109` calls `get`, `error` and `chromadb/agent-harness/cli_anything/chromadb/chromadb_cli.py:62` 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–17 lines × 3) REDACTED:197— REDACTED:197-211 | REDACTED:56-72 | REDACTED:54-68 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. 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 (16–17 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:402— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:402-417 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:378-394 — before extracting anything, compare `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 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 `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:402` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–17 lines × 2) blender/agent-harness/cli_anything/blender/core/modifiers.py:290— blender/agent-harness/cli_anything/blender/core/modifiers.py:290-306 | gimp/agent-harness/cli_anything/gimp/core/filters.py:368-382 — 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 `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 (15–16 lines × 3) freecad/agent-harness/cli_anything/freecad/core/body.py:1936— freecad/agent-harness/cli_anything/freecad/core/body.py:1936-1951 | freecad/agent-harness/cli_anything/freecad/core/body.py:1995-2010 | freecad/agent-harness/cli_anything/freecad/core/body.py:2045-2059 — 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 `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–16 lines × 2) blender/agent-harness/cli_anything/blender/core/materials.py:117— blender/agent-harness/cli_anything/blender/core/materials.py:117-132 | inkscape/agent-harness/cli_anything/inkscape/core/gradients.py:108-118 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14–16 lines × 2) gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:86— gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:86-101 | gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:177-190 — both copies are in the same file, so extract the 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–15 lines × 7) audacity/agent-harness/cli_anything/audacity/core/session.py:138— audacity/agent-harness/cli_anything/audacity/core/session.py:138-152 | blender/agent-harness/cli_anything/blender/core/session.py:130-144 | gimp/agent-harness/cli_anything/gimp/core/session.py:130-144 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:130-143 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:126-139 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:137-150 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:126-139 — before extracting anything, compare `audacity/agent-harness/cli_anything/audacity/core/session.py` and `blender/agent-harness/cli_anything/blender/core/session.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 132 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. 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 (15 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:236— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:236-250 | cli-anything-plugin/preview_bundle.py:236-250 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:236-250 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:236-250 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:236-250 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:236-250 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 256 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. 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 (14–15 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:946— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:946-959 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:998-1012 — both copies are in the same file, so extract the 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 `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:946` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–15 lines × 2) openscreen/agent-harness/cli_anything/openscreen/core/preview.py:166— openscreen/agent-harness/cli_anything/openscreen/core/preview.py:166-178 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:191-205 — before extracting anything, compare `openscreen/agent-harness/cli_anything/openscreen/core/preview.py` and `shotcut/agent-harness/cli_anything/shotcut/core/preview.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `openscreen/agent-harness/cli_anything/openscreen/core/preview.py:166` 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 (14 lines × 7) browser/agent-harness/cli_anything/browser/browser_cli.py:426— browser/agent-harness/cli_anything/browser/browser_cli.py:426-439 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:796-809 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:444-457 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:476-489 | safari/agent-harness/cli_anything/safari/safari_cli.py:604-617 | videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:360-373 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:495-508 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times. 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, `browser/agent-harness/cli_anything/browser/browser_cli.py:424` calls `any`, `startswith` and `gimp/agent-harness/cli_anything/gimp/gimp_cli.py:795` 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 (9–14 lines × 7) freecad/agent-harness/cli_anything/freecad/core/assembly.py:52— freecad/agent-harness/cli_anything/freecad/core/assembly.py:52-60 | freecad/agent-harness/cli_anything/freecad/core/draft.py:39-47 | freecad/agent-harness/cli_anything/freecad/core/draft.py:51-59 | freecad/agent-harness/cli_anything/freecad/core/fem.py:52-60 | freecad/agent-harness/cli_anything/freecad/core/parts.py:123-136 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:47-55 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:59-67 — there are 7 copies across 5 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 7 sites; resolving a subset leaves the remainder to drift apart. 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 × 5) drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:121— drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:121-134 | kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:144-157 | kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:209-221 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:138-151 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:203-215 — before extracting anything, compare `kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py` and `shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 163 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 `drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:121` 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 (13–14 lines × 4) libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:24— libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:24-36 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:52-65 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:82-94 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:112-125 — 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, `libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:51` calls `ValueError` and `libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:23` 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–14 lines × 2) lldb/agent-harness/cli_anything/lldb/utils/output.py:21— lldb/agent-harness/cli_anything/lldb/utils/output.py:21-33 | renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py:21-34 — before extracting anything, compare `lldb/agent-harness/cli_anything/lldb/utils/output.py` and `renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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. 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 lines × 13) comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:38— comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:38-50 | comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:74-86 | comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:110-122 | comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:144-156 | REDACTED:42-54 | REDACTED:73-85 | REDACTED:111-123 | REDACTED:142-154 | REDACTED:171-183 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:41-53 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:79-91 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:117-129 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:159-171 — there are 13 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 13 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (13 lines × 12) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:377— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:377-390 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:416-428 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:458-471 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:500-512 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:542-554 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:582-595 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:635-648 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:849-863 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:905-918 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1211-1224 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1257-1270 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1313-1326 — all 12 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 `cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:635` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 5) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:808— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:808-820 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:1059-1071 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:731-743 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:766-778 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:819-831 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. 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) kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py:140— kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py:140-149 | kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py:173-185 | kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py:225-234 — 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 (12–13 lines × 3) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:458— renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:458-469 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1333-1344 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1377-1389 — 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 (14 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:334— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:334-347 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:312-325 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:380-393 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:380-393 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:380-393 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:380-393 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:380-393 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:334-347 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:380-393 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:380-393 | cli-anything-plugin/repl_skin.py:380-393 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:380-393 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:380-393 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:380-393 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:380-393 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:380-393 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:380-393 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:345-358 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:380-393 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:380-393 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:380-393 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:380-393 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:380-393 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:380-393 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:380-393 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:380-393 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:380-393 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:380-393 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:380-393 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:334-347 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:380-393 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:320-333 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:380-393 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:380-393 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:384-397 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:380-393 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:380-393 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:380-393 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:380-393 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:380-393 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:380-393 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:380-393 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:380-393 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:380-393 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:380-393 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:380-393 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:380-393 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:380-393 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:380-393 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:380-393 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:380-393 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:380-393 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:380-393 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:345-358 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:334-347 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:312-325 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:382-395 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:380-393 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:380-393 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:380-393 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:380-393 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 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 × 54) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:149— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:149-160 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:149-160 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:149-160 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:149-160 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:149-160 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:149-160 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:149-160 | cli-anything-plugin/repl_skin.py:149-160 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:149-160 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:149-160 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:149-160 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:149-160 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:149-160 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:149-160 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:128-139 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:149-160 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:149-160 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:149-160 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:149-160 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:149-160 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:149-160 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:149-160 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:149-160 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:149-160 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:149-160 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:149-160 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:149-160 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:149-160 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:149-160 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:154-165 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:149-160 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:149-160 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:149-160 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:149-160 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:149-160 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:149-160 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:149-160 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:149-160 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:149-160 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:149-160 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:149-160 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:149-160 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:149-160 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:149-160 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:149-160 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:149-160 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:149-160 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:149-160 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:128-139 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:150-161 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:149-160 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:149-160 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:149-160 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:149-160 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 413 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. 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 × 51) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:229— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:229-240 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:229-240 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:229-240 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:229-240 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:229-240 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:229-240 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:229-240 | cli-anything-plugin/repl_skin.py:229-240 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:229-240 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:229-240 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:229-240 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:229-240 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:229-240 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:229-240 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:229-240 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:229-240 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:229-240 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:229-240 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:229-240 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:229-240 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:229-240 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:229-240 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:229-240 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:229-240 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:229-240 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:229-240 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:229-240 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:229-240 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:234-245 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:229-240 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:229-240 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:229-240 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:229-240 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:229-240 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:229-240 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:229-240 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:229-240 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:229-240 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:229-240 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:229-240 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:229-240 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:229-240 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:229-240 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:229-240 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:229-240 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:229-240 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:229-240 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:229-240 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:229-240 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:229-240 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:229-240 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 413 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 × 20) QGIS/agent-harness/cli_anything/qgis/core/session.py:20— QGIS/agent-harness/cli_anything/qgis/core/session.py:20-33 | anygen/agent-harness/cli_anything/anygen/core/session.py:17-28 | audacity/agent-harness/cli_anything/audacity/core/session.py:20-31 | blender/agent-harness/cli_anything/blender/core/session.py:17-28 | drawio/agent-harness/cli_anything/drawio/core/session.py:26-37 | eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:37-49 | freecad/agent-harness/cli_anything/freecad/core/session.py:30-42 | gimp/agent-harness/cli_anything/gimp/core/session.py:17-28 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:17-28 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:17-28 | krita/agent-harness/cli_anything/krita/utils/io.py:20-31 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:17-28 | macrocli/agent-harness/cli_anything/macrocli/core/session.py:26-37 | minimax/agent-harness/cli_anything/minimax/core/session.py:18-29 | novita/agent-harness/cli_anything/novita/core/session.py:18-29 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:17-28 | openrefine/agent-harness/cli_anything/openrefine/core/session.py:93-105 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:26-37 | rms/agent-harness/cli_anything/rms/core/session.py:17-28 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:26-37 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 20 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 20 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `dict` in one and `Any` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:50` calls `write` and `anygen/agent-harness/cli_anything/anygen/core/session.py:29` 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 (12 lines × 18) anygen/agent-harness/cli_anything/anygen/core/session.py:16— anygen/agent-harness/cli_anything/anygen/core/session.py:16-27 | audacity/agent-harness/cli_anything/audacity/core/session.py:19-30 | blender/agent-harness/cli_anything/blender/core/session.py:16-27 | drawio/agent-harness/cli_anything/drawio/core/session.py:25-36 | freecad/agent-harness/cli_anything/freecad/core/session.py:28-41 | gimp/agent-harness/cli_anything/gimp/core/session.py:16-27 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:16-27 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:16-27 | krita/agent-harness/cli_anything/krita/utils/io.py:19-30 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:16-27 | macrocli/agent-harness/cli_anything/macrocli/core/session.py:25-36 | minimax/agent-harness/cli_anything/minimax/core/session.py:17-28 | mubu/agent-harness/cli_anything/mubu/mubu_cli.py:140-152 | novita/agent-harness/cli_anything/novita/core/session.py:17-28 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:16-27 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:25-36 | rms/agent-harness/cli_anything/rms/core/session.py:16-27 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:25-36 — before extracting anything, compare `anygen/agent-harness/cli_anything/anygen/core/session.py` and `audacity/agent-harness/cli_anything/audacity/core/session.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `str` in one and `Path` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `anygen/agent-harness/cli_anything/anygen/core/session.py:15` calls `makedirs`, `dirname`, `abspath` and `mubu/agent-harness/cli_anything/mubu/mubu_cli.py:139` 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 (12 lines × 9) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:104— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:104-115 | blender/agent-harness/cli_anything/blender/blender_cli.py:165-176 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:100-111 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:91-102 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:113-124 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:93-104 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:91-102 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:79-90 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:91-102 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 9 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 9 times.
Duplicated block (12 lines × 8) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:463— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:463-474 | blender/agent-harness/cli_anything/blender/blender_cli.py:332-343 | blender/agent-harness/cli_anything/blender/blender_cli.py:546-557 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:482-493 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:422-433 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:510-521 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:310-321 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:428-439 — there are 8 copies across 5 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 8 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (11–12 lines × 2) REDACTED:265— REDACTED:265-276 | REDACTED:294-304 — both copies are in the same file, so extract the 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–12 lines × 2) n8n/agent-harness/cli_anything/n8n/core/versions.py:89— n8n/agent-harness/cli_anything/n8n/core/versions.py:89-96 | n8n/agent-harness/cli_anything/n8n/core/versions.py:158-169 — both copies are in the same file, so extract the 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 `n8n/agent-harness/cli_anything/n8n/core/versions.py:158` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `keep` to `int = 50` in one and `int = 10` 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–12 lines × 2) novita/agent-harness/cli_anything/novita/novita_cli.py:135— novita/agent-harness/cli_anything/novita/novita_cli.py:135-146 | novita/agent-harness/cli_anything/novita/novita_cli.py:190-199 — both copies are in the same file, so extract the 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 × 19) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:37— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:37-47 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:49-59 | audacity/agent-harness/cli_anything/audacity/audacity_cli.py:54-64 | blender/agent-harness/cli_anything/blender/blender_cli.py:53-63 | browser/agent-harness/cli_anything/browser/browser_cli.py:44-54 | comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:48-58 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:49-59 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:50-60 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:72-82 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:52-62 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:50-60 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:36-46 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:50-60 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:38-48 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:39-49 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:37-47 | rms/agent-harness/cli_anything/rms/rms_cli.py:43-53 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:54-64 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:48-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 19 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 19 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `rms/agent-harness/cli_anything/rms/rms_cli.py:38` calls `_get_token`, `get_api_token` and `anygen/agent-harness/cli_anything/anygen/anygen_cli.py:45` 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 × 52) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:234— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:234-243 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:234-243 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:234-243 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:234-243 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:234-243 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:234-243 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:234-243 | cli-anything-plugin/repl_skin.py:234-243 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:234-243 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:234-243 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:234-243 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:234-243 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:234-243 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:234-243 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:234-243 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:234-243 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:234-243 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:234-243 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:234-243 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:234-243 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:234-243 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:234-243 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:234-243 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:234-243 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:234-243 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:234-243 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:234-243 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:234-243 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:239-248 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:234-243 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:234-243 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:234-243 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:234-243 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:234-243 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:234-243 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:234-243 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:234-243 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:234-243 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:234-243 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:234-243 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:234-243 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:234-243 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:234-243 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:234-243 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:234-243 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:234-243 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:234-243 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:237-246 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:234-243 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:234-243 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:234-243 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:234-243 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 413 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:236` calls `extend`, `_meta_lines`, `_display_home_path` and `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:233` 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 lines × 24) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:51— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:51-60 | QGIS/agent-harness/cli_anything/qgis/qgis_cli.py:54-63 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:63-72 | audacity/agent-harness/cli_anything/audacity/audacity_cli.py:77-86 | blender/agent-harness/cli_anything/blender/blender_cli.py:138-147 | browser/agent-harness/cli_anything/browser/browser_cli.py:58-67 | comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:73-82 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:64-73 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:64-73 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:86-95 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:66-75 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:64-73 | live2d/agent-harness/cli_anything/live2d/live2d_cli.py:70-79 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:64-73 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:50-59 | novita/agent-harness/cli_anything/novita/novita_cli.py:59-68 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:64-73 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:52-61 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:53-62 | rms/agent-harness/cli_anything/rms/rms_cli.py:57-66 | safari/agent-harness/cli_anything/safari/safari_cli.py:103-112 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:140-149 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/web_yu_pri_cli.py:55-64 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:62-71 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 24 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 24 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `dict` in one and `dict[str, Any]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9–10 lines × 7) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:86— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:86-94 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:90-98 | browser/agent-harness/cli_anything/browser/browser_cli.py:92-100 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:91-100 | novita/agent-harness/cli_anything/novita/novita_cli.py:86-95 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:93-101 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:87-95 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:104` calls `_require_api_key`, `RuntimeError` and `3MF/agent-harness/cli_anything/threemf/threemf_cli.py:98` 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–10 lines × 3) shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:113— shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:113-122 | shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:164-172 | shotcut/agent-harness/cli_anything/shotcut/core/filters.py:769-776 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `track_index` to `int` in one and `Optional[int] = None` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8–10 lines × 2) renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:541— renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:541-548 | renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:826-835 — both copies are in the same file, so extract the 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 `renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:826` 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 × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:419— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:419-430 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:397-408 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:465-476 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:465-476 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:465-476 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:465-476 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:465-476 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:419-430 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:465-476 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:465-476 | cli-anything-plugin/repl_skin.py:465-476 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:465-476 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:465-476 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:465-476 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:465-476 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:465-476 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:465-476 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:430-441 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:465-476 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:465-476 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:465-476 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:465-476 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:465-476 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:465-476 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:465-476 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:465-476 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:465-476 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:465-476 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:465-476 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:419-430 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:465-476 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:405-416 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:465-476 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:465-476 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:467-478 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:465-476 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:465-476 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:465-476 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:465-476 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:465-476 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:465-476 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:465-476 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:465-476 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:465-476 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:465-476 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:465-476 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:465-476 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:465-476 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:465-476 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:465-476 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:465-476 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:465-476 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:465-476 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:430-441 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:419-430 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:397-408 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:467-478 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:465-476 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:465-476 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:465-476 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:465-476 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 15) seaclip/agent-harness/cli_anything/seaclip/core/activity.py:26— seaclip/agent-harness/cli_anything/seaclip/core/activity.py:26-34 | seaclip/agent-harness/cli_anything/seaclip/core/agents.py:25-33 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:29-37 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:69-77 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:94-102 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:119-127 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:143-151 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:27-35 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:51-59 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:80-88 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:104-112 | seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py:25-33 | seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py:69-77 | seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py:93-101 | seaclip/agent-harness/cli_anything/seaclip/seaclip_cli.py:41-49 — there are 15 copies across 6 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 15 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 10) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:101— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:101-109 | blender/agent-harness/cli_anything/blender/blender_cli.py:162-170 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:90-98 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:88-96 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:110-118 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:90-98 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:88-96 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:76-84 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:88-96 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:79-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 10 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 10 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `musescore/agent-harness/cli_anything/musescore/musescore_cli.py:74` calls `wraps` and `audacity/agent-harness/cli_anything/audacity/audacity_cli.py:99` 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 (9 lines × 9) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:118— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:118-126 | blender/agent-harness/cli_anything/blender/blender_cli.py:179-187 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:114-122 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:105-113 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:127-135 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:107-115 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:105-113 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:105-113 | videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:50-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 9 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 9 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:118` calls `parse_time`, `timecode_to_seconds` and `audacity/agent-harness/cli_anything/audacity/audacity_cli.py:130` 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 (6–9 lines × 5) audacity/agent-harness/cli_anything/audacity/core/effects.py:194— audacity/agent-harness/cli_anything/audacity/core/effects.py:194-202 | blender/agent-harness/cli_anything/blender/core/materials.py:173-179 | blender/agent-harness/cli_anything/blender/core/modifiers.py:161-166 | freecad/agent-harness/cli_anything/freecad/core/materials.py:505-511 | gimp/agent-harness/cli_anything/gimp/core/filters.py:257-262 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `audacity/agent-harness/cli_anything/audacity/core/effects.py:194` 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–9 lines × 2) audacity/agent-harness/cli_anything/audacity/core/export.py:325— audacity/agent-harness/cli_anything/audacity/core/export.py:325-331 | audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:274-282 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8–9 lines × 2) docs/scripts/blender_preview_story_demo.py:399— docs/scripts/blender_preview_story_demo.py:399-406 | docs/scripts/freecad_live_preview_demo.py:4541-4549 — 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 `docs/scripts/blender_preview_story_demo.py:399` 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–9 lines × 2) inkscape/agent-harness/cli_anything/inkscape/core/layers.py:174— inkscape/agent-harness/cli_anything/inkscape/core/layers.py:174-179 | libreoffice/agent-harness/cli_anything/libreoffice/core/impress.py:142-150 — 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 (4–9 lines × 3) sbox/agent-harness/cli_anything/sbox/core/export.py:226— sbox/agent-harness/cli_anything/sbox/core/export.py:226-229 | sbox/agent-harness/cli_anything/sbox/core/export.py:374-380 | sbox/agent-harness/cli_anything/sbox/core/validate.py:143-151 — 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. 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 (8 lines × 60) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:405— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:405-412 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:383-390 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:451-458 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:451-458 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:451-458 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:451-458 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:451-458 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:405-412 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:451-458 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:451-458 | cli-anything-plugin/repl_skin.py:451-458 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:451-458 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:451-458 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:451-458 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:451-458 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:451-458 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:451-458 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:416-423 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:451-458 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:451-458 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:451-458 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:451-458 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:451-458 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:451-458 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:451-458 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:451-458 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:451-458 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:451-458 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:451-458 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:405-412 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:451-458 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:391-398 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:451-458 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:451-458 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:451-458 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:451-458 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:451-458 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:451-458 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:451-458 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:451-458 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:451-458 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:451-458 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:451-458 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:451-458 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:451-458 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:451-458 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:451-458 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:451-458 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:451-458 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:451-458 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:451-458 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:451-458 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:416-423 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:405-412 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:383-390 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:453-460 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:451-458 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:451-458 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:451-458 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:451-458 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 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 (8 lines × 53) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:132— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:132-139 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:132-139 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:132-139 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:132-139 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:132-139 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:132-139 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:132-139 | cli-anything-plugin/repl_skin.py:132-139 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:132-139 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:132-139 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:132-139 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:132-139 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:132-139 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:132-139 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:132-139 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:132-139 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:132-139 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:132-139 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:132-139 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:132-139 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:132-139 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:132-139 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:132-139 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:132-139 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:132-139 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:132-139 | mermaid/agent-harness/cli_anything/mermaid/utils/repl_skin.py:31-38 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:132-139 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:132-139 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:137-144 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:132-139 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:132-139 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:132-139 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:132-139 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:132-139 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:132-139 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:132-139 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:132-139 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:132-139 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:132-139 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:132-139 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:132-139 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:132-139 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:132-139 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:132-139 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:132-139 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:132-139 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:132-139 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:133-140 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:132-139 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:132-139 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:132-139 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:132-139 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 413 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 (8 lines × 12) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:100— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:100-107 | blender/agent-harness/cli_anything/blender/blender_cli.py:161-168 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:89-96 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:87-94 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:109-116 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:89-96 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:87-94 | live2d/agent-harness/cli_anything/live2d/live2d_cli.py:96-103 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:75-82 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:87-94 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:78-85 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:165-172 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 12 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 12 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `live2d/agent-harness/cli_anything/live2d/live2d_cli.py:95` calls `wraps` and `audacity/agent-harness/cli_anything/audacity/audacity_cli.py:99` 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 lines × 5) tigris/agent-harness/cli_anything/tigris/core/access_key.py:70— tigris/agent-harness/cli_anything/tigris/core/access_key.py:70-77 | tigris/agent-harness/cli_anything/tigris/core/access_key.py:94-101 | tigris/agent-harness/cli_anything/tigris/core/access_key.py:172-179 | tigris/agent-harness/cli_anything/tigris/core/bucket.py:104-111 | tigris/agent-harness/cli_anything/tigris/core/object.py:172-179 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7–8 lines × 3) blender/agent-harness/cli_anything/blender/core/objects.py:134— blender/agent-harness/cli_anything/blender/core/objects.py:134-141 | gimp/agent-harness/cli_anything/gimp/core/layers.py:139-145 | inkscape/agent-harness/cli_anything/inkscape/core/shapes.py:280-287 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (6–8 lines × 2) 3MF/agent-harness/cli_anything/threemf/utils/threemf_backend.py:394— 3MF/agent-harness/cli_anything/threemf/utils/threemf_backend.py:394-401 | 3MF/agent-harness/cli_anything/threemf/utils/threemf_backend.py:446-451 — both copies are in the same file, so extract the 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 (13 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:167— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:167-179 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:155-167 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:218-230 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:218-230 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:218-230 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:218-230 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:218-230 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:168-180 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:218-230 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:218-230 | cli-anything-plugin/repl_skin.py:218-230 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:218-230 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:218-230 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:218-230 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:218-230 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:218-230 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:218-230 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:178-190 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:218-230 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:218-230 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:218-230 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:218-230 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:218-230 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:218-230 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:218-230 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:218-230 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:218-230 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:218-230 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:218-230 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:167-179 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:218-230 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:159-171 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:218-230 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:218-230 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:223-235 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:218-230 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:218-230 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:218-230 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:218-230 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:218-230 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:218-230 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:218-230 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:218-230 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:218-230 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:218-230 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:218-230 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:218-230 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:218-230 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:218-230 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:218-230 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:218-230 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:218-230 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:218-230 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:178-190 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:167-179 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:155-167 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:219-231 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:218-230 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:218-230 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:218-230 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:218-230 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:233` calls `extend`, `_meta_lines`, `_display_home_path` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:169` 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 × 24) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:64— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:64-70 | QGIS/agent-harness/cli_anything/qgis/qgis_cli.py:67-73 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:76-82 | audacity/agent-harness/cli_anything/audacity/audacity_cli.py:90-96 | blender/agent-harness/cli_anything/blender/blender_cli.py:151-157 | browser/agent-harness/cli_anything/browser/browser_cli.py:71-77 | comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:86-92 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:78-84 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:77-83 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:99-105 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:79-85 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:77-83 | live2d/agent-harness/cli_anything/live2d/live2d_cli.py:83-89 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:77-83 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:63-69 | novita/agent-harness/cli_anything/novita/novita_cli.py:72-78 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:77-83 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:65-71 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:66-72 | rms/agent-harness/cli_anything/rms/rms_cli.py:70-76 | safari/agent-harness/cli_anything/safari/safari_cli.py:116-122 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:154-160 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/web_yu_pri_cli.py:68-74 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:75-81 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 24 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 24 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `live2d/agent-harness/cli_anything/live2d/live2d_cli.py:95` calls `wraps` and `3MF/agent-harness/cli_anything/threemf/threemf_cli.py:75` 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 × 7) blender/agent-harness/cli_anything/blender/core/lighting.py:36— blender/agent-harness/cli_anything/blender/core/lighting.py:36-42 | blender/agent-harness/cli_anything/blender/core/lighting.py:47-53 | blender/agent-harness/cli_anything/blender/core/materials.py:43-49 | blender/agent-harness/cli_anything/blender/core/objects.py:32-38 | freecad/agent-harness/cli_anything/freecad/core/body.py:52-58 | freecad/agent-harness/cli_anything/freecad/core/materials.py:184-190 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:78-84 — there are 7 copies across 6 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6–7 lines × 5) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:938— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:938-943 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:963-968 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1005-1011 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1031-1036 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1114-1119 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:947` calls `argument` and `cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1123` 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 (7 lines × 5) docs/scripts/blender_orbital_relay_drone_demo.py:172— docs/scripts/blender_orbital_relay_drone_demo.py:172-178 | docs/scripts/blender_orbital_relay_drone_demo.py:180-186 | docs/scripts/blender_orbital_relay_drone_demo.py:209-215 | docs/scripts/blender_orbital_relay_drone_demo.py:227-233 | docs/scripts/blender_orbital_relay_drone_demo.py:390-396 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_orbital_relay_drone_demo.py:172` 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 (3–7 lines × 3) inkscape/agent-harness/cli_anything/inkscape/core/export.py:237— inkscape/agent-harness/cli_anything/inkscape/core/export.py:237-239 | inkscape/agent-harness/cli_anything/inkscape/core/export.py:240-246 | inkscape/agent-harness/cli_anything/inkscape/core/export.py:248-254 — 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 `inkscape/agent-harness/cli_anything/inkscape/core/export.py:237` 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, `inkscape/agent-harness/cli_anything/inkscape/core/export.py:235` calls `rectangle` and `inkscape/agent-harness/cli_anything/inkscape/core/export.py:248` 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–7 lines × 2) lldb/agent-harness/cli_anything/lldb/utils/output.py:35— lldb/agent-harness/cli_anything/lldb/utils/output.py:35-40 | renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py:37-43 — before extracting anything, compare `lldb/agent-harness/cli_anything/lldb/utils/output.py` and `renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 20) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:79— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:79-84 | 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:86-91 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:90-95 | audacity/agent-harness/cli_anything/audacity/audacity_cli.py:111-116 | blender/agent-harness/cli_anything/blender/blender_cli.py:172-177 | browser/agent-harness/cli_anything/browser/browser_cli.py:92-97 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:107-112 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:98-103 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:120-125 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:100-105 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:98-103 | macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:110-115 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:91-96 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:86-91 | novita/agent-harness/cli_anything/novita/novita_cli.py:86-91 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:98-103 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:86-91 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:93-98 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:87-92 | rms/agent-harness/cli_anything/rms/rms_cli.py:85-90 — there are 20 copies across 18 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 20 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 13) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:104— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:104-109 | blender/agent-harness/cli_anything/blender/blender_cli.py:165-170 | browser/agent-harness/cli_anything/browser/browser_cli.py:85-90 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:100-105 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:91-96 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:113-118 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:93-98 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:91-96 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:79-84 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:91-96 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:79-84 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:80-85 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:82-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 13 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 13 times.
Duplicated block (5–6 lines × 3) browser/agent-harness/cli_anything/browser/browser_cli.py:239— browser/agent-harness/cli_anything/browser/browser_cli.py:239-244 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:136-141 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:218-222 — 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. 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 before the matched lines, `ollama/agent-harness/cli_anything/ollama/ollama_cli.py:217` calls `echo` and `ollama/agent-harness/cli_anything/ollama/ollama_cli.py:136` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:408— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:408-414 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:386-392 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:454-460 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:454-460 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:454-460 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:454-460 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:454-460 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:408-414 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:454-460 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:454-460 | cli-anything-plugin/repl_skin.py:454-460 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:454-460 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:454-460 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:454-460 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:454-460 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:454-460 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:454-460 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:419-425 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:454-460 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:454-460 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:454-460 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:454-460 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:454-460 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:454-460 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:454-460 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:454-460 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:454-460 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:454-460 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:454-460 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:408-414 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:454-460 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:394-400 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:454-460 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:454-460 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:456-462 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:454-460 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:454-460 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:454-460 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:454-460 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:454-460 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:454-460 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:454-460 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:454-460 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:454-460 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:454-460 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:454-460 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:454-460 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:454-460 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:454-460 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:454-460 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:454-460 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:454-460 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:454-460 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:419-425 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:408-414 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:386-392 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:456-462 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:454-460 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:454-460 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:454-460 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:454-460 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:453` calls `_c` and `wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:453` 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 (4–5 lines × 8) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:375— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:375-379 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:456-460 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:498-502 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:540-544 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:580-584 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:791-794 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:903-907 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1364-1368 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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, `cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:382` calls `get` and `cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:463` 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 × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:254— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:254-259 | cli-anything-plugin/preview_bundle.py:254-259 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:254-259 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:254-259 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:254-259 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:254-259 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 256 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. 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 × 5) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:292— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:292-296 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:317-321 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:364-369 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:458-462 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:623-627 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:292` 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 (3–5 lines × 3) blender/agent-harness/cli_anything/blender/blender_cli.py:327— blender/agent-harness/cli_anything/blender/blender_cli.py:327-329 | blender/agent-harness/cli_anything/blender/blender_cli.py:385-389 | blender/agent-harness/cli_anything/blender/blender_cli.py:691-695 — 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 (4–5 lines × 5) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1281— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1281-1284 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1309-1312 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1855-1859 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1944-1948 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2028-2031 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1855` 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, `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1278` calls `abspath` and `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1306` 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 × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:140— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:140-147 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:128-135 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:171-178 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:171-178 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:171-178 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:171-178 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:171-178 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:141-148 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:171-178 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:171-178 | cli-anything-plugin/repl_skin.py:171-178 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:171-178 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:171-178 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:171-178 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:171-178 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:171-178 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:171-178 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:151-158 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:171-178 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:171-178 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:171-178 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:171-178 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:171-178 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:171-178 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:171-178 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:171-178 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:171-178 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:171-178 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:171-178 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:140-147 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:171-178 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:132-139 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:171-178 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:171-178 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:176-183 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:171-178 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:171-178 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:171-178 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:171-178 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:171-178 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:171-178 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:171-178 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:171-178 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:171-178 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:171-178 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:171-178 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:171-178 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:171-178 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:171-178 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:171-178 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:171-178 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:171-178 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:171-178 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:151-158 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:140-147 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:128-135 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:172-179 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:171-178 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:171-178 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:171-178 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:171-178 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 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. 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 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:263— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:263-291 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:241-269 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:309-337 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:309-337 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:309-337 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:309-337 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:309-337 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:263-291 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:309-337 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:309-337 | cli-anything-plugin/repl_skin.py:309-337 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:309-337 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:309-337 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:309-337 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:309-337 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:309-337 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:309-337 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:274-302 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:309-337 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:309-337 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:309-337 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:309-337 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:309-337 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:309-337 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:309-337 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:309-337 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:309-337 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:309-337 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:309-337 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:263-291 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:309-337 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:247-277 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:309-337 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:309-337 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:313-341 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:309-337 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:309-337 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:309-337 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:309-337 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:309-337 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:309-337 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:309-337 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:309-337 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:309-337 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:309-337 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:309-337 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:309-337 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:309-337 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:309-337 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:309-337 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:309-337 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:309-337 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:309-337 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:274-302 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:263-291 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:241-269 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:311-339 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:309-337 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:309-337 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:309-337 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:309-337 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 289 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. 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 (8 lines × 52) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:96— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:96-103 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:96-103 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:96-103 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:96-103 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:96-103 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:96-103 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:96-103 | cli-anything-plugin/repl_skin.py:96-103 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:96-103 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:96-103 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:96-103 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:96-103 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:96-103 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:96-103 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:96-103 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:96-103 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:96-103 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:96-103 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:96-103 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:96-103 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:96-103 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:96-103 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:96-103 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:96-103 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:96-103 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:96-103 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:96-103 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:96-103 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:102-109 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:96-103 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:96-103 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:96-103 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:96-103 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:96-103 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:96-103 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:96-103 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:96-103 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:96-103 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:96-103 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:96-103 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:96-103 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:96-103 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:96-103 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:96-103 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:96-103 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:96-103 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:96-103 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:96-103 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:96-103 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:96-103 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:96-103 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:96-103 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 413 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. 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 × 7) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:158— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:158-168 | blender/agent-harness/cli_anything/blender/blender_cli.py:218-228 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:144-154 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:151-161 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:144-154 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:124-134 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:144-154 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 9) audacity/agent-harness/cli_anything/audacity/core/tracks.py:62— audacity/agent-harness/cli_anything/audacity/core/tracks.py:62-66 | blender/agent-harness/cli_anything/blender/core/lighting.py:219-223 | blender/agent-harness/cli_anything/blender/core/lighting.py:384-388 | blender/agent-harness/cli_anything/blender/core/materials.py:200-204 | blender/agent-harness/cli_anything/blender/core/objects.py:270-274 | gimp/agent-harness/cli_anything/gimp/core/layers.py:206-210 | inkscape/agent-harness/cli_anything/inkscape/core/gradients.py:154-158 | inkscape/agent-harness/cli_anything/inkscape/core/transforms.py:150-154 | libreoffice/agent-harness/cli_anything/libreoffice/core/calc.py:17-23 — there are 9 copies across 8 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 9 sites; resolving a subset leaves the remainder to drift apart. 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 (28 lines × 3) blender/agent-harness/cli_anything/blender/blender_cli.py:67— blender/agent-harness/cli_anything/blender/blender_cli.py:67-94 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:85-112 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:68-95 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. 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 × 8) blender/agent-harness/cli_anything/blender/core/lighting.py:227— blender/agent-harness/cli_anything/blender/core/lighting.py:227-240 | blender/agent-harness/cli_anything/blender/core/lighting.py:392-404 | blender/agent-harness/cli_anything/blender/core/materials.py:208-221 | blender/agent-harness/cli_anything/blender/core/objects.py:278-295 | gimp/agent-harness/cli_anything/gimp/core/layers.py:214-229 | inkscape/agent-harness/cli_anything/inkscape/core/gradients.py:140-150 | inkscape/agent-harness/cli_anything/inkscape/core/layers.py:155-167 | inkscape/agent-harness/cli_anything/inkscape/core/shapes.py:323-333 — there are 8 copies across 7 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 8 sites; resolving a subset leaves the remainder to drift apart. 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 (30 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:330— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:330-359 | cli-anything-plugin/preview_bundle.py:330-359 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:330-359 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:330-359 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:330-359 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:330-359 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 256 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. 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 lines × 3) freecad/agent-harness/cli_anything/freecad/core/assembly.py:81— freecad/agent-harness/cli_anything/freecad/core/assembly.py:81-109 | freecad/agent-harness/cli_anything/freecad/core/fem.py:87-117 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:102-133 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from 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 (5 lines × 8) freecad/agent-harness/cli_anything/freecad/core/draft.py:20— freecad/agent-harness/cli_anything/freecad/core/draft.py:20-24 | freecad/agent-harness/cli_anything/freecad/core/import_mod.py:83-87 | freecad/agent-harness/cli_anything/freecad/core/import_mod.py:91-95 | freecad/agent-harness/cli_anything/freecad/core/import_mod.py:99-103 | freecad/agent-harness/cli_anything/freecad/core/measure.py:21-25 | freecad/agent-harness/cli_anything/freecad/core/mesh.py:28-32 | freecad/agent-harness/cli_anything/freecad/core/spreadsheet.py:30-34 | freecad/agent-harness/cli_anything/freecad/core/surface.py:19-23 — there are 8 copies across 6 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. 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) gimp/agent-harness/cli_anything/gimp/gimp_cli.py:125— gimp/agent-harness/cli_anything/gimp/gimp_cli.py:125-139 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:132-146 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:125-139 — before extracting anything, compare `gimp/agent-harness/cli_anything/gimp/gimp_cli.py` and `kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 175 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 (25 lines × 10) freecad/agent-harness/cli_anything/freecad/core/cam.py:173— freecad/agent-harness/cli_anything/freecad/core/cam.py:173-210 | freecad/agent-harness/cli_anything/freecad/core/cam.py:221-254 | freecad/agent-harness/cli_anything/freecad/core/cam.py:264-294 | freecad/agent-harness/cli_anything/freecad/core/cam.py:303-330 | freecad/agent-harness/cli_anything/freecad/core/cam.py:341-378 | freecad/agent-harness/cli_anything/freecad/core/fem.py:125-149 | freecad/agent-harness/cli_anything/freecad/core/fem.py:203-230 | freecad/agent-harness/cli_anything/freecad/core/fem.py:280-307 | freecad/agent-harness/cli_anything/freecad/core/fem.py:316-343 | freecad/agent-harness/cli_anything/freecad/core/fem.py:525-552 — there are 10 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 10 sites; resolving a subset leaves the remainder to drift apart. 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 (21 lines × 4) freecad/agent-harness/cli_anything/freecad/core/cam.py:536— freecad/agent-harness/cli_anything/freecad/core/cam.py:536-570 | freecad/agent-harness/cli_anything/freecad/core/cam.py:622-654 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:574-594 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:602-622 — 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. 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.
Coverage not measured — .NET and JavaScript/TypeScript suite — Coverage NOT MEASURED: the .NET half could not be measured — no coverage produced (collector absent, or test run exceeded the inline budget); the JavaScript/TypeScript half could not be measured — the jest suite in sketch/agent-harness/ ran and passed but wrote no lcov report. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
Type Safety — 0 typed · 6 plain JS — the untyped files are sketch/agent-harness/src/builder.js, sketch/agent-harness/src/cli.js, sketch/agent-harness/src/layout.js, sketch/agent-harness/src/primitives.js, sketch/agent-harness/tests/build.test.js, sketch/agent-harness/tests/security.test.js.
R10 · Code Duplication· Duplicated block with local edits (13 matched lines × 2 locations) · ×1
Duplicated block with local edits (13 matched lines × 2 locations) sketch/agent-harness/src/layout.js:78— sketch/agent-harness/src/layout.js:78 · sketch/agent-harness/src/layout.js:133 — the two spans are one implementation copied and then locally edited — 94 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (8 matched lines × 2 locations) · ×1
Duplicated block with local edits (8 matched lines × 2 locations) sketch/agent-harness/src/primitives.js:86— sketch/agent-harness/src/primitives.js:86 · sketch/agent-harness/src/primitives.js:103 — the two spans are one implementation copied and then locally edited — 53 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Complex function buildLayer (cyclomatic 28, cognitive 24) sketch/agent-harness/src/builder.js:190— buildLayer has cyclomatic complexity 28 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function layoutVerticalStack (cyclomatic 25, cognitive 28) sketch/agent-harness/src/layout.js:78— layoutVerticalStack has cyclomatic complexity 25 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function layoutHorizontalStack (cyclomatic 23, cognitive 32) sketch/agent-harness/src/layout.js:133— layoutHorizontalStack has cyclomatic complexity 23 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function intrinsicSize (cyclomatic 22, cognitive 23) sketch/agent-harness/src/layout.js:40— intrinsicSize has cyclomatic complexity 22 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function build (cyclomatic 14, cognitive 16) sketch/agent-harness/src/builder.js:326— build has cyclomatic complexity 14 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function createLabeledRectangle (cyclomatic 12, cognitive 11) sketch/agent-harness/src/primitives.js:222— createLabeledRectangle has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function createText (cyclomatic 12, cognitive 10) sketch/agent-harness/src/primitives.js:122— createText has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function resolveTokenValue (cyclomatic 11, cognitive 10) sketch/agent-harness/src/builder.js:126— resolveTokenValue has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
No lint or typecheck script — test ✓ · lint ✗ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
Orphaned file sbox/agent-harness/cli_anything/sbox/core/export.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 minimax/agent-harness/cli_anything/minimax/utils/repl_skin.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 videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.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 anygen/agent-harness/cli_anything/anygen/anygen_cli.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 slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs: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 freecad/agent-harness/cli_anything/freecad/core/techdraw.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 ollama/agent-harness/cli_anything/ollama/ollama_cli.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 freecad/agent-harness/cli_anything/freecad/core/cam.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 freecad/agent-harness/cli_anything/freecad/core/assembly.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 safari/agent-harness/scripts/extract_tools.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 jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.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 sbox/agent-harness/cli_anything/sbox/core/project.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 freecad/agent-harness/cli_anything/freecad/core/import_mod.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 krita/agent-harness/cli_anything/krita/core/export.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 renderdoc/agent-harness/cli_anything/renderdoc/core/diff.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 freecad/agent-harness/cli_anything/freecad/core/spreadsheet.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 anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.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 krita/agent-harness/cli_anything/krita/utils/krita_backend.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 iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.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 krita/agent-harness/cli_anything/krita/core/project.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 godot/agent-harness/cli_anything/godot/godot_cli.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 tigris/agent-harness/cli_anything/tigris/utils/tigris_backend.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 pm2/agent-harness/cli_anything/pm2/pm2_cli.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 musescore/agent-harness/cli_anything/musescore/utils/mscx_xml.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 unimol_tools/agent-harness/cli_anything/unimol_tools/core/models_manager.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.
Duplicated predicate slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:353— `hand != null && (hand.InCardPlay || hand.CurrentMode != NPlayerHand.Mode.Play)` appears character-identically in 2 files — slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerActions.cs. 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 slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:530— `merchUI != null && !merchUI.Inventory.IsOpen` appears character-identically in 3 files — slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs. 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 slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:417— `player.Character.ShouldAlwaysShowStarCounter || combatState.Stars > 0` appears character-identically in 2 files — slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs. 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 slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:101— `playerHand != null && playerHand.IsInCardSelection` appears character-identically in 2 files — slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs. 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 ollama/agent-harness/cli_anything/ollama/core/generate.py:81— `"message" in chunk and "content" in chunk["message"]` appears character-identically in 2 files — ollama/agent-harness/cli_anything/ollama/core/generate.py, ollama/agent-harness/cli_anything/ollama/ollama_cli.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 gimp/agent-harness/cli_anything/gimp/core/project.py:82— `"version" not in project or "canvas" not in project` appears character-identically in 2 files — gimp/agent-harness/cli_anything/gimp/core/project.py, krita/agent-harness/cli_anything/krita/core/project.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 joplin/agent-harness/setup.py:23— `__name__ == "__main__" and _handle_metadata_query(sys.argv)` appears character-identically in 3 files — joplin/agent-harness/setup.py, mubu/agent-harness/setup.py, zotero/agent-harness/setup.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 macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py:332— `api_key or os.environ.get("MACROCLI_API_KEY", "")` appears character-identically in 2 files — macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py, macrocli/agent-harness/cli_anything/macrocli/core/parameterize.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 macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py:333— `base_url or os.environ.get("MACROCLI_BASE_URL", "")` appears character-identically in 2 files — macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py, macrocli/agent-harness/cli_anything/macrocli/core/parameterize.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 blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:158— `bundle_kind and manifest.get("bundle_kind") != bundle_kind` appears character-identically in 6 files — blender/agent-harness/cli_anything/blender/utils/preview_bundle.py, cli-anything-plugin/preview_bundle.py, freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py, openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.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 audacity/agent-harness/cli_anything/audacity/core/effects.py:157— `category and info["category"] != category` appears character-identically in 5 files — audacity/agent-harness/cli_anything/audacity/core/effects.py, blender/agent-harness/cli_anything/blender/core/modifiers.py, gimp/agent-harness/cli_anything/gimp/core/filters.py, shotcut/agent-harness/cli_anything/shotcut/core/filters.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 kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:311— `category and spec.get("category") != category` appears character-identically in 2 files — kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py, obs-studio/agent-harness/cli_anything/obs_studio/core/filters.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 shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:176— `clip_index < 0 or clip_index >= len(clip_entries)` appears character-identically in 3 files — shotcut/agent-harness/cli_anything/shotcut/core/compositing.py, shotcut/agent-harness/cli_anything/shotcut/core/filters.py, shotcut/agent-harness/cli_anything/shotcut/core/timeline.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 audacity/agent-harness/cli_anything/audacity/core/clips.py:135— `clip_index < 0 or clip_index >= len(clips)` appears character-identically in 3 files — audacity/agent-harness/cli_anything/audacity/core/clips.py, kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py, kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.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 blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:426— `command_finished_at or bundle_manifest.get("created_at") or datetime.now(timezone.utc).isoformat().replace("+00:00", "Z")` appears character-identically in 6 files — blender/agent-harness/cli_anything/blender/utils/preview_bundle.py, cli-anything-plugin/preview_bundle.py, freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py, openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.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 sbox/agent-harness/cli_anything/sbox/core/prefab.py:302— `component_guid and comp.get( "__guid" ) == component_guid` appears character-identically in 2 files — sbox/agent-harness/cli_anything/sbox/core/prefab.py, sbox/agent-harness/cli_anything/sbox/core/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 sbox/agent-harness/cli_anything/sbox/core/prefab.py:277— `component_guid is None and component_type is None` appears character-identically in 2 files — sbox/agent-harness/cli_anything/sbox/core/prefab.py, sbox/agent-harness/cli_anything/sbox/core/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 sbox/agent-harness/cli_anything/sbox/core/prefab.py:305— `component_type and comp.get( "__type" ) == component_type` appears character-identically in 2 files — sbox/agent-harness/cli_anything/sbox/core/prefab.py, sbox/agent-harness/cli_anything/sbox/core/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 blender/agent-harness/cli_anything/blender/core/preview.py:776— `current_fingerprint and current_fingerprint == last_rendered` appears character-identically in 3 files — blender/agent-harness/cli_anything/blender/core/preview.py, freecad/agent-harness/cli_anything/freecad/core/preview.py, shotcut/agent-harness/cli_anything/shotcut/core/preview.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 blender/agent-harness/cli_anything/blender/core/preview.py:217— `current_link.is_dir() and not current_link.is_symlink()` appears character-identically in 3 files — blender/agent-harness/cli_anything/blender/core/preview.py, freecad/agent-harness/cli_anything/freecad/core/preview.py, shotcut/agent-harness/cli_anything/shotcut/core/preview.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 blender/agent-harness/cli_anything/blender/core/preview.py:216— `current_link.is_symlink() or current_link.exists()` appears character-identically in 3 files — blender/agent-harness/cli_anything/blender/core/preview.py, freecad/agent-harness/cli_anything/freecad/core/preview.py, shotcut/agent-harness/cli_anything/shotcut/core/preview.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 gimp/agent-harness/cli_anything/gimp/core/filters.py:327— `filter_index < 0 or filter_index >= len(filters)` appears character-identically in 3 files — gimp/agent-harness/cli_anything/gimp/core/filters.py, kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py, shotcut/agent-harness/cli_anything/shotcut/core/filters.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 browser/agent-harness/cli_anything/browser/core/page.py:86— `isinstance(result, dict) and "url" in result` appears character-identically in 2 files — browser/agent-harness/cli_anything/browser/core/page.py, tigris/agent-harness/cli_anything/tigris/utils/tigris_backend.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 blender/agent-harness/cli_anything/blender/core/preview.py:151— `isinstance(value, dict) and isinstance(base.get(key), dict)` appears character-identically in 3 files — blender/agent-harness/cli_anything/blender/core/preview.py, freecad/agent-harness/cli_anything/freecad/core/preview.py, shotcut/agent-harness/cli_anything/shotcut/core/preview.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 wavetone/agent-harness/cli_anything/wavetone/core/project.py:165— `isinstance(value, float) and not math.isfinite(value)` appears character-identically in 2 files — wavetone/agent-harness/cli_anything/wavetone/core/project.py, wavetone/agent-harness/cli_anything/wavetone/core/session.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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 15 significant file(s) lose their only recent owner: nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/gpu_trace.py, nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py, lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py, lldb/agent-harness/cli_anything/lldb/lldb_cli.py, nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py, nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/discovery.py, unrealinsights/agent-harness/cli_anything/unrealinsights/utils/unrealinsights_backend.py, unrealinsights/agent-harness/cli_anything/unrealinsights/core/export.py (+7 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 10 significant file(s) lose their only recent owner: macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py, macrocli/agent-harness/cli_anything/macrocli/core/recorder.py, macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py, macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py, macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py, macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py, macrocli/agent-harness/cli_anything/macrocli/core/macro_model.py, macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py (+2 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 7 significant file(s) lose their only recent owner: calibre/agent-harness/cli_anything/calibre/calibre_cli.py, calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py, REDACTED, calibre/agent-harness/cli_anything/calibre/core/library.py, calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py, calibre/agent-harness/cli_anything/calibre/core/formats.py, calibre/agent-harness/cli_anything/calibre/core/custom.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 5 significant file(s) lose their only recent owner: wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py, wavetone/agent-harness/cli_anything/wavetone/wavetone_cli.py, wavetone/agent-harness/cli_anything/wavetone/core/project.py, wavetone/agent-harness/cli_anything/wavetone/utils/wavetone_backend.py, wavetone/agent-harness/cli_anything/wavetone/core/audio.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 5 significant file(s) lose their only recent owner: comfyui/agent-harness/cli_anything/comfyui/core/queue.py, comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py, comfyui/agent-harness/cli_anything/comfyui/core/models.py, comfyui/agent-harness/cli_anything/comfyui/core/workflows.py, comfyui/agent-harness/cli_anything/comfyui/core/images.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 4 significant file(s) lose their only recent owner: firefly-iii/agent-harness/cli_anything/firefly_iii/utils/firefly_iii_backend.py, firefly-iii/agent-harness/cli_anything/firefly_iii/core/bills.py, firefly-iii/agent-harness/cli_anything/firefly_iii/core/budgets.py, firefly-iii/agent-harness/cli_anything/firefly_iii/core/piggy_banks.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #7 — If anonymized user #7 becomes unavailable, 4 significant file(s) lose their only recent owner: QGIS/agent-harness/cli_anything/qgis/qgis_cli.py, QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py, QGIS/agent-harness/cli_anything/qgis/core/layouts.py, QGIS/agent-harness/cli_anything/qgis/core/export.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #8 — If anonymized user #8 becomes unavailable, 4 significant file(s) lose their only recent owner: musescore/agent-harness/cli_anything/musescore/core/instruments.py, musescore/agent-harness/cli_anything/musescore/core/parts.py, musescore/agent-harness/cli_anything/musescore/core/project.py, musescore/agent-harness/cli_anything/musescore/core/media.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #9 — If anonymized user #9 becomes unavailable, 3 significant file(s) lose their only recent owner: siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py, siyuan/agent-harness/cli_anything/siyuan/core/client.py, siyuan/agent-harness/cli_anything/siyuan/core/session.py. Pair on, review, or document these before any departure.
Silent fallback default in catch slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:193— `IsMultiplayerRun` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Helpers.cs:32— `SafeGetText` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch cli-hub/cli_hub/analytics.py:100— `_stdin_is_tty` swallows every exception into `return False` — 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.
Silent fallback default in catch cli-hub/cli_hub/analytics.py:120— `_read_process_cmdline` 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.
Silent fallback default in catch cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/ca_backend.py:38— `get_version` swallows every exception into `return 'unknown'` — 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.
Silent fallback default in catch nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/discovery.py:77— `_fixed_windows_drive_roots` 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.
Silent fallback default in catch REDACTED:31— `_get_local_ip` swallows every exception into `return '127.0.0.1'` — 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.
Silent fallback default in catch safari/agent-harness/scripts/extract_tools.py:483— `_extract_pkg_version` swallows every exception into `return 'unknown'` — 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.
Silent fallback default on parse failure anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:51— `load_config` returns `{}` when `(json.JSONDecodeError, IOError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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.
Silent fallback default on parse failure cli-hub/cli_hub/installer.py:99— `_command_exists` returns `False` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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.
Silent fallback default on parse failure minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:218— `load_config` returns `{}` when `(json.JSONDecodeError, IOError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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.
Silent fallback default on parse failure novita/agent-harness/cli_anything/novita/utils/novita_backend.py:33— `load_config` returns `{}` when `(json.JSONDecodeError, IOError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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.
Silent fallback default on parse failure rms/agent-harness/cli_anything/rms/utils/rms_backend.py:33— `load_config` returns `{}` when `(json.JSONDecodeError, IOError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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.
Silent fallback default on parse failure shotcut/agent-harness/cli_anything/shotcut/core/media.py:128— `_parse_fps` returns `0.0` when `(ValueError, ZeroDivisionError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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.
Silent fallback default on parse failure REDACTED:182— `parse_revision_generation` returns `0` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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.
Silent fallback default on parse failure REDACTED:286— `parse_child_refs` returns `[]` when `json.JSONDecodeError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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.
redundant comment sketch/agent-harness/src/builder.js:367— "Build sketch layers" repeats the code it sits on: 3 of its 3 words (build, sketch, layers) are already in `const sketchLayers = buildLayerTree(layers, layoutResults, tokens);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:639— "Event body text" repeats the code it sits on: 3 of its 3 words (event, body, text) are already in `state["body"] = SafeGetText(() => eventModel.Description);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1255— "Already-selected cards (in the SelectedHandCardContainer)" repeats the code it sits on: 5 of its 6 words (selected, cards, hand, card, container) are already in `var selectedContainer = hand.GetNodeOrNull<Godot.Control>("%SelectedHandCardContainer");`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 22 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (91 single-owned of 529 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; 529 of the 1037 production source files in this repository met that bar). They are anonymized user #10 (2 file(s)), anonymized user #11 (2 file(s)), anonymized user #12 (2 file(s)), anonymized user #13 (2 file(s)), anonymized user #14 (2 file(s)), anonymized user #15 (2 file(s)) (+16 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py, cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/ca_backend.py, wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py, wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py, godot/agent-harness/cli_anything/godot/utils/repl_skin.py, godot/agent-harness/cli_anything/godot/core/export.py, sbox/agent-harness/cli_anything/sbox/core/codegen.py, sbox/agent-harness/cli_anything/sbox/core/session.py (+26 more).
D28 · Secrets (history)· Rotate the exposed credentials · ×1
REDACTED
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 202 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: sbox/agent-harness/cli_anything/sbox/core/export.py, minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py, videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py, anygen/agent-harness/cli_anything/anygen/anygen_cli.py, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs, freecad/agent-harness/cli_anything/freecad/core/techdraw.py, ollama/agent-harness/cli_anything/ollama/ollama_cli.py, freecad/agent-harness/cli_anything/freecad/core/cam.py (and 194 more) (262 orphaned of 529 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; 529 of the 1037 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.
M2 · Architecture documentation· ADRs not easily discoverable · ×1
ADRs not easily discoverable — 1 ADR-shaped document(s) detected by content — `safari/agent-harness/HARNESS.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.
Logging is not universal — Only 2/71 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `3MF/agent-harness`, `QGIS/agent-harness`, `adguardhome/agent-harness`, `anygen/agent-harness` and 64 more.
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 7 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 sketch/agent-harness/package.json:16— `sketch/agent-harness/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
Changelog looks stale/thin — The changelog this check read carries 2 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1d7d9-4f0a-734a-8349-cbd54134b86f · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 102 · Warnings: 1471 · Recommendations: 294 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 02:18 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.