Public report of DaveGreen-Games/ShapeEngine, published 17 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 report Measured 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, 17 November 2026, 00:14 UTC · Survey ID cd_f564bae2e48b43579644792e4838c733

DaveGreen-Games/ShapeEngine

Measured 17 November 2026, 00:14 UTC, at code version 401f175

First survey, so nothing to compare with yet Boundary Type-Coupling: not measured

Boundary Type-Coupling is not measured: Bounded contexts not declared.

CAI score 49.0out of 100 Weak
CriticalWeakAdequateStrongExemplary

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: 161,234 lines of product code in 3 projects, tests not counted · Estimated rebuild effort: about 2.6 person-years · Weakest lens: Performance, 45.0

Findings by how serious they are

31 critical 1976 serious 122 minor

2 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

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 00:14 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 ▸

57of 57 dimensions measured by tools.
2114of 2129 findings point to an exact file and line, so you can open each one in the code. The other 15 concern the repository as a whole, such as missing documentation.
57dimensions across 6 lenses, read from 161,234 lines of product code in 3 projects.
Chapters

Executive summary

DaveGreen-Games/ShapeEngine falls short of our standard for production, held back most by its Performance lens, the way the code guards its speed and its use of resources. It scores 49.0 out of 100 and is rated Weak, and 17 of its 31 critical findings are security problems in the build pipeline and in its automatic dependency updates.

Performance, at 45.0, is the weakest lens and counts most in the score. The best first step is removing the blocking calls, worth about 4.5 points. Adding automated security scanning is another step, worth about 2.0 points. Raising Performance to 70 would lift the score to about 52.8.

Fourteen pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Two secrets can leak from the build pipeline, and one automatic update takes new releases before a bad one can be spotted. Pinning each tool to an exact version, limiting each secret to its own step and setting a waiting period for automatic updates would close these risks. The 12 data fields that are written but never read need removing.

The product code is 161,234 lines, about €380,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 for The 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.
Performance 45.0 · counts for 46%Production Readiness 47.9 · counts for 25%Architecture 53.2 · counts for 14%Maturity 56.9 · counts for 8%Security and Compliance 60.9 · counts for 4%Code Health 67.5 · counts for 2%

If Performance rose from 45.0 to 70, the lowest score rated Strong, the score would rise from 49.0 to about 52.8.

Code composition: what the lines of code are
Business logic 60%Supporting code 40%
Rebuild cost: about €380,000 · Estimate
Cost to rebuild€120,000 to €630,000, for 2,022 to 6,635 hours of work, about 2.6 person-years for 1 to 5 engineers
Difficulty of the problemStandard, 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 49. 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.
SizeLarge: 161,234 lines of product code, of which 17% is declarations and boilerplate, 23% straight logic and 60% logic with branches
Comment linesThe estimate prices 104,059 lines. Comment lines count towards the size of 161,234 lines but aren't priced as work.
What it is notNot 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
Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
Raises the score by about 4.5 points · Medium effort · Async & latency hygiene
2
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with ResourcePacker.csproj.
Raises the score by about 1.1 points · Low effort · ADR Quality
3
Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Raises the score by about 2.0 points · Medium effort · Security & performance tooling

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 €380,000 to build again, about 2.6 person-years of work. Its weakest lens is Performance, at 45.0 (Weak). Performance is about whether the code is written and measured with speed in mind. Because the weakest lens counts most in the score, work on Performance also moves the score most.
Based on: the rebuild estimate · the Performance grade · how much each lens counts
What to do: Start with the Performance actions in Top priorities.
If you do one thing first · First action
Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult(). Of all the actions in this report, it raises the score most for the work it takes: about 4.5 points for medium effort. 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.0 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 8% to 17% on every change. The history of the code shows how much it changes: about 259 lines over the last 90 days, which is about 1,050 lines a year. At that pace, the extra work comes to an estimated 0.2 to 1.2 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch ResourcePacker ResourcePacker ShapeEngine ShapeEngine

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.

39 modules, with 310 dependencies between them. One loop runs through 25 of the modules, marked above the diagonal.

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.
uses →1 ResourcePacker2 ShapeEngine.Color3 ShapeEngine.Content4 ShapeEngine.Core.Logging5 ShapeEngine.Pool6 ShapeEngine.Stats7 ShapeEngine.Core.BackendInterfaces8 ShapeEngine.Random9 ShapeEngine.ShapeClipper10 ShapeEngine.Timing11 ShapeEngine.Geometry.TriangulationDef12 ShapeEngine.Serialization13 ShapeEngine.Geometry.TriangleDef14 ShapeEngine.Geometry.SegmentsDef15 ShapeEngine.Geometry.SegmentDef16 ShapeEngine.Geometry.RayDef17 ShapeEngine.Geometry.QuadDef18 ShapeEngine.Geometry.PolylineDef19 ShapeEngine.Geometry.PointsDef20 ShapeEngine.Geometry.PolygonDef21 ShapeEngine.Geometry.LineDef22 ShapeEngine.Geometry.CollisionSystem.CollisionHandlerDef23 ShapeEngine.Geometry.CollisionSystem24 ShapeEngine.Geometry25 ShapeEngine.Geometry.CircleDef26 ShapeEngine.Core.Structs27 ShapeEngine.Geometry.CellCollision28 ShapeEngine.Input29 ShapeEngine.Pathfinding30 ShapeEngine.Screen31 ShapeEngine.Audio32 ShapeEngine.Core.GameDef33 ShapeEngine.Core34 ShapeEngine.Geometry.RectDef35 ShapeEngine.StaticLib36 ShapeEngine.Text37 ShapeEngine.UI38 ShapeEngine.Achievements39 ShapeEngine.Effects
1 ResourcePacker
2 ShapeEngine.Color
3 ShapeEngine.Content
4 ShapeEngine.Core.Logging
5 ShapeEngine.Pool
6 ShapeEngine.Stats
7 ShapeEngine.Core.BackendInterfaces2
8 ShapeEngine.Random121
9 ShapeEngine.ShapeClipper22131222
10 ShapeEngine.Timing161
11 ShapeEngine.Geometry.TriangulationDef1111111111153121
12 ShapeEngine.Serialization3
13 ShapeEngine.Geometry.TriangleDef1111111111691512
14 ShapeEngine.Geometry.SegmentsDef111211111154121
15 ShapeEngine.Geometry.SegmentDef11111111168262
16 ShapeEngine.Geometry.RayDef1111111165112
17 ShapeEngine.Geometry.QuadDef1111111111691812
18 ShapeEngine.Geometry.PolylineDef1211111131168162
19 ShapeEngine.Geometry.PointsDef111111111132111
20 ShapeEngine.Geometry.PolygonDef1121113111416101612
21 ShapeEngine.Geometry.LineDef11111111651112
22 ShapeEngine.Geometry.CollisionSystem.CollisionHandlerDef1111111113111
23 ShapeEngine.Geometry.CollisionSystem356545155135926
24 ShapeEngine.Geometry32443331535323
25 ShapeEngine.Geometry.CircleDef11121111231710913
26 ShapeEngine.Core.Structs111234
27 ShapeEngine.Geometry.CellCollision14
28 ShapeEngine.Input26
29 ShapeEngine.Pathfinding1111111154
30 ShapeEngine.Screen451266
31 ShapeEngine.Audio121
32 ShapeEngine.Core.GameDef11985131
33 ShapeEngine.Core411112041316
34 ShapeEngine.Geometry.RectDef31111111111691131
35 ShapeEngine.StaticLib121431
36 ShapeEngine.Text9611
37 ShapeEngine.UI1116
38 ShapeEngine.Achievements222
39 ShapeEngine.Effects117211
Uses a module listed above itPart of a loopThe module itself
1 ResourcePacker2 ShapeEngine.Color3 ShapeEngine.Content4 ShapeEngine.Core.Logging5 ShapeEngine.Pool6 ShapeEngine.Stats7 ShapeEngine.Core.BackendInterfaces8 ShapeEngine.Random9 ShapeEngine.ShapeClipper10 ShapeEngine.Timing11 ShapeEngine.Geometry.TriangulationDef12 ShapeEngine.Serialization13 ShapeEngine.Geometry.TriangleDef14 ShapeEngine.Geometry.SegmentsDef15 ShapeEngine.Geometry.SegmentDef16 ShapeEngine.Geometry.RayDef17 ShapeEngine.Geometry.QuadDef18 ShapeEngine.Geometry.PolylineDef19 ShapeEngine.Geometry.PointsDef20 ShapeEngine.Geometry.PolygonDef21 ShapeEngine.Geometry.LineDef22 ShapeEngine.Geometry.CollisionSystem.CollisionHandlerDef23 ShapeEngine.Geometry.CollisionSystem24 ShapeEngine.Geometry25 ShapeEngine.Geometry.CircleDef26 ShapeEngine.Core.Structs27 ShapeEngine.Geometry.CellCollision28 ShapeEngine.Input29 ShapeEngine.Pathfinding30 ShapeEngine.Screen31 ShapeEngine.Audio32 ShapeEngine.Core.GameDef33 ShapeEngine.Core34 ShapeEngine.Geometry.RectDef35 ShapeEngine.StaticLib36 ShapeEngine.Text37 ShapeEngine.UI38 ShapeEngine.Achievements39 ShapeEngine.EffectsResourcePacker1ShapeEngine.Color2ShapeEngine.Content3ShapeEngine.Core.Logging4ShapeEngine.Pool5ShapeEngine.Stats6ShapeEngine.Core.BackendInterfaces7ShapeEngine.Random8ShapeEngine.ShapeClipper9ShapeEngine.Timing10ShapeEngine.Geometry.TriangulationDef11ShapeEngine.Serialization12ShapeEngine.Geometry.TriangleDef13ShapeEngine.Geometry.SegmentsDef14ShapeEngine.Geometry.SegmentDef15ShapeEngine.Geometry.RayDef16ShapeEngine.Geometry.QuadDef17ShapeEngine.Geometry.PolylineDef18ShapeEngine.Geometry.PointsDef19ShapeEngine.Geometry.PolygonDef20ShapeEngine.Geometry.LineDef21ShapeEngine.Geometry.CollisionSystem.CollisionHandlerDef22ShapeEngine.Geometry.CollisionSystem23ShapeEngine.Geometry24ShapeEngine.Geometry.CircleDef25ShapeEngine.Core.Structs26ShapeEngine.Geometry.CellCollision27ShapeEngine.Input28ShapeEngine.Pathfinding29ShapeEngine.Screen30ShapeEngine.Audio31ShapeEngine.Core.GameDef32ShapeEngine.Core33ShapeEngine.Geometry.RectDef34ShapeEngine.StaticLib35ShapeEngine.Text36ShapeEngine.UI37ShapeEngine.Achievements38ShapeEngine.Effects39212122131222161111111111115312131111111111691512111211111154121111111111682621111111165112111111111169181212111111311681621111111111321111121113111416101612111111116511121111111113111356545155135926324433315353231112111123171091311123414261111111154451266121119851314111120413163111111111169113112143196111116222117211

At a glance — Code Health · 67.5 · Adequate · gated by D4 ·

At a glance — Architecture · 53.2 · Adequate · gated by D26, AX2, AX5 ·

At a glance — Maturity · 56.9 · Adequate · gated by M2 ·

At a glance — Readiness · 47.9 · Weak · gated by D8, P3 ·

At a glance — Security · 60.9 · Adequate · gated by D36 ·

At a glance — Performance · 45.0 · Weak ·

Security & Compliance — OWASP Top-10 mapping

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 categoryFindingsSeverity
A05:2025 — Injection23High / Critical
A03:2025 — Software Supply Chain Failures8Medium

Roadmap

Top priorities: Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult(); Resolve the 1 No automated tests finding(s) in Code Coverage; Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().+4.5 ptsMediumAsync & latency hygiene
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with ResourcePacker.csproj.+1.1 ptsLowADR Quality
Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+2.0 ptsMediumSecurity & performance tooling
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+1.6 ptsMediumRelease Hygiene
Resolve the 1 No automated tests finding(s) in Code Coverage.+3.2 ptsHighCode Coverage
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with ShapeEngine.csproj.+0.7 ptsLowProject Cohesion
Resolve the 1 Split ShapeEngine finding(s) in Project Cohesion — start with ShapeEngine.csproj.+0.7 ptsLowProject Cohesion
Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race.+1.3 ptsMediumStateful singletons

File quality

Per-file score 0–10 — a quality signature. Of 269 files carrying findings, judged against the Production bar: 3% slop · 76% mixed · 21% near-clean.

FileScoreBandWorst signal
Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs1.1SlopExplicit Debt: WriteOnlyPrivateField
Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs1.2SlopExplicit Debt: WriteOnlyPrivateField
REDACTED1.3SlopStatic Analysis (SAST): High: REDACTED
Examples/Scenes/ExampleScenes/InputExample.cs2.8SlopExplicit Debt: WriteOnlyPrivateField
Examples/Scenes/ExampleScenes/DelaunayExample.cs3.1SlopExplicit Debt: WriteOnlyPrivateField
Examples/Scenes/ExampleScenes/PolylineInflationExample.cs3.2SlopExplicit Debt: WriteOnlyPrivateField
Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs3.6SlopExplicit Debt: WriteOnlyPrivateField
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
Examples/Scenes/ExampleScenes/CameraAreaDrawExample.cs4.6MixedExplicit Debt: WriteOnlyPrivateField
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
ShapeEngine/Geometry/PolygonDef/Polygon.cs5.5MixedGod Classes: TooManyMethods: Polygon
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
ShapeEngine/Core/SpawnArea.cs5.9MixedCyclomatic Complexity: SpawnArea.Update (cyclomatic 16)
ShapeEngine/Input/InputTypeGamepadButton.cs5.9MixedCode Duplication: Edited copies of one member (8 members, 6+ corresponding lines)
ShapeEngine/Text/TextFont.cs6.0MixedExplicit Debt: CommentedOutCode
Examples/GameloopExamples.cs6.0MixedExplicit Debt: CommentedOutCode

How the grades work

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 — 31

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 — 1976

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 — 122

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 2

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 57 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 — 57 dimensions across the health lenses
D1D2D3D4D5D6D8D12D13D14D15D17D18D19D20D22D24D26D27D28D29D30D34D35D36D43D44AX10AX2AX3AX4AX5AX6GD1IC1M1M2M3M4P1P10P3P4P6PF3X1X12X16X18X19X2X20X27X29X3X30X5

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
  1. 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, 2114 of 2129 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.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. 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.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1e6da-aff0-7d47-af64-d81391f2df78.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

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.

  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (8 contributor(s) across 2606 commit(s) sampled, automation and bot accounts excluded). One of them holds 97% of the history; the other 7 hold 0.4% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D23 Boundary Type-Coupling — 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. Large codebase (161,234 production LoC in the .NET projects) with no declared bounded contexts — cross-boundary type coupling is unassessed Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `Examples/Scenes/ExampleScenes/PathfinderExample.cs`, `Examples/Scenes/ExampleScenes/PhysicsExampleSource/Asteroid.cs`, `Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs`, `ShapeEngine/Core/Curve.cs`, `ShapeEngine/Core/CurveColor.cs`, … (+14 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • ED5 Idempotency — 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 classifies a mutation as idempotent when a guard is visible (an exists check, an upsert, an idempotency key or inbox, a versioned or fixed-value write) and as at risk only on positive evidence that a re-run double-applies it (a fresh-identity insert, an accumulation, a growing collection, an unkeyed outbound send or charge). The rest show neither, and they are the majority here, so a score over the classified minority would not describe this repository. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — 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. 521 further occurrence(s) are not listed individually; the score already reflects all 561.
  • 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.
  • P1 CI/CD gates — 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. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • 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. 5 further occurrence(s) are not listed individually; the score already reflects all 45.

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.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • 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.
  • D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
  • 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.
  • D22 Internal API Consistency: API consistency compares the call shapes of members that play the same role on the exposed C# surface: whether the API suits its callers is not measured, and surfaces in other languages are not measured.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • 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.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity5.3 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 5.3 / 10 · rule-coverage 100% · ceiling Prevented

124 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was InputExtensions.GetButtonName at 195. A further 3 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 ShapeTween.Tween at 27 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: ShapeEngine/StaticLib/ShapeTween.cs (ShapeTween.Tween at 27), ShapeEngine/Geometry/TriangleDef/Triangle.cs (Triangle.IsSimilar at 18), ShapeEngine/Geometry/RectDef/RectContainsStatic.cs (Rect.ContainsRectPoints at 16). 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.

Circle.DrawStriped (cyclomatic 18) · ×4ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:598
Quad.DrawStriped (cyclomatic 18) · ×4ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:614
Rect.DrawStriped (cyclomatic 18) · ×4ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:610
Triangle.DrawStriped (cyclomatic 18) · ×4ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:613
Quad.IntersectShape (cyclomatic 17) · ×3ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:244

+ 95 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 2 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with InputExtensions.GetButtonName (cyclomatic 195), StripedShapeDrawingExample.OnDrawGameExample (cyclomatic 97). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 5.3 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.

D2 · Cognitive Complexity4.2 / 10Weak✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 4.2 / 10 · rule-coverage 100% · ceiling Prevented

256 method(s) exceeded the cognitive complexity threshold of 15; the worst was TextFont.DrawTextWrapChar at 324.

CollisionHandler.IntersectSpace (cognitive 23) · ×9ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:150
CollisionHandler.CastSpace (cognitive 17) · ×9ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:174
BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended (cognitive 28) · ×8ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:705
Circle.DrawStriped (cognitive 35) · ×4ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:598
Quad.DrawStriped (cognitive 35) · ×4ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:614

+ 190 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 6 bodies over 120 down to 120 or less in Cognitive Complexity — start with TextFont.DrawTextWrapChar (cognitive 324), StripedShapeDrawingExample.OnDrawGameExample (cognitive 302), Polygon.GenerateStripedSegments (cognitive 186). — 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 6 together lifts Cognitive Complexity from 4.2 to about 5.4/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.

D3 · God Classes7.7 / 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.

Maturity: Documented → Verified → Prevented · effective 7.7 / 10 · rule-coverage 100% · ceiling Prevented

101 god class(es) detected.

TooManyMethods: Rect · ×55ShapeEngine/Geometry/RectDef/Rect.cs
FileTooLong: CollisionSystem/Collider.cs · ×22ShapeEngine/Geometry/CollisionSystem/Collider.cs
MethodTooLong: Polygon.GenerateStripedSegments · ×21ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:149
ClassTooLong: BitmapFont · ×3ShapeEngine/Text/BitmapFont.cs

What to do

  1. Resolve the 55 TooManyMethods finding(s) in God Classes — start with Rect.cs, Polygon.cs, Circle.cs. — One of this dimension's main actionable groups (55 warning-level).
  2. Resolve the 22 FileTooLong finding(s) in God Classes — start with Collider.cs, QuadDrawing.cs, ContentPack.cs. — One of this dimension's main actionable groups (22 warning-level).
  3. Resolve the 21 MethodTooLong finding(s) in God Classes — start with TriangleDrawing.cs (4), QuadDrawing.cs (3), Program.cs (2). — One of this dimension's main actionable groups (21 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication0.4 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 0.4 / 10 · rule-coverage 100% · ceiling Verified

736 duplicated block group(s) detected. 24.0 % of the production lines (38,619 of 161,234) are in a reported copy. A further 545 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 98 of the 1281 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (5 lines × 2) · ×36ShapeEngine/Geometry/CellCollision/CellCollisionSystem.cs:355
Duplicated block (7 lines × 2) · ×31ShapeEngine/Geometry/SegmentsDef/Segments.cs:400
Duplicated block (11 lines × 2) · ×27ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:339
Edited copy of a member (9 corresponding lines) · ×25ShapeEngine/Geometry/TriangleDef/Triangle.cs:1218
Duplicated block (8 lines × 2) · ×25ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:102

+ 395 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 36 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with PolygonClosestPoint.cs (4), PolygonDrawing.cs (4), Line.cs (3). — One of this dimension's main actionable groups (36 warning-level).
  2. Resolve the 31 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with ShapePhysics.cs (2), CircleDrawingStriped.cs (2), SegmentsIntersectShape.cs (2). — One of this dimension's main actionable groups (31 warning-level).
  3. Resolve the 27 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with PolygonClosestPoint.cs (7), ContentPack.cs (3), IntersectSpaceRegister.cs (2). — One of this dimension's main actionable groups (27 warning-level).

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

3 projects, 0 dependency cycle(s), 0 unstable depended-on project(s).

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.9 / 10Stronggated by 1 serious finding✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Verified

1 of 205 classes have LCOM4 above 3.

Low cohesion: CustomEvent (LCOM4 6)ShapeEngine/Core/GameDef/GameCustomEvent.cs:16

What to do

  1. Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with GameCustomEvent.cs. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D8 · Code Coverage0.0 / 10Critical✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Verified

No automated tests — no test code was found in this repository.

No automated tests

What to do

  1. Resolve the 1 No automated tests finding(s) in Code Coverage. — One of this dimension's main actionable groups (1 issue-level).

Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.

D12 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 outdated, 0 vulnerable, 0 deprecated packages.

✓ On the Gold path — maintain.

Detailed fixes: d12_recommendation.md.

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 2 packages use a banned license. ★ DEPTH: every package graded here is one this repository's MSBuild projects declare as a direct `PackageReference` (2 declared), and nothing beyond them was reached — this is the DECLARATION-SITE set, NOT the transitive closure. .NET has no lockfile a checkout is guaranteed to carry and this pass grades an unrestored tree, so a banned licence that only a direct dependency's OWN dependencies pull in is outside this verdict, exactly as the JVM arm's declaration-site verdict is.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

D17 · Explicit Debt9.3 / 10Adequategated by 12 critical findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Prevented

159 deducted debt markers + 21 dead symbols across 161234 LoC in the .NET projects (0.3/KLoC) → score 9.3.

WriteOnlyPrivateField · ×12Examples/Scenes/ExampleScenes/CameraAreaDrawExample.cs:13
CommentedOutCode · ×100Examples/GameloopExamples.cs:232
Dead code: ReadLastLineLargeFile · ×21ShapeEngine/Content/ContentPack.cs:2299
TodoComment · ×2Examples/Scenes/ExampleScenes/PhysicsExampleSource/Ship.cs:15
Whole file has no live code — 45 debt markers inside itExamples/Scenes/ExampleScenes/ProjectedShapesExample.cs:31

What to do

  1. Resolve the 12 WriteOnlyPrivateField finding(s) in Explicit Debt — start with CameraAreaDrawExample.cs (2), DelaunayExample.cs (2), ScreenEffectsExample.cs (2). — One of this dimension's main actionable groups (12 issue-level).
  2. Resolve the 100 CommentedOutCode finding(s) in Explicit Debt — start with PathfinderExample2.cs (7), AsteroidMiningExample.cs (5), Quad.cs (5). — One of this dimension's main actionable groups (100 warning-level).
  3. Resolve the 21 Dead code finding(s) in Explicit Debt — start with SavegameExample.cs (3), Colors.cs (2), GameloopExamples.cs (2). — One of this dimension's main actionable groups (21 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D18 · Solution Shape10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the solution is laid out in a sensible, conventional structure.

Method: Solution structure: project count, decomposition, shell-project detection, build success (confirmed failures cap the score); traced to actual .sln files and binaries. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

3 projects, 525 source files, 161234 hand-written lines of code (161234 production / 0 test — the split is derived per file: test is what its project, its own path, or a compile-guarded region marks as test, and a file carrying no test signal counts as production), 1 inter-project edges.

✓ On the Gold path — maintain.

Detailed fixes: d18_recommendation.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 documentation facets pass in full. 3 document(s) read across 3 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs foundResourcePacker/ResourcePacker.csproj:4

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with ResourcePacker.csproj. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D22 · Internal API Consistency10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the internal API surface is consistent and coherent.

Method: Call-shape rules (A1-A9) over the structured code model of the intentionally exposed C# surface: members of one type, overloads of one name and the same slot across sibling types are compared, and a member that makes a caller use a different convention for the same kind of operation is flagged. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 API inconsistencies among 8 exposed members measured against a convention their peers follow.

✓ On the Gold path — maintain.

Detailed fixes: d22_recommendation.md.

D24 · Comment Value6.7 6.5 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 6.5 / 10 · rule-coverage 97% · ceiling Documented

29 of 873 judged comments only repeat the code they sit on (3.3 %). 35 comment(s) in another language or script were not judged.

redundant comment · ×23ShapeEngine/Core/GameDef/GameGameloop.cs:344
doc comments repeat the namesShapeEngine/Achievements/Achievement.cs:68

What to do

  1. Resolve the 23 redundant comment finding(s) in Comment Value — start with GameGameloop.cs (3), CircleIntersectionStatic.cs (3), LineIntersectionStatic.cs (3). — One of this dimension's main actionable groups (23 recommendation-level).

Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion3.3 / 10Weak✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

Maturity: Documented → Verified → Prevented · effective 3.3 / 10 · rule-coverage 100% · ceiling Documented

1 of 3 projects flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesionShapeEngine/ShapeEngine.csproj:1
Split ShapeEngineShapeEngine/ShapeEngine.csproj:1

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with ShapeEngine.csproj. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 Split ShapeEngine finding(s) in Project Cohesion — start with ShapeEngine.csproj. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D27 · Navigability8.1 / 10Strong✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 8.1 / 10 · rule-coverage 100% · ceiling Documented

75 % of calls cross a namespace and 0 % go through an interface, but 83 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: large — vertical-slice locality expected.

Pass-through layerShapeEngine/Core/GameDef/GameCustomEvent.cs:6

What to do

  1. Resolve the 1 Pass-through layer finding(s) in Navigability — start with GameCustomEvent.cs. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d27_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)4.4 / 10Weak✓ Tool-verified

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).

Maturity: Documented → Verified → Prevented · effective 4.4 / 10 · rule-coverage 100% · ceiling Documented

23 finding(s): 0 critical, 17 high, 6 medium, 0 low. 14 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 19 file(s) — `Examples/Scenes/ExampleScenes/PathfinderExample.cs` (line 14), `Examples/Scenes/ExampleScenes/PhysicsExampleSource/Asteroid.cs` (line 22), `Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs` (lines 23–1653, lines 1658–1660, line 1676, …), `ShapeEngine/Core/Curve.cs` (line 11), `ShapeEngine/Core/CurveColor.cs` (line 10), … (+14 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. In 19 of those file(s) — `Examples/Scenes/ExampleScenes/PathfinderExample.cs`, `Examples/Scenes/ExampleScenes/PhysicsExampleSource/Asteroid.cs`, `Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs`, `ShapeEngine/Core/Curve.cs`, `ShapeEngine/Core/CurveColor.cs`, … (+14 more) — the break is a C# primary constructor, which semgrep's grammar cannot parse and which hides the type from every rule scoped to it; those files were re-scanned from a shadow copy with the constructor's parameter list blanked (line and column preserving), which restores the type to the rules, and 0 additional row(s) came from that pass. Only the header's own parameter list is unread in them. 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

What to do

  1. 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).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. No action in Static Analysis (SAST) — all 14 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 (14 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No known-vulnerable dependencies in any ecosystem this repository declares.

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 339 of the 442 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling9.1 / 10Stronggated by 5 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.1 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: InputTypeMouseButton.cs↔InputTypeMouseButtonAxis.cs 94%; InputTypeGamepadButton.cs↔InputTypeGamepadButtonAxis.cs 89%; InputTypeGamepadButtonAxis.cs↔InputTypeKeyboardButtonAxis.cs 88%

Change coupling: GamepadDeviceManager.cs ↔ KeyboardDevice.cs · ×4ShapeEngine/Input/GamepadDeviceManager.cs:1
Change coupling clique: InputTypeGamepadButton.cs, InputTypeGamepadButtonAxis.cs, InputTypeKeyboardButton.cs, InputTypeKeyboardButtonAxis.cs, InputTypeMouseAxis.cs, InputTypeMouseButton.cs, InputTypeMouseButtonAxis.cs, InputTypeMouseWheelAxis.csShapeEngine/Input/InputTypeGamepadButton.cs

What to do

  1. Resolve the 4 Change coupling finding(s) in Change Coupling — start with GamepadDeviceManager.cs (2), Polygon.cs, SpawnArea.cs. — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with InputTypeGamepadButton.cs. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

0/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 3 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. 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).
  3. 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.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 3 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

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.

AX2 · Stateful singletons1.0 / 10Critical✓ Tool-verified

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.

  • `Paths64PooledBuffer` is not registered, but `Polygon` creates it and keeps it in the static `clipPooledBuffer`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (path64Pool; e.g. `path64Pool` at line 73). — ShapeEngine/ShapeClipper/Paths64PooledBuffer.cs:12
  • `Rng` keeps one instance of itself in the static `Instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Rand, Seed; e.g. `Rand` at line 73). — ShapeEngine/Random/Rng.cs:12
  • `TriMesh` is not registered, but `ShapeClipperDrawing2D` creates it and keeps it in the static `triMeshBuffer`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (triangleVertices; e.g. `triangleVertices` at line 76). — ShapeEngine/ShapeClipper/TriMesh.cs:19
  • `IdCounter` is not registered, but `ShapeID` creates it and keeps it in the static `counter`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (count; e.g. `count` at line 19). — ShapeEngine/Core/IdCounter.cs:6
  • `ColorPalette` is not registered, but `Colors` creates it and keeps it in the static `colorPalette`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (colors, CurrentColorScheme; e.g. `colors` at line 106). — ShapeEngine/Color/ColorPalette.cs:9
  • `TextFont` is not registered, but `ControlNodeLabel` creates it and keeps it in the static `textFont`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (FontDimensions; e.g. `FontDimensions` at line 123). — ShapeEngine/Text/TextFont.cs:17
  • `ChanceList` is not registered, but `AsteroidSpawner` creates it and keeps it in the static `ChanceList`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (values; e.g. `values` at line 94). — ShapeEngine/Random/ChanceList.cs:16
  • `ContentLoader` 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 (ValidExtensions; e.g. `ValidExtensions` at line 195). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Content/ContentLoader.cs:16
  • `TriangleBatch` 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 (Pool, batchActive, currentColor; e.g. `Pool` at line 49). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Core/TriangleBatch.cs:29
  • `CustomEvent` 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 (idCounter; e.g. `idCounter` at line 20). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Core/GameDef/GameCustomEvent.cs:16
  • `BitFlag` 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 (flagCounter; e.g. `flagCounter` at line 293). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Core/Structs/BitFlag.cs:12
  • `BitFlagLong` 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 (flagCounter; e.g. `flagCounter` at line 293). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Core/Structs/BitFlagLong.cs:11
  • `Cell` 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 (pool; e.g. `pool` at line 39). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Geometry/CellCollision/CellCollisionSystem.cs:22
  • `Circle` 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 (intersectionPointsBuffer, circleSectorOutlineTriangulationPolyCache; e.g. `intersectionPointsBuffer` at line 259). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Geometry/CircleDef/Circle.cs:23
  • `Points` 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 (uniquePointsBuffer, edgeCountsBuffer; e.g. `uniquePointsBuffer` at line 240). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Geometry/PointsDef/Points.cs:23
  • `Polygon` 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 (weightedTrianglesBuffer, intersectionPointsReference; e.g. `weightedTrianglesBuffer` at line 928). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Geometry/PolygonDef/Polygon.cs:42
  • `Quad` 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 (intersectionPointsBuffer; e.g. `intersectionPointsBuffer` at line 263). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Geometry/QuadDef/Quad.cs:20
  • `Rect` 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 (intersectionPointsBuffer; e.g. `intersectionPointsBuffer` at line 263). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Geometry/RectDef/Rect.cs:22
  • `Segments` 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 (hashSetVector2Buffer, hashSetSegmentBuffer, hashSetUndirectedSegmentBuffer, weightedSegmentBuffer; e.g. `hashSetVector2Buffer` at line 143). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Geometry/SegmentsDef/Segments.cs:14
  • `Triangle` 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 (intersectionPointsReference; e.g. `intersectionPointsReference` at line 263). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Geometry/TriangleDef/Triangle.cs:24
  • `Triangulation` 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 (uniquePointsBuffer, uniqueSegmentsBuffer, uniqueTrianglesBuffer; e.g. `uniquePointsBuffer` at line 209). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Geometry/TriangulationDef/Triangulation.cs:22
  • `InputAction` 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 (nextExecutionOrder; e.g. `nextExecutionOrder` at line 126). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Input/InputAction.cs:14
  • `InputActionTree` 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 (idCounter, excecutionOrderCounter; e.g. `idCounter` at line 107). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Input/InputActionTree.cs:18
  • `InputDevice` 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 (idCounter; e.g. `idCounter` at line 11). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Input/InputDevice.cs:7
  • `InputSystem` 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 (tagPowerCounter, Locked, lockWhitelist, lockBlacklist; e.g. `tagPowerCounter` at line 279). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Input/InputSystem.cs:10
  • `Pathfinder` 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 (staticRequestArray, staticPathResults, staticPathfinderInstance; e.g. `staticRequestArray` at line 522). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Pathfinding/Pathfinder.cs:17
  • `ShapeClipper2D` 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 (precision; e.g. `precision` at line 36). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/ShapeClipper/ShapeClipper2D.cs:20
  • `PerlinNoise2D` 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 (_seed, gradients; e.g. `_seed` at line 31). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/StaticLib/PerlinNoise2D.cs:14
  • `ShapeLogger` 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 (loggingEnabled, LogFilePath, LogFilePathValid, blockTitle, blockLevel, isBlockLogging; e.g. `loggingEnabled` at line 29). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/StaticLib/ShapeLogger.cs:9
  • `SequencerIdGenerator` 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 (idCounter; e.g. `idCounter` at line 14). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ShapeEngine/Timing/Sequencer.cs:4
  • `Colors` 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 (curColorschemeIndex; e.g. `curColorschemeIndex` at line 93). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Examples/Colors.cs:5
  • `EndlessSpaceCollision` 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 (Difficulty; e.g. `Difficulty` at line 507). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:22

What to do

  • Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race.
  • 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.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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.

  • The namespaces ShapeEngine.Audio ↔ ShapeEngine.Core ↔ ShapeEngine.Core.GameDef ↔ ShapeEngine.Core.Structs ↔ ShapeEngine.Geometry ↔ ShapeEngine.Geometry.CircleDef ↔ ShapeEngine.Geometry.CollisionSystem ↔ ShapeEngine.Geometry.CollisionSystem.CollisionHandlerDef ↔ ShapeEngine.Geometry.LineDef ↔ ShapeEngine.Geometry.PointsDef ↔ ShapeEngine.Geometry.PolygonDef ↔ ShapeEngine.Geometry.PolylineDef ↔ ShapeEngine.Geometry.QuadDef ↔ ShapeEngine.Geometry.RayDef ↔ ShapeEngine.Geometry.RectDef ↔ ShapeEngine.Geometry.SegmentDef ↔ ShapeEngine.Geometry.SegmentsDef ↔ ShapeEngine.Geometry.TriangleDef ↔ ShapeEngine.Geometry.TriangulationDef ↔ ShapeEngine.Input ↔ ShapeEngine.Pathfinding ↔ ShapeEngine.Random ↔ ShapeEngine.Screen ↔ ShapeEngine.ShapeClipper ↔ ShapeEngine.Timing depend on each other. The lightest dependency in the cycle is ShapeEngine.Audio → ShapeEngine.Geometry.RectDef (ShapeEngine.Audio.AudioDevice → ShapeEngine.Geometry.RectDef.Rect, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — ShapeEngine/Audio/AudioDevice.cs:6

What to do

  • Break namespace cycles inside a project by moving the shared type to a namespace both sides can use, or by inverting the back edge behind an interface.
AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

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.

AX5 · Architecture & structure3.0 / 10Weak✓ Tool-verified

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.

  • ~161.2k production LoC (547 types) across 3 project(s) / 46 namespace(s) with no recognised architectural style or layering — at this size, deliberate module boundaries would help. No DDD/clean/vertical-slice/CQRS/transaction-script organisation was detected — code is likely organised ad hoc, which makes change and onboarding harder as it grows.

What to do

  • Introduce deliberate module boundaries — by feature (vertical slices) if your team prefers, or by layer (domain/application/infrastructure). Even splitting into a few cohesive projects with a clear dependency direction would help.
AX6 · Interface segregation9.9 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

  • `IBroadphase` declares 17 members under just 5 distinct name(s): `Fill`, `Close`, `DebugDraw`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBucketsThreadSafe`, `GetCandidateBucketsThreadSafe`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 17 separate responsibilities: a caller binds to 5 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 17 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — ShapeEngine/Geometry/CollisionSystem/IBroadphase.cs:22

What to do

  • Collapse overload sets (optional/default parameters, or an options object) — these interfaces are wide in SIGNATURES, not in responsibilities, so segregating them would relieve no caller.
GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

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.

IC1 · Incompleteness & stubs7.5 / 10Strong✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently. (×8) — ResourcePacker/Program.cs:246, ResourcePacker/Program.cs:485, ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:848, …
  • A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers). (×32) — REDACTED:441, REDACTED:442, REDACTED:445, …

What to do

  • Clear the softer debt: remove commented-out code and dead branches, re-enable or delete skipped tests, and replace blanket warning suppressions with targeted ones.
M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
  • No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure8.0 / 10Strong✓ Tool-verified

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.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

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.

P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified

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.

What to do

  • Run the test suite in CI via an explicit runner step (`dotnet test` for the toolchain this pipeline already uses) and gate merges on it.
P10 · Library API & versioning9.8 / 10Exemplary✓ Tool-verified

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.

  • `ShapeEngine.Core.SceneEmpty` (ShapeEngine/Core/SceneEmpty.cs:7) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — ShapeEngine/Core/SceneEmpty.cs:7
  • `ShapeEngine.Core.Shake` (ShapeEngine/Core/Shake.cs:10) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — ShapeEngine/Core/Shake.cs:10
  • `ShapeEngine.Core.SlowMotion` (ShapeEngine/Core/SlowMotion.cs:12) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — ShapeEngine/Core/SlowMotion.cs:12
  • `ShapeEngine.Geometry.CollisionSystem.BroadphaseColliderRegister` (ShapeEngine/Geometry/CollisionSystem/BroadphaseColliderRegister.cs:6) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — ShapeEngine/Geometry/CollisionSystem/BroadphaseColliderRegister.cs:6
  • `ShapeEngine.Geometry.CollisionSystem.BroadphaseStaticColliderRegister` (ShapeEngine/Geometry/CollisionSystem/BroadphaseStaticColliderRegister.cs:8) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — ShapeEngine/Geometry/CollisionSystem/BroadphaseStaticColliderRegister.cs:8
  • `ShapeEngine.Input.InputTypeMouseAxis` (ShapeEngine/Input/InputTypeMouseAxis.cs:10) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — ShapeEngine/Input/InputTypeMouseAxis.cs:10
  • `ShapeEngine.Pool.ObjectPool` (ShapeEngine/Pool/ObjectPool.cs:15) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — ShapeEngine/Pool/ObjectPool.cs:15
  • `ShapeEngine.ShapeClipper.Paths64PooledBuffer` (ShapeEngine/ShapeClipper/Paths64PooledBuffer.cs:12) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — ShapeEngine/ShapeClipper/Paths64PooledBuffer.cs:12
  • `ShapeEngine.ShapeClipper.ShapeClipperDrawing2D` (ShapeEngine/ShapeClipper/ShapeClipperDrawing2D.cs:14) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — ShapeEngine/ShapeClipper/ShapeClipperDrawing2D.cs:14

What to do

  • Make `ShapeEngine.Core.SceneEmpty` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
  • Make `ShapeEngine.Core.Shake` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
  • Make `ShapeEngine.Core.SlowMotion` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
  • Make `ShapeEngine.Geometry.CollisionSystem.BroadphaseColliderRegister` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
  • Make `ShapeEngine.Geometry.CollisionSystem.BroadphaseStaticColliderRegister` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
  • Make `ShapeEngine.Input.InputTypeMouseAxis` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
  • Make `ShapeEngine.Pool.ObjectPool` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
  • Make `ShapeEngine.ShapeClipper.Paths64PooledBuffer` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
  • Make `ShapeEngine.ShapeClipper.ShapeClipperDrawing2D` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

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 CodeQL's csharp pack, or a .NET security analyzer package (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 5 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:8
  • `REDACTED` schedules updates, but no `package-ecosystem` entry covers `github-actions`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list. — REDACTED:2

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Dependabot is configured but does not watch `github-actions` — add that `package-ecosystem` entry to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback10.0 / 10Exemplary✓ Tool-verified

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.

P6 · Release Hygiene5.0 / 10Adequate✓ 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.

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
PF3 · Async & latency hygiene4.5 / 10Weak✓ Tool-verified

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.

  • 1 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).
  • `producer.Wait()` 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). — REDACTED:231
  • Only 0/24 awaits in library code use ConfigureAwait(false). A library that captures the caller's context can stall or deadlock its host — the classic way a dependency drags an app down.
  • `await UnpackTextToMemoryParallelAsync( SourceFilePath, size => cacheSize = size, ex...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — ShapeEngine/Content/ContentPack.cs:292
  • `await UnpackTextToMemoryAsync( SourceFilePath, size => cacheSize = size, extensionE...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — ShapeEngine/Content/ContentPack.cs:302
  • `await UnpackFileToMemoryParallelAsync( SourceFilePath, size => cacheSize = size, ex...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — ShapeEngine/Content/ContentPack.cs:314
  • `await UnpackFileToMemoryAsync( SourceFilePath, size => cacheSize = size, extensionE...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — ShapeEngine/Content/ContentPack.cs:323
  • `await fileStream.ReadExactlyAsync(header, 0, 12)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — ShapeEngine/Content/ContentPack.cs:917, ShapeEngine/Content/ContentPack.cs:1035
  • `await fileStream.ReadExactlyAsync(pathLenBytes, 0, 4)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — ShapeEngine/Content/ContentPack.cs:928, ShapeEngine/Content/ContentPack.cs:1041
  • `await fileStream.ReadExactlyAsync(pathBytes, 0, pathLen)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — ShapeEngine/Content/ContentPack.cs:932, ShapeEngine/Content/ContentPack.cs:1045
  • `await fileStream.ReadExactlyAsync(dataLenBytes, 0, 4)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — ShapeEngine/Content/ContentPack.cs:936, ShapeEngine/Content/ContentPack.cs:1049
  • `await fileStream.ReadExactlyAsync(compressedData, 0, dataLen)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — ShapeEngine/Content/ContentPack.cs:953
  • `await Task.Run(() => { using var ms = new MemoryStream(compressedData); using var g...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — ShapeEngine/Content/ContentPack.cs:955, ShapeEngine/Content/ContentPack.cs:1079
  • `await fs.ReadExactlyAsync(compressedData, 0, entry.dataLen)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — ShapeEngine/Content/ContentPack.cs:1077
  • `await Task.WhenAll(tasks)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — ShapeEngine/Content/ContentPack.cs:1093, ShapeEngine/Content/ContentPack.cs:1303
  • `await File.ReadAllLinesAsync(sourceFilePath)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — ShapeEngine/Content/ContentPack.cs:1159, ShapeEngine/Content/ContentPack.cs:1262
  • `await Task.Run(() => { using var input = new MemoryStream(compressedData); using va...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — ShapeEngine/Content/ContentPack.cs:1187, ShapeEngine/Content/ContentPack.cs:1289
  • `await Task.Run(() => { cellPath.Clear(); closedSet.Clear(); openSetCells.Clear(); o...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — ShapeEngine/Pathfinding/AStar.cs:183
  • `await localAstar.GetPathAsync(startNode, endNode, layer, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — ShapeEngine/Pathfinding/Pathfinder.cs:447

What to do

  • Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
  • In library code, append .ConfigureAwait(false) to every await (or set <ConfigureAwait>false</ConfigureAwait> / use the analyzer CA2007) so the library never captures the host's context.
X1 · Async correctness5.3 / 10Adequate✓ Tool-verified

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

  • Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process. — REDACTED:231

What to do

  • Sync-over-async (deadlock risk)
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X18 · Disposal-pattern correctness4.8 / 10Weak✓ Tool-verified

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

  • `queue` is a `BlockingCollection`, which implements `IDisposable`, and it is created here (line 185). Every use of it in `PackParallel` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var queue = …;`), which releases it at the end of the scope on every path including a throw. — REDACTED:185

What to do

  • Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation6.6 / 10Adequate✓ Tool-verified

Other · Code Health — Whether async methods accept a CancellationToken so work can be cancelled (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 3/7 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
  • No CancellationToken parameter — this work can't be stopped early once started. (×4) — ShapeEngine/Content/ContentPack.cs:900, ShapeEngine/Content/ContentPack.cs:1015, ShapeEngine/Content/ContentPack.cs:1138, …

What to do

  • Thread a CancellationToken through async methods so work stops promptly on cancellation.
X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements (or a repository exception type deriving from it) controlled by an `if` — directly or through the `using`, `lock` or `try` that wraps the throw — whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`); in the `else` branch, for a conjunct of the admitting condition that is FALSE of a non-null `p`. Range guards are read for bounds that leave nothing and for a `p > C.Count` bound whose index then reaches `C[p]`, `C.RemoveAt(p)` or a method of the same type that indexes with it. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `foreach` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is enumerating invalidates the enumerator it is holding, so the next `MoveNext` throws `InvalidOperationException` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X5 · Nullable reference types10.0 / 10Exemplary✓ Tool-verified

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.

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.

LensScoreRatingImpact
Code Health67.5Adequate — gated by D4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture53.2Adequate — gated by D26, AX2, AX5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity56.9Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness47.9Weak — gated by D8, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security60.9Adequate — gated by D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance45.0WeakLargest drag on the score — prioritise here.
Unscored — 3 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.

  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 56 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
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
  • 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.
  • D10 Test Quality — No tests were found in the analyzed repository to assess for quality.
  • D11 Test Reliability — No test suite was found to re-run, so reliability couldn't be assessed. Two searches produced that zero and both came back empty: the classifier that reads the loaded workspace recognised no suite it could run, and a walk of the source on disk — which covers the JS/TS `*.test.*` and `*.spec.*` conventions and probes for a Pester suite — found no test source in any other ecosystem either. Neither search reaches a suite that is missing from the loaded workspace and carries no name either walk recognises, so this is 'no suite found by those two searches', not a verdict that the repository has none.
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 6 candidate(s) found and not reported.
  • D23 Boundary Type-Coupling — Cross-context type coupling could not be assessed — this codebase's bounded contexts are neither declared nor inferable.
  • D25 ADR Conformance — no ADRs to check
  • 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) — 19 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (2 value object(s))
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — not scored — 2 of 3 retry-prone mutations could not be classified (no visible guard and no positive evidence of a double-applied effect)
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • 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'.
  • P2 Observability — This repo is a library, not a deployed service — it has no process to operate, so production observability (structured logging, tracing/metrics, health checks) is N/A. A library may log via an injected ILogger, but the absence of operational telemetry is not a defect here. If it grows a host (web API, worker), the dimension reactivates.
  • 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 — Not applicable: no benchmark suite was found by the two searches this check runs — a BenchmarkDotNet package reference in any project file (loaded, or on disk), and a script whose name contains `benchmark` that this repository's CI runs. Neither can see a suite in another ecosystem's idiom, so this is not a verdict that the repository has none. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted, and nothing is asked of a repository that has none.
  • 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.
  • 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.
  • 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
  • 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
  • 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 — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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
  • 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
  • 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 — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's C# was read, and every log call in it goes through a logger that takes one finished message — its own wrapper, log4net, Console or Debug — so an interpolated message there loses nothing the API could have kept. Calls through Microsoft.Extensions.Logging, Serilog, NLog or ZLogger, or any logger with a message-template overload, would be judged.
  • 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.

Critical — 31 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D17 · Explicit Debt · WriteOnlyPrivateField · ×12
  • WriteOnlyPrivateField Examples/Scenes/ExampleScenes/CameraAreaDrawExample.cs:13 — private Font font — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:254 — private Font font — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Examples/Scenes/ExampleScenes/DelaunayExample.cs:17 — private Font font — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Examples/Scenes/ExampleScenes/PolylineInflationExample.cs:25 — private Font font — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Examples/Scenes/ExampleScenes/ShipInputExample.cs:186 — private Font font — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Examples/Scenes/ExampleScenes/CameraAreaDrawExample.cs:14 — private Vector2 movementDir — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Examples/Scenes/ExampleScenes/DelaunayExample.cs:34 — private Polygon shapeBuffer — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Examples/Scenes/ExampleScenes/InputExample.cs:173 — private InputDeviceType curInputDeviceType — assigned 2 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Examples/Scenes/ExampleScenes/PhysicsExample.cs:28 — private float cellSize — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:269 — private Rect slider — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:270 — private Rect sliderFill — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:970 — private float rotDeg — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
AX3 · Project dependency cycles · Namespace dependency cycle · ×1
  • Namespace dependency cycle ShapeEngine/Audio/AudioDevice.cs:6 — The namespaces ShapeEngine.Audio ↔ ShapeEngine.Core ↔ ShapeEngine.Core.GameDef ↔ ShapeEngine.Core.Structs ↔ ShapeEngine.Geometry ↔ ShapeEngine.Geometry.CircleDef ↔ ShapeEngine.Geometry.CollisionSystem ↔ ShapeEngine.Geometry.CollisionSystem.CollisionHandlerDef ↔ ShapeEngine.Geometry.LineDef ↔ ShapeEngine.Geometry.PointsDef ↔ ShapeEngine.Geometry.PolygonDef ↔ ShapeEngine.Geometry.PolylineDef ↔ ShapeEngine.Geometry.QuadDef ↔ ShapeEngine.Geometry.RayDef ↔ ShapeEngine.Geometry.RectDef ↔ ShapeEngine.Geometry.SegmentDef ↔ ShapeEngine.Geometry.SegmentsDef ↔ ShapeEngine.Geometry.TriangleDef ↔ ShapeEngine.Geometry.TriangulationDef ↔ ShapeEngine.Input ↔ ShapeEngine.Pathfinding ↔ ShapeEngine.Random ↔ ShapeEngine.Screen ↔ ShapeEngine.ShapeClipper ↔ ShapeEngine.Timing depend on each other. The lightest dependency in the cycle is ShapeEngine.Audio → ShapeEngine.Geometry.RectDef (ShapeEngine.Audio.AudioDevice → ShapeEngine.Geometry.RectDef.Rect, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D8 · Code Coverage · No automated tests · ×1
  • No automated tests — No automated tests — no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (xUnit, NUnit or MSTest), and run it in CI so the gap cannot reopen.
Serious — 1976 finding(s)
D17 · Explicit Debt · CommentedOutCode · ×100
  • CommentedOutCode Examples/GameloopExamples.cs:232 — 12 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/AsteroidObstacle.cs:194 — 12 consecutive commented-code lines
  • CommentedOutCode ShapeEngine/Color/ColorHsl.cs:413 — 12 consecutive commented-code lines
  • CommentedOutCode Examples/GameloopExamples.cs:252 — 11 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/ExampleScenes/BouncyCircles.cs:77 — 11 consecutive commented-code lines
  • CommentedOutCode ShapeEngine/Geometry/SegmentsDef/Segments.cs:201 — 11 consecutive commented-code lines
  • CommentedOutCode Examples/GameloopExamples.cs:902 — 5 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:970 — 5 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/ExampleScenes/PathfinderExample2.cs:75 — 5 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/ExampleScenes/PathfinderExample2.cs:873 — 5 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/ExampleScenes/PolylineInflationExample.cs:149 — 5 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/TextExampleScene.cs:364 — 5 consecutive commented-code lines
  • CommentedOutCode ShapeEngine/Geometry/TriangleDef/Triangle.cs:175 — 5 consecutive commented-code lines
  • CommentedOutCode ShapeEngine/Pathfinding/NodeWeight.cs:129 — 5 consecutive commented-code lines
  • CommentedOutCode ShapeEngine/ShapeClipper/ShapeClipperConversion2D.cs:287 — 5 consecutive commented-code lines
  • CommentedOutCode Examples/PayloadSystem/PayloadDeliverySystem.cs:6 — 4 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/ExampleScenes/AsteroidMiningExample.cs:970 — 4 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/ExampleScenes/CameraAreaDrawExample.cs:151 — 4 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:388 — 4 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/ExampleScenes/DataExample.cs:76 — 4 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:708 — 4 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/ExampleScenes/JsonDataExample.cs:72 — 4 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/ExampleScenes/PathfinderExample2.cs:81 — 4 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/ExampleScenes/PathfinderExample2.cs:921 — 4 consecutive commented-code lines
  • CommentedOutCode Examples/Scenes/ExampleScenes/PathfinderExample2.cs:1000 — 4 consecutive commented-code lines
  • + 75 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×55
  • TooManyMethods: Rect ShapeEngine/Geometry/RectDef/Rect.cs — TooManyMethods — 3685 significant lines (blank, comment-only and punctuation-only lines excluded), 299 methods, declared across 15 files: RectDef/Rect.cs (74), RectDef/RectDrawing.cs (42), RectDef/RectMath.cs (41), RectDef/RectOverlap.cs (24), +11 more file(s). The bar is 30 methods; this is 269 over it, 9.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Polygon ShapeEngine/Geometry/PolygonDef/Polygon.cs — TooManyMethods — 3185 significant lines (blank, comment-only and punctuation-only lines excluded), 288 methods, declared across 12 files: PolygonDef/Polygon.cs (64), PolygonDef/PolygonMath.cs (45), PolygonDef/PolygonDrawing.cs (32), PolygonDef/PolygonClipping.cs (25), +8 more file(s). The bar is 30 methods; this is 258 over it, 9.60× 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: Circle ShapeEngine/Geometry/CircleDef/Circle.cs — TooManyMethods — 2991 significant lines (blank, comment-only and punctuation-only lines excluded), 266 methods, declared across 13 files: CircleDef/Circle.cs (58), CircleDef/CircleDrawing.cs (49), CircleDef/CircleIntersectShape.cs (25), CircleDef/CircleOverlap.cs (23), +9 more file(s). The bar is 30 methods; this is 236 over it, 8.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Triangle ShapeEngine/Geometry/TriangleDef/Triangle.cs — TooManyMethods — 3576 significant lines (blank, comment-only and punctuation-only lines excluded), 260 methods, declared across 10 files: TriangleDef/Triangle.cs (66), TriangleDef/TriangleMath.cs (54), TriangleDef/TriangleIntersectShape.cs (25), TriangleDef/TriangleOverlap.cs (23), +6 more file(s). The bar is 30 methods; this is 230 over it, 8.67× 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: Quad ShapeEngine/Geometry/QuadDef/Quad.cs — TooManyMethods — 4093 significant lines (blank, comment-only and punctuation-only lines excluded), 246 methods, declared across 10 files: QuadDef/Quad.cs (51), QuadDef/QuadMath.cs (42), QuadDef/QuadDrawing.cs (33), QuadDef/QuadIntersectShape.cs (25), +6 more file(s). The bar is 30 methods; this is 216 over it, 8.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Segment ShapeEngine/Geometry/SegmentDef/Segment.cs — TooManyMethods — 1964 significant lines (blank, comment-only and punctuation-only lines excluded), 231 methods, declared across 10 files: SegmentDef/Segment.cs (45), SegmentDef/SegmentMath.cs (34), SegmentDef/SegmentDrawing.cs (31), SegmentDef/SegmentIntersectShape.cs (25), +6 more file(s). The bar is 30 methods; this is 201 over it, 7.70× 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: Line ShapeEngine/Geometry/LineDef/Line.cs — TooManyMethods — 1088 significant lines (blank, comment-only and punctuation-only lines excluded), 162 methods, declared across 9 files: LineDef/Line.cs (35), LineDef/LineIntersectShape.cs (25), LineDef/LineOverlap.cs (24), LineDef/LineIntersectionStatic.cs (21), +5 more file(s). The bar is 30 methods; this is 132 over it, 5.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Ray ShapeEngine/Geometry/RayDef/Ray.cs — TooManyMethods — 1089 significant lines (blank, comment-only and punctuation-only lines excluded), 159 methods, declared across 9 files: RayDef/Ray.cs (32), RayDef/RayIntersectShape.cs (25), RayDef/RayOverlap.cs (24), RayDef/RayIntersectionStatic.cs (21), +5 more file(s). The bar is 30 methods; this is 129 over it, 5.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Polyline ShapeEngine/Geometry/PolylineDef/Polyline.cs — TooManyMethods — 1245 significant lines (blank, comment-only and punctuation-only lines excluded), 134 methods, declared across 8 files: PolylineDef/Polyline.cs (25), PolylineDef/PolylineOverlap.cs (24), PolylineDef/PolylineMath.cs (18), PolylineDef/PolylineClosestPoint.cs (17), +4 more file(s). The bar is 30 methods; this is 104 over it, 4.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: Triangulation ShapeEngine/Geometry/TriangulationDef/TriangulationMath.cs — TooManyMethods — 981 significant lines (blank, comment-only and punctuation-only lines excluded), 133 methods, declared across 7 files: TriangulationDef/TriangulationMath.cs (33), TriangulationDef/TriangulationOverlap.cs (24), TriangulationDef/Triangulation.cs (23), TriangulationDef/TriangulationClosestPoint.cs (20), +3 more file(s). 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: Game ShapeEngine/Core/GameDef/GameVirtual.cs — TooManyMethods — 794 significant lines (blank, comment-only and punctuation-only lines excluded), 128 methods, declared across 7 files: GameDef/GameVirtual.cs (33), GameDef/GameResolve.cs (29), GameDef/Game.cs (27), GameDef/GameSavegameSystem.cs (17), +3 more file(s). The bar is 30 methods; this is 98 over it, 4.27× 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: Segments ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs — TooManyMethods — 1049 significant lines (blank, comment-only and punctuation-only lines excluded), 123 methods, declared across 7 files: SegmentsDef/SegmentsIntersectShape.cs (24), SegmentsDef/Segments.cs (23), SegmentsDef/SegmentsOverlap.cs (23), SegmentsDef/SegmentsMath.cs (20), +3 more file(s). The bar is 30 methods; this is 93 over it, 4.10× 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: Points ShapeEngine/Geometry/PointsDef/Points.cs — TooManyMethods — 805 significant lines (blank, comment-only and punctuation-only lines excluded), 105 methods, declared across 3 files: PointsDef/Points.cs (45), PointsDef/PointsMath.cs (45), PointsDef/PointsClosestPoint.cs (15). The bar is 30 methods; this is 75 over it, 3.50× 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: ControlNode ShapeEngine/UI/ControlNode.cs — TooManyMethods — 533 significant lines (blank, comment-only and punctuation-only lines excluded), 92 methods. The bar is 30 methods; this is 62 over it, 3.07× 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: Pathfinder ShapeEngine/Pathfinding/Pathfinder.cs — TooManyMethods — 562 significant lines (blank, comment-only and punctuation-only lines excluded), 77 methods. The bar is 30 methods; this is 47 over it, 2.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Collider ShapeEngine/Geometry/CollisionSystem/Collider.cs — TooManyMethods — 1294 significant lines (blank, comment-only and punctuation-only lines excluded), 76 methods. The bar is 30 methods; this is 46 over it, 2.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ColorRgba ShapeEngine/Color/ColorRgba.cs — TooManyMethods — 404 significant lines (blank, comment-only and punctuation-only lines excluded), 74 methods. The bar is 30 methods; this is 44 over it, 2.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Scene ShapeEngine/Core/Scene.cs — TooManyMethods — 157 significant lines (blank, comment-only and punctuation-only lines excluded), 72 methods. The bar is 30 methods; this is 42 over it, 2.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ContentLoader ShapeEngine/Content/ContentLoader.cs — TooManyMethods — 561 significant lines (blank, comment-only and punctuation-only lines excluded), 71 methods. The bar is 30 methods; this is 41 over it, 2.37× 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: Size ShapeEngine/Core/Structs/Size.cs — TooManyMethods — 199 significant lines (blank, comment-only and punctuation-only lines excluded), 71 methods. The bar is 30 methods; this is 41 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Transform2D ShapeEngine/Core/Structs/Transform2D.cs — TooManyMethods — 267 significant lines (blank, comment-only and punctuation-only lines excluded), 67 methods. The bar is 30 methods; this is 37 over it, 2.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Rng ShapeEngine/Random/Rng.cs — TooManyMethods — 280 significant lines (blank, comment-only and punctuation-only lines excluded), 65 methods. The bar is 30 methods; this is 35 over it, 2.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ShapePhysics ShapeEngine/StaticLib/ShapePhysics.cs — TooManyMethods — 563 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. The bar is 30 methods; this is 34 over it, 2.13× 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: ShapeMath ShapeEngine/StaticLib/ShapeMath.cs — TooManyMethods — 192 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 30 methods; this is 32 over it, 2.07× 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: TriMesh ShapeEngine/ShapeClipper/TriMesh.cs — TooManyMethods — 287 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 30 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×36
  • Duplicated block (5 lines × 2) ShapeEngine/Geometry/CellCollision/CellCollisionSystem.cs:355 — ShapeEngine/Geometry/CellCollision/CellCollisionSystem.cs:355-359 | ShapeEngine/Geometry/CellCollision/CellCollisionSystem.cs:375-379 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CellCollision/CellCollisionSystem.cs:355` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:332 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:332-336 | ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:369-373 — both copies are in the same file, so extract the 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 `other` to `Polygon` in one and `Polyline` 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 × 2) ShapeEngine/Geometry/CircleDef/CircleClosestPointStatic.cs:72 — ShapeEngine/Geometry/CircleDef/CircleClosestPointStatic.cs:72-76 | ShapeEngine/Geometry/CircleDef/CircleClosestPointStatic.cs:97-101 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CircleDef/CircleClosestPointStatic.cs:72` 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `circleCenter` to `Vector2 other) GetClosestPointCircleLine(Vector2` in one and `Vector2 other) GetClosestPointCircleRay(Vector2` 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 × 2) ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:419 — ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:419-423 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:458-462 — both copies are in the same file, so extract the 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 `other` to `Polygon` in one and `Polyline` 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 × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:225 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:225-229 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:268-272 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 (5 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:261 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:261-265 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:311-315 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 (5 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:297 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:297-301 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:354-358 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 (5 lines × 2) ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:407 — ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:407-411 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:447-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 first that the copies are not typed on the same thing: the declarations holding them bind `other` to `Polygon` in one and `Polyline` 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 × 2) ShapeEngine/Core/GameDef/GameSavegameSystem.cs:115 — ShapeEngine/Core/GameDef/GameSavegameSystem.cs:115-119 | ShapeEngine/Core/GameDef/GameSavegameSystem.cs:311-315 — both copies are in the same file, so extract the 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 `ShapeEngine/Core/GameDef/GameSavegameSystem.cs: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:189 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:189-193 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:225-229 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 (5 lines × 2) ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:111 — ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:111-115 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:259-263 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:108` calls `foreach` and `ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:256` 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) ShapeEngine/Audio/AudioDevice.cs:610 — ShapeEngine/Audio/AudioDevice.cs:610-614 | ShapeEngine/Audio/AudioDevice.cs:654-658 — both copies are in the same file, so extract the 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) ShapeEngine/Core/TriangleBatch.cs:489 — ShapeEngine/Core/TriangleBatch.cs:489-493 | ShapeEngine/Core/TriangleBatch.cs:649-653 — both copies are in the same file, so extract the 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, `ShapeEngine/Core/TriangleBatch.cs:647` calls `Begin` and `ShapeEngine/Core/TriangleBatch.cs:487` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) ShapeEngine/Core/TriangleBatch.cs:536 — ShapeEngine/Core/TriangleBatch.cs:536-540 | ShapeEngine/Core/TriangleBatch.cs:619-623 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Core/TriangleBatch.cs:617` calls `Begin` and `ShapeEngine/Core/TriangleBatch.cs:534` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:115 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:115-119 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:95-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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs: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 (5 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:136 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:136-140 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:119-123 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:136` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:862 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:862-866 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:883-887 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:862` it does not close everything it opens, so those exact lines 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) ShapeEngine/Input/InputExtensions.cs:229 — ShapeEngine/Input/InputExtensions.cs:229-233 | ShapeEngine/Input/InputExtensions.cs:247-251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `axis` to `this ShapeGamepadJoyAxis` in one and `this ShapeGamepadTriggerAxis` 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 × 2) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:864 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:864-868 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:913-917 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:885 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:885-889 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:935-939 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:912 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:912-916 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:934-938 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) ShapeEngine/Geometry/QuadDef/QuadOverlapStatic.cs:161 — ShapeEngine/Geometry/QuadDef/QuadOverlapStatic.cs:161-165 | ShapeEngine/Geometry/QuadDef/QuadOverlapStatic.cs:187-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) ShapeEngine/Text/TextFont.cs:294 — ShapeEngine/Text/TextFont.cs:294-298 | ShapeEngine/Text/TextFont.cs:309-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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Text/TextFont.cs: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 (5 lines × 2) ShapeEngine/Core/Logging/Logger.cs:79 — ShapeEngine/Core/Logging/Logger.cs:79-83 | ShapeEngine/StaticLib/ShapeLogger.cs:118-122 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 2) ShapeEngine/Geometry/LineDef/Line.cs:74 — ShapeEngine/Geometry/LineDef/Line.cs:74-78 | ShapeEngine/Geometry/RayDef/Ray.cs:61-65 — 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.
  • + 11 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×31
  • Duplicated block (7 lines × 2) ShapeEngine/Geometry/SegmentsDef/Segments.cs:400 — ShapeEngine/Geometry/SegmentsDef/Segments.cs:400-406 | ShapeEngine/Geometry/SegmentsDef/Segments.cs:422-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 `ShapeEngine/Geometry/SegmentsDef/Segments.cs: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 (7 lines × 2) ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:172 — ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:172-178 | ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:203-209 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:172` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 2) ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:359 — ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:359-365 | ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:373-379 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:58 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:58-64 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:70-76 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 (7 lines × 2) ShapeEngine/StaticLib/ShapePhysics.cs:1444 — ShapeEngine/StaticLib/ShapePhysics.cs:1444-1450 | ShapeEngine/StaticLib/ShapePhysics.cs:1471-1477 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ShapeEngine/StaticLib/ShapePhysics.cs:1478` calls `distanceFactorAdjustor` and `ShapeEngine/StaticLib/ShapePhysics.cs:1452` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) ShapeEngine/StaticLib/ShapePhysics.cs:1497 — ShapeEngine/StaticLib/ShapePhysics.cs:1497-1503 | ShapeEngine/StaticLib/ShapePhysics.cs:1526-1532 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ShapeEngine/StaticLib/ShapePhysics.cs:1533` calls `distanceFactorAdjustor` and `ShapeEngine/StaticLib/ShapePhysics.cs:1504` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) ShapeEngine/Core/Structs/Grid.cs:253 — ShapeEngine/Core/Structs/Grid.cs:253-259 | ShapeEngine/Core/Structs/Grid.cs:273-279 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/CircleDef/Circle.cs:448 — ShapeEngine/Geometry/CircleDef/Circle.cs:448-454 | ShapeEngine/Geometry/CircleDef/Circle.cs:523-529 — both copies are in the same file, so extract the 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 `result` to `Points` in one and `Polyline` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:380 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:380-386 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:499-505 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:421 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:421-427 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:543-549 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:421` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:381 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:381-387 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:455-461 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:381` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:381 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:381-387 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:402-408 — 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 `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:381` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:261 — ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:261-267 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:610-616 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:261` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:288 — ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:288-294 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:639-645 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:288` it does not close everything it opens, so those exact lines 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) REDACTED:252 — REDACTED:252-258 | REDACTED:393-399 — both copies are in the same file, so extract the 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:252` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/PolygonDef/PolygonClipping.cs:144 — ShapeEngine/Geometry/PolygonDef/PolygonClipping.cs:144-150 | ShapeEngine/Geometry/PolygonDef/PolygonClipping.cs:185-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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/PolygonDef/PolygonClipping.cs:144` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 `result` to `Polygon` in one and `Polygons` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) ShapeEngine/Geometry/QuadDef/Quad.cs:378 — ShapeEngine/Geometry/QuadDef/Quad.cs:378-384 | ShapeEngine/Geometry/RectDef/Rect.cs:693-699 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) ShapeEngine/Serialization/DataObjectList.cs:182 — ShapeEngine/Serialization/DataObjectList.cs:182-188 | ShapeEngine/Serialization/DataObjectList.cs:205-211 — both copies are in the same file, so extract the 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 `ShapeEngine/Serialization/DataObjectList.cs:182` it does not close everything it opens, so those exact lines 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) ShapeEngine/ShapeClipper/ShapeClipper64.cs:232 — ShapeEngine/ShapeClipper/ShapeClipper64.cs:232-238 | ShapeEngine/ShapeClipper/ShapeClipper64.cs:373-379 — both copies are in the same file, so extract the 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) ShapeEngine/Text/BitmapFont.cs:157 — ShapeEngine/Text/BitmapFont.cs:157-163 | ShapeEngine/Text/BitmapFont.cs:181-187 — both copies are in the same file, so extract the 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 `ShapeEngine/Text/BitmapFont.cs:157` it does not close everything it opens, so those 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 (7 lines × 2) ShapeEngine/Geometry/CircleDef/CircleClosestPointStatic.cs:43 — ShapeEngine/Geometry/CircleDef/CircleClosestPointStatic.cs:43-49 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPointStatic.cs:312-318 — 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 `circleCenter` to `Vector2 other) GetClosestPointCircleSegment(Vector2` in one and `Vector2` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) ShapeEngine/Stats/StatSet.cs:729 — ShapeEngine/Stats/StatSet.cs:729-735 | ShapeEngine/Stats/StatSet.cs:873-879 — both copies are in the same file, so extract the 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, `ShapeEngine/Stats/StatSet.cs:729` calls `Abs` and `ShapeEngine/Stats/StatSet.cs:873` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) ShapeEngine/Geometry/RectDef/Rect.cs:755 — ShapeEngine/Geometry/RectDef/Rect.cs:755-761 | ShapeEngine/Geometry/TriangleDef/Triangle.cs:497-503 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) ShapeEngine/Serialization/JsonClassSerializer.cs:62 — ShapeEngine/Serialization/JsonClassSerializer.cs:62-68 | ShapeEngine/Serialization/JsonStructSerializer.cs:69-75 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) ShapeEngine/Serialization/XmlClassSerializer.cs:92 — ShapeEngine/Serialization/XmlClassSerializer.cs:92-98 | ShapeEngine/Serialization/XmlStructSerializer.cs:92-98 — before extracting anything, compare `ShapeEngine/Serialization/XmlClassSerializer.cs` and `ShapeEngine/Serialization/XmlStructSerializer.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • + 6 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×27
  • Duplicated block (11 lines × 2) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:339 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:339-349 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:873-883 — before extracting anything, compare `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 299 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:339` 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. 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 lines × 2) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:58 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:58-68 | ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:130-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.
  • Duplicated block (11 lines × 2) ShapeEngine/Geometry/RectDef/RectSplit.cs:70 — ShapeEngine/Geometry/RectDef/RectSplit.cs:70-80 | ShapeEngine/Geometry/RectDef/RectSplit.cs:102-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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/RectDef/RectSplit.cs:70` it does not close everything it opens, so those 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 (11 lines × 2) ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:61 — ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:61-71 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:721-731 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:61` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `p` to `Vector2` in one and `IntersectionPoint segmentPoint) GetClosestSegment(Vector2` 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 (11 lines × 2) ShapeEngine/Content/ContentPack.cs:670 — ShapeEngine/Content/ContentPack.cs:670-680 | ShapeEngine/Content/ContentPack.cs:793-803 — both copies are in the same file, so extract the 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 `ShapeEngine/Content/ContentPack.cs:670` 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:71 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:71-81 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:83-93 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:71` 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. 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 lines × 2) ShapeEngine/Core/Logging/Logger.cs:328 — ShapeEngine/Core/Logging/Logger.cs:328-338 | ShapeEngine/StaticLib/ShapeLogger.cs:406-416 — 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 `ShapeEngine/Core/Logging/Logger.cs:328` 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:341 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:341-351 | ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:378-388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:341` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) ShapeEngine/Geometry/PolygonDef/Polygon.cs:947 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:947-957 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:1030-1040 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:332 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:332-342 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:364-374 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 135 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:332` it does not close everything it opens, so those 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 (11 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:394 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:394-404 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:428-438 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 135 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:394` it does not close everything it opens, so those 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 (11 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:467 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:467-477 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:503-513 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 135 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:467` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:540 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:540-550 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:578-588 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 135 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:540` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:585 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:585-595 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:625-635 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 135 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:585` it does not close everything it opens, so those 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 (11 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:630 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:630-640 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:672-682 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 135 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:630` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) ShapeEngine/Serialization/DataBase.cs:50 — ShapeEngine/Serialization/DataBase.cs:50-60 | ShapeEngine/Serialization/DataBase.cs:92-102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) ShapeEngine/Content/ContentPack.cs:455 — ShapeEngine/Content/ContentPack.cs:455-465 | ShapeEngine/Content/ContentPack.cs:549-559 — both copies are in the same file, so extract the 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) ShapeEngine/Content/ContentPack.cs:927 — ShapeEngine/Content/ContentPack.cs:927-937 | ShapeEngine/Content/ContentPack.cs:1040-1050 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:413 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:413-423 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:460-471 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:413` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) ShapeEngine/Geometry/PointsDef/Points.cs:558 — ShapeEngine/Geometry/PointsDef/Points.cs:558-569 | ShapeEngine/Geometry/PolylineDef/Polyline.cs:153-163 — 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 (11 lines × 2) ShapeEngine/Geometry/PointsDef/Points.cs:750 — ShapeEngine/Geometry/PointsDef/Points.cs:750-760 | ShapeEngine/Geometry/PointsDef/Points.cs:800-810 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PointsDef/Points.cs:750` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:987 — ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:987-997 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1161-1171 — both copies are in the same file, so extract the 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) ShapeEngine/Stats/SimpleStat.cs:921 — ShapeEngine/Stats/SimpleStat.cs:921-931 | ShapeEngine/Stats/SimpleStat.cs:933-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.
  • Duplicated block (11 lines × 2) ShapeEngine/Stats/StatSet.cs:215 — ShapeEngine/Stats/StatSet.cs:215-225 | ShapeEngine/Stats/StatSet.cs:387-397 — both copies are in the same file, so extract the 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) REDACTED:301 — REDACTED:301-311 | REDACTED:403-413 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 2 more in this group — see findings.md.
AX2 · Stateful singletons · Process-global static state · ×25
  • Process-global static state: ContentLoader ShapeEngine/Content/ContentLoader.cs:16 — `ContentLoader` 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 (ValidExtensions; e.g. `ValidExtensions` at line 195). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: TriangleBatch ShapeEngine/Core/TriangleBatch.cs:29 — `TriangleBatch` 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 (Pool, batchActive, currentColor; e.g. `Pool` at line 49). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: CustomEvent ShapeEngine/Core/GameDef/GameCustomEvent.cs:16 — `CustomEvent` 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 (idCounter; e.g. `idCounter` at line 20). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: BitFlag ShapeEngine/Core/Structs/BitFlag.cs:12 — `BitFlag` 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 (flagCounter; e.g. `flagCounter` at line 293). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: BitFlagLong ShapeEngine/Core/Structs/BitFlagLong.cs:11 — `BitFlagLong` 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 (flagCounter; e.g. `flagCounter` at line 293). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: Cell ShapeEngine/Geometry/CellCollision/CellCollisionSystem.cs:22 — `Cell` 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 (pool; e.g. `pool` at line 39). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: Circle ShapeEngine/Geometry/CircleDef/Circle.cs:23 — `Circle` 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 (intersectionPointsBuffer, circleSectorOutlineTriangulationPolyCache; e.g. `intersectionPointsBuffer` at line 259). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: Points ShapeEngine/Geometry/PointsDef/Points.cs:23 — `Points` 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 (uniquePointsBuffer, edgeCountsBuffer; e.g. `uniquePointsBuffer` at line 240). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: Polygon ShapeEngine/Geometry/PolygonDef/Polygon.cs:42 — `Polygon` 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 (weightedTrianglesBuffer, intersectionPointsReference; e.g. `weightedTrianglesBuffer` at line 928). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: Quad ShapeEngine/Geometry/QuadDef/Quad.cs:20 — `Quad` 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 (intersectionPointsBuffer; e.g. `intersectionPointsBuffer` at line 263). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: Rect ShapeEngine/Geometry/RectDef/Rect.cs:22 — `Rect` 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 (intersectionPointsBuffer; e.g. `intersectionPointsBuffer` at line 263). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: Segments ShapeEngine/Geometry/SegmentsDef/Segments.cs:14 — `Segments` 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 (hashSetVector2Buffer, hashSetSegmentBuffer, hashSetUndirectedSegmentBuffer, weightedSegmentBuffer; e.g. `hashSetVector2Buffer` at line 143). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: Triangle ShapeEngine/Geometry/TriangleDef/Triangle.cs:24 — `Triangle` 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 (intersectionPointsReference; e.g. `intersectionPointsReference` at line 263). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: Triangulation ShapeEngine/Geometry/TriangulationDef/Triangulation.cs:22 — `Triangulation` 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 (uniquePointsBuffer, uniqueSegmentsBuffer, uniqueTrianglesBuffer; e.g. `uniquePointsBuffer` at line 209). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: InputAction ShapeEngine/Input/InputAction.cs:14 — `InputAction` 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 (nextExecutionOrder; e.g. `nextExecutionOrder` at line 126). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: InputActionTree ShapeEngine/Input/InputActionTree.cs:18 — `InputActionTree` 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 (idCounter, excecutionOrderCounter; e.g. `idCounter` at line 107). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: InputDevice ShapeEngine/Input/InputDevice.cs:7 — `InputDevice` 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 (idCounter; e.g. `idCounter` at line 11). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: InputSystem ShapeEngine/Input/InputSystem.cs:10 — `InputSystem` 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 (tagPowerCounter, Locked, lockWhitelist, lockBlacklist; e.g. `tagPowerCounter` at line 279). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: Pathfinder ShapeEngine/Pathfinding/Pathfinder.cs:17 — `Pathfinder` 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 (staticRequestArray, staticPathResults, staticPathfinderInstance; e.g. `staticRequestArray` at line 522). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: ShapeClipper2D ShapeEngine/ShapeClipper/ShapeClipper2D.cs:20 — `ShapeClipper2D` 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 (precision; e.g. `precision` at line 36). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: PerlinNoise2D ShapeEngine/StaticLib/PerlinNoise2D.cs:14 — `PerlinNoise2D` 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 (_seed, gradients; e.g. `_seed` at line 31). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: ShapeLogger ShapeEngine/StaticLib/ShapeLogger.cs:9 — `ShapeLogger` 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 (loggingEnabled, LogFilePath, LogFilePathValid, blockTitle, blockLevel, isBlockLogging; e.g. `loggingEnabled` at line 29). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: SequencerIdGenerator ShapeEngine/Timing/Sequencer.cs:4 — `SequencerIdGenerator` 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 (idCounter; e.g. `idCounter` at line 14). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: Colors Examples/Colors.cs:5 — `Colors` 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 (curColorschemeIndex; e.g. `curColorschemeIndex` at line 93). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: EndlessSpaceCollision Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:22 — `EndlessSpaceCollision` 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 (Difficulty; e.g. `Difficulty` at line 507). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×25
  • Edited copy of a member (9 corresponding lines) ShapeEngine/Geometry/TriangleDef/Triangle.cs:1218 — ShapeEngine/Geometry/TriangleDef/Triangle.cs:1218-1226 | ShapeEngine/Geometry/TriangleDef/Triangle.cs:1240-1248 — 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) ShapeEngine/Input/GamepadDevice.cs:791 — ShapeEngine/Input/GamepadDevice.cs:791-799 | ShapeEngine/Input/GamepadDevice.cs:883-893 — 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) ShapeEngine/Geometry/RectDef/RectDrawing.cs:865 — ShapeEngine/Geometry/RectDef/RectDrawing.cs:865-873 | ShapeEngine/Geometry/RectDef/RectDrawing.cs:891-899 — 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) ShapeEngine/Geometry/SegmentDef/SegmentOverlap.cs:206 — ShapeEngine/Geometry/SegmentDef/SegmentOverlap.cs:206-214 | ShapeEngine/Geometry/SegmentDef/SegmentOverlap.cs:225-234 — 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) ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:365 — ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:365-373 | ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:380-388 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) ShapeEngine/Geometry/CircleDef/CircleOverlapStatic.cs:104 — ShapeEngine/Geometry/CircleDef/CircleOverlapStatic.cs:104-112 | ShapeEngine/Geometry/SegmentDef/SegmentOverlapStatic.cs:127-137 — 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) ShapeEngine/Geometry/PointsDef/PointsMath.cs:182 — ShapeEngine/Geometry/PointsDef/PointsMath.cs:182-190 | ShapeEngine/Geometry/PointsDef/PointsMath.cs:420-434 — 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) ShapeEngine/Geometry/QuadDef/Quad.cs:685 — ShapeEngine/Geometry/QuadDef/Quad.cs:685-693 | ShapeEngine/Geometry/RectDef/Rect.cs:291-299 — 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) ShapeEngine/StaticLib/ShapePhysics.cs:818 — ShapeEngine/StaticLib/ShapePhysics.cs:818-826 | ShapeEngine/StaticLib/ShapePhysics.cs:837-845 — 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) ShapeEngine/Serialization/JsonClassSerializer.cs:82 — ShapeEngine/Serialization/JsonClassSerializer.cs:82-90 | ShapeEngine/Serialization/JsonDataObjectSerializer.cs:94-102 — 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) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:101 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:101-109 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:79-87 — 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) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:166 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:166-174 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:133-141 — 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) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:240 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:240-248 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:188-196 — 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) ShapeEngine/StaticLib/ShapeVec.cs:488 — ShapeEngine/StaticLib/ShapeVec.cs:488-497 | ShapeEngine/StaticLib/ShapeVec.cs:506-514 — 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) ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:149 — ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:149-157 | ShapeEngine/Geometry/TriangulationDef/TriangulationMath.cs:273-281 — 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) ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:308 — ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:308-316 | ShapeEngine/Geometry/TriangulationDef/TriangulationMath.cs:501-509 — 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) ShapeEngine/Geometry/PolygonDef/Polygon.cs:1079 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:1079-1087 | ShapeEngine/Geometry/PolylineDef/Polyline.cs:315-324 — 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) ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:268 — ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:268-276 | ShapeEngine/Geometry/TriangulationDef/TriangulationMath.cs:465-473 — 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) ShapeEngine/Serialization/XmlClassSerializer.cs:212 — ShapeEngine/Serialization/XmlClassSerializer.cs:212-220 | ShapeEngine/Serialization/XmlDataObjectSerializer.cs:248-256 — 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) ShapeEngine/Serialization/XmlClassSerializer.cs:126 — ShapeEngine/Serialization/XmlClassSerializer.cs:126-134 | ShapeEngine/Serialization/XmlDataObjectSerializer.cs:144-152 — 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) ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:553 — ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:553-562 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1768-1776 — 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) ShapeEngine/Geometry/LineDef/LineClosestPointStatic.cs:52 — ShapeEngine/Geometry/LineDef/LineClosestPointStatic.cs:52-80 | ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:383-391 — 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) ShapeEngine/Random/ChanceList.cs:155 — ShapeEngine/Random/ChanceList.cs:155-163 | ShapeEngine/Random/ChanceListIndices.cs:152-160 — 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) ShapeEngine/Input/InputSettingsGamepad.cs:142 — ShapeEngine/Input/InputSettingsGamepad.cs:142-152 | ShapeEngine/Input/InputSettingsKeyboard.cs:125-133 — 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) Examples/Scenes/ExampleScenes/JsonDataExample.cs:368 — Examples/Scenes/ExampleScenes/JsonDataExample.cs:368-376 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:390-398 — 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×25
  • Duplicated block (8 lines × 2) ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:102 — ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:102-109 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:133-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. Note first that the copies are not typed on the same thing: the declarations holding them bind `segmentStart` to `float time) IntersectSegmentLineInfo(Vector2` in one and `float time) IntersectSegmentRayInfo(Vector2` 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) ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:167 — ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:167-174 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:199-206 — both copies are in the same file, so extract the 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 `segmentStart` to `float time) IntersectSegmentLineInfo(Vector2` in one and `float time) IntersectSegmentRayInfo(Vector2` 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) ShapeEngine/Content/ContentPack.cs:955 — ShapeEngine/Content/ContentPack.cs:955-962 | ShapeEngine/Content/ContentPack.cs:1079-1086 — both copies are in the same file, so extract the 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) ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:251 — ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:251-258 | ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:295-302 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/CollisionSystem/CastSpaceEntry.cs:94 — ShapeEngine/Geometry/CollisionSystem/CastSpaceEntry.cs:94-101 | ShapeEngine/Geometry/CollisionSystem/CastSpaceEntry.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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CollisionSystem/CastSpaceEntry.cs:94` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:978 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:978-985 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:1002-1009 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:978` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/PointsDef/Points.cs:509 — ShapeEngine/Geometry/PointsDef/Points.cs:509-516 | ShapeEngine/Geometry/PointsDef/Points.cs:533-540 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PointsDef/Points.cs: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.
  • Duplicated block (8 lines × 2) ShapeEngine/Geometry/SegmentsDef/Segments.cs:246 — ShapeEngine/Geometry/SegmentsDef/Segments.cs:246-253 | ShapeEngine/Geometry/SegmentsDef/Segments.cs:275-282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) REDACTED:865 — REDACTED:865-872 | REDACTED:941-948 — both copies are in the same file, so extract the 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:865` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) ShapeEngine/Audio/AudioDevice.cs:450 — ShapeEngine/Audio/AudioDevice.cs:450-457 | ShapeEngine/Audio/AudioDevice.cs:495-502 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) ShapeEngine/Core/TriangleBatch.cs:586 — ShapeEngine/Core/TriangleBatch.cs:586-593 | ShapeEngine/Core/TriangleBatch.cs:677-684 — both copies are in the same file, so extract the 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, `ShapeEngine/Core/TriangleBatch.cs:675` calls `Begin` and `ShapeEngine/Core/TriangleBatch.cs:584` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:191 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:191-198 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:214-221 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:327 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:327-334 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:473-480 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:327` it does not close everything it opens, so those 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, `ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:472` calls `Normalize` and `ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:326` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) ShapeEngine/ShapeClipper/ShapeClipper64.cs:438 — ShapeEngine/ShapeClipper/ShapeClipper64.cs:438-445 | ShapeEngine/ShapeClipper/ShapeClipper64.cs:458-465 — both copies are in the same file, so extract the 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) ShapeEngine/Content/ContentPack.cs:499 — ShapeEngine/Content/ContentPack.cs:499-506 | ShapeEngine/Content/ContentPack.cs:974-981 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Content/ContentPack.cs:499` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ShapeEngine/Content/ContentPack.cs:982` calls `Invoke` and `ShapeEngine/Content/ContentPack.cs:507` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:808 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:808-815 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:862-869 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:808` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:111 — ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:111-118 | ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:199-206 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:111` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) ShapeEngine/Geometry/RectDef/RectCollision.cs:135 — ShapeEngine/Geometry/RectDef/RectCollision.cs:135-142 | ShapeEngine/Geometry/RectDef/RectCollision.cs:188-195 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/RectDef/RectCollision.cs:135` 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. 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) ShapeEngine/Serialization/DataObjectDict.cs:124 — ShapeEngine/Serialization/DataObjectDict.cs:124-131 | ShapeEngine/Serialization/DataObjectDict.cs:236-243 — both copies are in the same file, so extract the 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 `ShapeEngine/Serialization/DataObjectDict.cs:124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) ShapeEngine/ShapeClipper/ShapeClipperDrawing2D.cs:201 — ShapeEngine/ShapeClipper/ShapeClipperDrawing2D.cs:201-208 | ShapeEngine/ShapeClipper/ShapeClipperDrawing2D.cs:248-255 — both copies are in the same file, so extract the 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 `ShapeEngine/ShapeClipper/ShapeClipperDrawing2D.cs:201` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:284 — ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:284-291 | ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:312-319 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:284` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 2) ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:281 — ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:281-288 | ShapeEngine/Geometry/PolygonDef/PolygonOverlapStatic.cs:179-186 — 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) ShapeEngine/Geometry/RectDef/Rect.cs:232 — ShapeEngine/Geometry/RectDef/Rect.cs:232-239 | ShapeEngine/Geometry/RectDef/Rect.cs:254-261 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/RectDef/Rect.cs:254` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) ShapeEngine/Serialization/XmlClassSerializer.cs:213 — ShapeEngine/Serialization/XmlClassSerializer.cs:213-220 | ShapeEngine/Serialization/XmlDataObjectSerializer.cs:249-256 — before extracting anything, compare `ShapeEngine/Serialization/XmlClassSerializer.cs` and `ShapeEngine/Serialization/XmlDataObjectSerializer.cs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) Examples/Scenes/ExampleScenes/CurveDataExample.cs:211 — Examples/Scenes/ExampleScenes/CurveDataExample.cs:211-218 | Examples/Scenes/ExampleScenes/CurveDataExample.cs:222-229 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/CurveDataExample.cs:222` 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.
PF3 · Async & latency hygiene · Awaits without ConfigureAwait(false) · ×25
  • Awaits without ConfigureAwait(false) — Only 0/24 awaits in library code use ConfigureAwait(false). A library that captures the caller's context can stall or deadlock its host — the classic way a dependency drags an app down.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:292 — `await UnpackTextToMemoryParallelAsync( SourceFilePath, size => cacheSize = size, ex...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:302 — `await UnpackTextToMemoryAsync( SourceFilePath, size => cacheSize = size, extensionE...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:314 — `await UnpackFileToMemoryParallelAsync( SourceFilePath, size => cacheSize = size, ex...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:323 — `await UnpackFileToMemoryAsync( SourceFilePath, size => cacheSize = size, extensionE...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:917 — `await fileStream.ReadExactlyAsync(header, 0, 12)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:928 — `await fileStream.ReadExactlyAsync(pathLenBytes, 0, 4)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:932 — `await fileStream.ReadExactlyAsync(pathBytes, 0, pathLen)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:936 — `await fileStream.ReadExactlyAsync(dataLenBytes, 0, 4)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:953 — `await fileStream.ReadExactlyAsync(compressedData, 0, dataLen)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:955 — `await Task.Run(() => { using var ms = new MemoryStream(compressedData); using var g...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:1035 — `await fileStream.ReadExactlyAsync(header, 0, 12)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:1041 — `await fileStream.ReadExactlyAsync(pathLenBytes, 0, 4)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:1045 — `await fileStream.ReadExactlyAsync(pathBytes, 0, pathLen)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:1049 — `await fileStream.ReadExactlyAsync(dataLenBytes, 0, 4)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:1077 — `await fs.ReadExactlyAsync(compressedData, 0, entry.dataLen)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:1079 — `await Task.Run(() => { using var ms = new MemoryStream(compressedData); using var g...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:1093 — `await Task.WhenAll(tasks)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:1159 — `await File.ReadAllLinesAsync(sourceFilePath)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:1187 — `await Task.Run(() => { using var input = new MemoryStream(compressedData); using va...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:1262 — `await File.ReadAllLinesAsync(sourceFilePath)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:1289 — `await Task.Run(() => { using var input = new MemoryStream(compressedData); using va...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Content/ContentPack.cs:1303 — `await Task.WhenAll(tasks)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Pathfinding/AStar.cs:183 — `await Task.Run(() => { cellPath.Clear(); closedSet.Clear(); openSetCells.Clear(); o...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
  • Awaits without ConfigureAwait(false) ShapeEngine/Pathfinding/Pathfinder.cs:447 — `await localAstar.GetPathAsync(startNode, endNode, layer, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×24
  • Duplicated block (10 lines × 2) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:367 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:367-376 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:901-910 — before extracting anything, compare `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 299 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:367` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:240 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:240-249 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:292-301 — 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 `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:240` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:744 — ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:744-753 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:755-764 — 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 `ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:744` it does not close everything it opens, so those exact lines 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) REDACTED:317 — REDACTED:317-326 | REDACTED:449-458 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) ShapeEngine/Content/ContentPack.cs:471 — ShapeEngine/Content/ContentPack.cs:471-480 | ShapeEngine/Content/ContentPack.cs:943-952 — both copies are in the same file, so extract the 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 `ShapeEngine/Content/ContentPack.cs:471` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) ShapeEngine/Geometry/CellCollision/CellCollisionSystem.cs:355 — ShapeEngine/Geometry/CellCollision/CellCollisionSystem.cs:355-364 | ShapeEngine/Geometry/CellCollision/CellCollisionSystem.cs:454-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CellCollision/CellCollisionSystem.cs:355` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) ShapeEngine/Geometry/CustomDrawing.cs:127 — ShapeEngine/Geometry/CustomDrawing.cs:127-136 | ShapeEngine/Geometry/CustomDrawing.cs:164-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. 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 `tailPoint` to `Triangle head) CalculateArrowPoints2(Vector2` in one and `Triangle head) CalculateArrowPoints3(Vector2` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 2) ResourcePacker/Program.cs:266 — ResourcePacker/Program.cs:266-275 | ResourcePacker/Program.cs:524-533 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ResourcePacker/Program.cs:266` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:625 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:625-634 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:689-698 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:625` it does not close everything it opens, so those 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) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:166 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:166-175 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:213-222 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:166` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) ShapeEngine/Geometry/IShape.cs:179 — ShapeEngine/Geometry/IShape.cs:179-188 | ShapeEngine/Geometry/Shape.cs:279-288 — before extracting anything, compare `ShapeEngine/Geometry/IShape.cs` and `ShapeEngine/Geometry/Shape.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) ShapeEngine/Serialization/DataObjectDict.cs:179 — ShapeEngine/Serialization/DataObjectDict.cs:179-188 | ShapeEngine/Serialization/DataObjectList.cs:305-314 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) ShapeEngine/Serialization/DataObjectDict.cs:200 — ShapeEngine/Serialization/DataObjectDict.cs:200-209 | ShapeEngine/Serialization/DataObjectList.cs:324-333 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) ShapeEngine/Text/BitmapFont.cs:114 — ShapeEngine/Text/BitmapFont.cs:114-123 | ShapeEngine/Text/BitmapFont.cs:131-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `supportedChars` to `List<char>` in one and `HashSet<char>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 2) ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:150 — ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:150-159 | ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:183-192 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:713 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:713-722 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:755-764 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:713` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1664 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1664-1674 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1741-1750 — both copies are in the same file, so extract the 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1740` calls `Min` and `ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1664` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) ShapeEngine/Geometry/RectDef/RectMargins.cs:161 — ShapeEngine/Geometry/RectDef/RectMargins.cs:161-170 | ShapeEngine/Geometry/RectDef/RectMargins.cs:193-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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/RectDef/RectMargins.cs:161` 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. 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) ShapeEngine/Serialization/XmlClassSerializer.cs:110 — ShapeEngine/Serialization/XmlClassSerializer.cs:110-119 | ShapeEngine/Serialization/XmlDataObjectSerializer.cs:123-132 — before extracting anything, compare `ShapeEngine/Serialization/XmlClassSerializer.cs` and `ShapeEngine/Serialization/XmlDataObjectSerializer.cs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:430 — Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:430-439 | Examples/Scenes/ExampleScenes/StripedShapeDrawingExample.cs:930-939 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:430` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) Examples/Scenes/ExampleScenes/ControlNodeExampleScene.cs:362 — Examples/Scenes/ExampleScenes/ControlNodeExampleScene.cs:362-371 | Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:529-541 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/ControlNodeExampleScene.cs:362` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:563 — Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:563-572 | Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:575-584 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:563` 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. 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) Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:794 — Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:794-803 | Examples/Scenes/ExampleScenes/PathfinderExample.cs:300-310 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:794` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) Examples/Scenes/ExampleScenes/DataExample.cs:268 — Examples/Scenes/ExampleScenes/DataExample.cs:268-277 | Examples/Scenes/ExampleScenes/JsonDataExample.cs:346-355 — before extracting anything, compare `Examples/Scenes/ExampleScenes/DataExample.cs` and `Examples/Scenes/ExampleScenes/JsonDataExample.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×23
  • Duplicated block (14 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:132 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:132-145 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:138-151 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 (14 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:170 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:170-183 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:174-187 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 (14 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:208 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:208-221 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:210-223 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 (14 lines × 2) ShapeEngine/Content/ContentManager.cs:275 — ShapeEngine/Content/ContentManager.cs:275-288 | ShapeEngine/Content/ContentManager.cs:329-342 — both copies are in the same file, so extract the 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 `ShapeEngine/Content/ContentManager.cs:275` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:208 — ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:208-221 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:289-302 — 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 `ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:208` it does not close everything it opens, so those 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, `ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:222` calls `Normalize` and `ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:303` 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 (14 lines × 2) ShapeEngine/Screen/ScreenTexture.cs:419 — ShapeEngine/Screen/ScreenTexture.cs:419-432 | ShapeEngine/Screen/ScreenTexture.cs:449-462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) REDACTED:64 — REDACTED:64-77 | REDACTED:60-73 — 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 `REDACTED:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:564 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:564-577 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:316-329 — before extracting anything, compare `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 299 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:564` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/IShape.cs:89 — ShapeEngine/Geometry/IShape.cs:89-102 | ShapeEngine/Geometry/Shape.cs:189-202 — before extracting anything, compare `ShapeEngine/Geometry/IShape.cs` and `ShapeEngine/Geometry/Shape.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) ShapeEngine/Geometry/IShape.cs:112 — ShapeEngine/Geometry/IShape.cs:112-125 | ShapeEngine/Geometry/Shape.cs:212-225 — before extracting anything, compare `ShapeEngine/Geometry/IShape.cs` and `ShapeEngine/Geometry/Shape.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) ShapeEngine/Geometry/IShape.cs:135 — ShapeEngine/Geometry/IShape.cs:135-148 | ShapeEngine/Geometry/Shape.cs:235-248 — before extracting anything, compare `ShapeEngine/Geometry/IShape.cs` and `ShapeEngine/Geometry/Shape.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) ShapeEngine/Geometry/IShape.cs:158 — ShapeEngine/Geometry/IShape.cs:158-171 | ShapeEngine/Geometry/Shape.cs:258-271 — before extracting anything, compare `ShapeEngine/Geometry/IShape.cs` and `ShapeEngine/Geometry/Shape.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:20 — ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:20-33 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:62-75 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) REDACTED:390 — REDACTED:390-403 | ShapeEngine/Content/ContentPack.cs:536-549 — 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:390` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:274 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:274-287 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1039-1052 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:274` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:324 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:324-337 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:960-973 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:324` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:404 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:404-417 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1148-1161 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:404` 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) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:465 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:465-478 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:608-621 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:465` 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) ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:294 — ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:294-307 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:354-367 — both copies are in the same file, so extract the 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 `other` to `Quad` in one and `Rect` 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 (14 lines × 2) ShapeEngine/Text/BitmapFontAtlas.cs:368 — ShapeEngine/Text/BitmapFontAtlas.cs:368-381 | ShapeEngine/Text/BitmapFontAtlas.cs:444-457 — both copies are in the same file, so extract the 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 `ShapeEngine/Text/BitmapFontAtlas.cs:368` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) REDACTED:34 — REDACTED:34-47 | REDACTED:161-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) ResourcePacker/Program.cs:251 — ResourcePacker/Program.cs:251-264 | ResourcePacker/Program.cs:453-466 — both copies are in the same file, so extract the 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 `ResourcePacker/Program.cs:251` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) Examples/Scenes/ExampleScenes/PolylineInflationExample.cs:269 — Examples/Scenes/ExampleScenes/PolylineInflationExample.cs:269-282 | Examples/Scenes/ExampleScenes/PolylineInflationExample.cs:287-300 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/PolylineInflationExample.cs:269` 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.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×23
  • Duplicated block (6 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1226 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1226-1231 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1263-1268 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1226` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1456 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1456-1461 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1493-1498 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1456` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:298 — ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:298-303 | ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:311-316 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:28 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:28-33 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:33-38 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:193 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:193-198 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:229-234 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:193` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:229 — ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:229-234 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:272-277 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:229` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:195 — ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:195-200 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:880-885 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:877` calls `foreach` and `ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:192` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:733 — ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:733-738 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:800-805 — both copies are in the same file, so extract the 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 `other` to `Polygon` in one and `Polyline` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) ShapeEngine/Audio/AudioDevice.cs:731 — ShapeEngine/Audio/AudioDevice.cs:731-736 | ShapeEngine/Audio/AudioDevice.cs:785-790 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:52 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:52-57 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:94-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:346 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:346-351 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:458-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) ShapeEngine/Serialization/DataObjectDict.cs:151 — ShapeEngine/Serialization/DataObjectDict.cs:151-156 | ShapeEngine/Serialization/DataObjectList.cs:240-245 — 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 `ShapeEngine/Serialization/DataObjectDict.cs:151` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Serialization/DataObjectDict.cs:149` calls `ToList` and `ShapeEngine/Serialization/DataObjectList.cs:238` 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 lines × 2) ShapeEngine/Serialization/DataObjectDict.cs:270 — ShapeEngine/Serialization/DataObjectDict.cs:270-275 | ShapeEngine/Serialization/DataObjectList.cs:271-276 — 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 `ShapeEngine/Serialization/DataObjectDict.cs:270` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Serialization/DataObjectDict.cs:268` calls `ToList` and `ShapeEngine/Serialization/DataObjectList.cs:269` 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 lines × 2) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:329 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:329-334 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:863-868 — before extracting anything, compare `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 299 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:329` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:357 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:357-362 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:891-896 — before extracting anything, compare `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 299 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:357` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:135 — ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:135-140 | ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:150-155 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:135` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:156` calls `OverlapSegmentCircle` and `ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:141` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) ShapeEngine/Core/Logging/Logger.cs:67 — ShapeEngine/Core/Logging/Logger.cs:67-72 | ShapeEngine/StaticLib/ShapeLogger.cs:106-111 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonCollider.cs:65 — ShapeEngine/Geometry/PolygonDef/PolygonCollider.cs:65-70 | ShapeEngine/Geometry/PolygonDef/PolygonShape.cs:68-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) ShapeEngine/Geometry/RectDef/Rect.cs:1285 — ShapeEngine/Geometry/RectDef/Rect.cs:1285-1290 | ShapeEngine/Geometry/TriangleDef/Triangle.cs:1305-1310 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) Examples/Scenes/ExampleScenes/PathfinderExample2.cs:610 — Examples/Scenes/ExampleScenes/PathfinderExample2.cs:610-615 | Examples/Scenes/ExampleScenes/PathfinderExample2.cs:656-661 — both copies are in the same file, so extract the 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) Examples/GameloopExamples.cs:208 — Examples/GameloopExamples.cs:208-213 | Examples/GameloopExamples.cs:218-223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) Examples/Scenes/ExampleScenes/InputExample.cs:103 — Examples/Scenes/ExampleScenes/InputExample.cs:103-109 | Examples/Scenes/ExampleScenes/InputExample.cs:374-379 — both copies are in the same file, so extract the 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, `Examples/Scenes/ExampleScenes/InputExample.cs:101` calls `Lerp` and `Examples/Scenes/ExampleScenes/InputExample.cs:372` 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 lines × 2) Examples/Scenes/ExampleScenes/SavegameExample.cs:202 — Examples/Scenes/ExampleScenes/SavegameExample.cs:202-207 | Examples/Scenes/ExampleScenes/SavegameExample.cs:309-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.
D3 · God Classes · FileTooLong · ×22
  • FileTooLong: CollisionSystem/Collider.cs ShapeEngine/Geometry/CollisionSystem/Collider.cs — FileTooLong — 1306 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 806 over it, 2.61× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: QuadDef/QuadDrawing.cs ShapeEngine/Geometry/QuadDef/QuadDrawing.cs — FileTooLong — 1159 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 659 over it, 2.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Content/ContentPack.cs ShapeEngine/Content/ContentPack.cs — FileTooLong — 959 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 459 over it, 1.92× 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: QuadDef/QuadIntersectShape.cs ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs — FileTooLong — 854 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 354 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: QuadDef/QuadClosestPoint.cs ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs — FileTooLong — 733 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 233 over it, 1.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: RectDef/RectClosestPoint.cs ShapeEngine/Geometry/RectDef/RectClosestPoint.cs — FileTooLong — 733 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 233 over it, 1.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: TriangleDef/TriangleDrawing.cs ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs — FileTooLong — 699 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 199 over it, 1.40× 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: CircleDef/CircleDrawing.cs ShapeEngine/Geometry/CircleDef/CircleDrawing.cs — FileTooLong — 685 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 185 over it, 1.37× 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: TriangleDef/TriangleIntersectShape.cs ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs — FileTooLong — 685 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 185 over it, 1.37× 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/GameWindow.cs ShapeEngine/Core/GameWindow.cs — FileTooLong — 661 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 161 over it, 1.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: QuadDef/QuadDrawingStriped.cs ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs — FileTooLong — 658 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 158 over it, 1.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: TriangleDef/TriangleDrawingStriped.cs ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs — FileTooLong — 656 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 156 over it, 1.31× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: RectDef/RectDrawingStriped.cs ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs — FileTooLong — 649 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 149 over it, 1.30× 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: CircleDef/CircleDrawingStriped.cs ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs — FileTooLong — 639 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 139 over it, 1.28× 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: PolygonDef/PolygonDrawingStriped.cs ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs — FileTooLong — 610 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 110 over it, 1.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Pathfinding/Pathfinder.cs ShapeEngine/Pathfinding/Pathfinder.cs — FileTooLong — 573 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 73 over it, 1.15× 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: TriangleDef/TriangleClosestPoint.cs ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs — FileTooLong — 572 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 72 over it, 1.14× 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: StaticLib/ShapePhysics.cs ShapeEngine/StaticLib/ShapePhysics.cs — FileTooLong — 567 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 67 over it, 1.13× 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: Content/ContentLoader.cs ShapeEngine/Content/ContentLoader.cs — FileTooLong — 565 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 65 over it, 1.13× 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: CollisionSystem/IntersectionPoints.cs ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs — FileTooLong — 544 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 44 over it, 1.09× 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: UI/ControlNode.cs ShapeEngine/UI/ControlNode.cs — FileTooLong — 537 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 37 over it, 1.07× 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: RectDef/RectIntersectShape2.cs ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs — FileTooLong — 510 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 10 over it, 1.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.
D17 · Explicit Debt · Dead code · ×21
  • Dead code: ReadLastLineLargeFile ShapeEngine/Content/ContentPack.cs:2299 — Method ReadLastLineLargeFile — Roslyn's SymbolFinder walked every project the solution loads, including ShapeEngine, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: GetCoordinatesWorld ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:779 — Method GetCoordinatesWorld — Roslyn's SymbolFinder walked every project the solution loads, including ShapeEngine, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: GetNeighborNode ShapeEngine/Pathfinding/Pathfinder.cs:1230 — Method GetNeighborNode — Roslyn's SymbolFinder walked every project the solution loads, including ShapeEngine, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: Wrap ShapeEngine/Screen/ShapeCamera.cs:559 — Method Wrap — Roslyn's SymbolFinder walked every project the solution loads, including ShapeEngine, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: RunAllTests ShapeEngine/Stats/StatSet.cs:972 — Method RunAllTests — Roslyn's SymbolFinder walked every project the solution loads, including ShapeEngine, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: GetClosestNode ShapeEngine/UI/ControlNodeNavigator.cs:346 — Method GetClosestNode — Roslyn's SymbolFinder walked every project the solution loads, including ShapeEngine, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: PreviousColorscheme Examples/Colors.cs:103 — Method PreviousColorscheme — Roslyn's SymbolFinder walked every project the solution loads, including Examples, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: ApplyColorscheme Examples/Colors.cs:120 — Method ApplyColorscheme — Roslyn's SymbolFinder walked every project the solution loads, including Examples, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: GetShaderName Examples/GameloopExamples.cs:912 — Method GetShaderName — Roslyn's SymbolFinder walked every project the solution loads, including Examples, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: GetRandomFont Examples/GameloopExamples.cs:948 — Method GetRandomFont — Roslyn's SymbolFinder walked every project the solution loads, including Examples, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: NextShip Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:313 — Method NextShip — Roslyn's SymbolFinder walked every project the solution loads, including Examples, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: AsteroidMinSize Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:267 — Field AsteroidMinSize — Roslyn's SymbolFinder walked every project the solution loads, including Examples, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: NextSavegameSlot Examples/Scenes/ExampleScenes/SavegameExample.cs:558 — Method NextSavegameSlot — Roslyn's SymbolFinder walked every project the solution loads, including Examples, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: PreviousSavegameSlot Examples/Scenes/ExampleScenes/SavegameExample.cs:568 — Method PreviousSavegameSlot — Roslyn's SymbolFinder walked every project the solution loads, including Examples, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: ResetProfileData Examples/Scenes/ExampleScenes/SavegameExample.cs:609 — Method ResetProfileData — Roslyn's SymbolFinder walked every project the solution loads, including Examples, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: ParseShapeTypeEnum Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1978 — Method ParseShapeTypeEnum — Roslyn's SymbolFinder walked every project the solution loads, including Examples, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: ParseShapeModeEnum Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1987 — Method ParseShapeModeEnum — Roslyn's SymbolFinder walked every project the solution loads, including Examples, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: StatExamples Examples/Scenes/ExampleScenes/StatSystemExample.cs:21 — NamedType StatExamples — Roslyn's SymbolFinder walked every project the solution loads, including Examples, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: DrawScreenInfoDebug Examples/Scenes/MainScene.cs:342 — Method DrawScreenInfoDebug — Roslyn's SymbolFinder walked every project the solution loads, including Examples, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: BasicButton Examples/UIElements/BasicButton.cs:7 — NamedType BasicButton — Roslyn's SymbolFinder walked every project the solution loads, including Examples, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: ReadLastLineLargeFile REDACTED:551 — Method ReadLastLineLargeFile — Roslyn's SymbolFinder walked every project the solution loads, including ResourcePacker, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
D3 · God Classes · MethodTooLong · ×21
  • MethodTooLong: Polygon.GenerateStripedSegments ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:149 — MethodTooLong — GenerateStripedSegments runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Triangle.DrawLinesPercentageHelper ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1116 — MethodTooLong — DrawLinesPercentageHelper runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TextFont.DrawTextWrapChar ShapeEngine/Text/TextFont.cs:476 — MethodTooLong — DrawTextWrapChar runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Program.ConstructUnpackCommand ResourcePacker/Program.cs:426 — MethodTooLong — ConstructUnpackCommand runs 149 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Program.ConstructPackCommand ResourcePacker/Program.cs:183 — MethodTooLong — ConstructPackCommand runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Quad.DrawCorners ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:589 — MethodTooLong — DrawCorners runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Triangle.DrawCorners ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:228 — MethodTooLong — DrawCorners runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Quad.DrawCorners ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:807 — MethodTooLong — DrawCorners runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Triangle.DrawCornersRelative ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:475 — MethodTooLong — DrawCornersRelative runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Quad.DrawLinesPercentage ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:249 — MethodTooLong — DrawLinesPercentage runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Quad.GetClosestPoint ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:525 — MethodTooLong — GetClosestPoint runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Quad.GetClosestPoint ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:707 — MethodTooLong — GetClosestPoint runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Rect.GetClosestPoint ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:520 — MethodTooLong — GetClosestPoint runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Rect.GetClosestPoint ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:700 — MethodTooLong — GetClosestPoint runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Game.Game(…) ShapeEngine/Core/GameDef/Game.cs:460 — MethodTooLong — Game(…) runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Game.RunGameloop ShapeEngine/Core/GameDef/GameGameloop.cs:62 — MethodTooLong — RunGameloop runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Triangle.DrawLinesHelper ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:940 — MethodTooLong — DrawLinesHelper runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Circle.GenerateStripedSegments ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:127 — MethodTooLong — GenerateStripedSegments runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Quad.GenerateStripedSegments ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:131 — MethodTooLong — GenerateStripedSegments runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Rect.GenerateStripedSegments ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:131 — MethodTooLong — GenerateStripedSegments runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Triangle.GenerateStripedSegments ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:131 — MethodTooLong — GenerateStripedSegments runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× 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 · Duplicated block (9 lines × 2) · ×21
  • Duplicated block (9 lines × 2) ShapeEngine/Geometry/PolygonDef/Polygon.cs:274 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:274-282 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:309-317 — both copies are in the same file, so extract the 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) ShapeEngine/Core/TriangleBatch.cs:611 — ShapeEngine/Core/TriangleBatch.cs:611-619 | ShapeEngine/Core/TriangleBatch.cs:641-649 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:158 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:158-166 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:184-192 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs: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. 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) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:92 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:92-100 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:111-119 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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) ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:799 — ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:799-807 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:814-822 — 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 `ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:799` it does not close everything it opens, so those exact lines 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) ShapeEngine/Audio/AudioDevice.cs:759 — ShapeEngine/Audio/AudioDevice.cs:759-767 | ShapeEngine/Audio/AudioDevice.cs:808-816 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:154 — ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:154-162 | ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:212-220 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:154` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:123 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:123-131 | ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:148-156 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:123` 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. 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 `other` to `Ray` in one and `Segment` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) ShapeEngine/ShapeClipper/ShapeClipper64.cs:309 — ShapeEngine/ShapeClipper/ShapeClipper64.cs:309-317 | ShapeEngine/ShapeClipper/ShapeClipper64.cs:482-490 — both copies are in the same file, so extract the 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, `ShapeEngine/ShapeClipper/ShapeClipper64.cs:492` calls `Clear` and `ShapeEngine/ShapeClipper/ShapeClipper64.cs:319` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1818 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1818-1826 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1847-1855 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:266 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:266-275 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:323-331 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:266` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1131 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1131-1139 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1156-1164 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1156` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:1166 — ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:1166-1174 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:303-311 — 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) ShapeEngine/Geometry/PolygonDef/PolygonOverlapStatic.cs:130 — ShapeEngine/Geometry/PolygonDef/PolygonOverlapStatic.cs:130-138 | ShapeEngine/Geometry/PolygonDef/PolygonOverlapStatic.cs:170-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 `ShapeEngine/Geometry/PolygonDef/PolygonOverlapStatic.cs:130` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:581 — ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:581-589 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:591-599 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:452 — ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:452-460 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:304-312 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:149 — Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:149-157 | Examples/Scenes/ExampleScenes/StripedShapeDrawingExample.cs:163-171 — 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) Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Destructor.cs:24 — Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Destructor.cs:24-32 | Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Destructor.cs:46-54 — both copies are in the same file, so extract the 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) Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:287 — Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:287-295 | Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:415-423 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:287` it does not close everything it opens, so those 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) Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:986 — Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:986-995 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1131-1139 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:986` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1128` calls `ChangeRotation` and `Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:982` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1877 — Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1877-1885 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:2062-2070 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1877` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:2071` calls `WriteLine` and `Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1886` 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.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×20
  • Edited copy of a member (6 corresponding lines) ShapeEngine/Color/ColorRgba.cs:850 — ShapeEngine/Color/ColorRgba.cs:850-855 | ShapeEngine/Color/ColorRgba.cs:865-870 — 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) ShapeEngine/Core/TextureSurface.cs:93 — ShapeEngine/Core/TextureSurface.cs:93-98 | ShapeEngine/Core/TextureSurface.cs:144-149 — 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) ShapeEngine/Geometry/LineDef/Line.cs:245 — ShapeEngine/Geometry/LineDef/Line.cs:245-250 | ShapeEngine/Geometry/RayDef/Ray.cs:201-206 — 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) ShapeEngine/Core/Logging/Logger.cs:236 — ShapeEngine/Core/Logging/Logger.cs:236-241 | ShapeEngine/StaticLib/ShapeLogger.cs:292-297 — 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) ShapeEngine/Input/InputActionTree.cs:481 — ShapeEngine/Input/InputActionTree.cs:481-486 | ShapeEngine/Input/InputDevice.cs:79-84 — 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) ShapeEngine/Input/ModifierKeyGamepadButton.cs:96 — ShapeEngine/Input/ModifierKeyGamepadButton.cs:96-101 | ShapeEngine/Input/ModifierKeyKeyboardButton.cs:87-92 — 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) ShapeEngine/Input/InputActionTree.cs:435 — ShapeEngine/Input/InputActionTree.cs:435-440 | ShapeEngine/Input/InputActionTreeGroup.cs:136-141 — 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) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:162 — ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:162-170 | ShapeEngine/Geometry/SegmentDef/SegmentMath.cs:212-217 — 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) ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:14 — ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:14-19 | ShapeEngine/Geometry/TriangulationDef/TriangulationMath.cs:50-55 — 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) ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:27 — ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:27-32 | ShapeEngine/Geometry/TriangulationDef/TriangulationMath.cs:77-82 — 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) ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:104 — ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:104-109 | ShapeEngine/Geometry/TriangulationDef/TriangulationMath.cs:212-217 — 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) ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:117 — ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:117-122 | ShapeEngine/Geometry/TriangulationDef/TriangulationMath.cs:226-231 — 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) ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:130 — ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:130-135 | ShapeEngine/Geometry/TriangulationDef/TriangulationMath.cs:240-245 — 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) ShapeEngine/Geometry/QuadDef/Quad.cs:701 — ShapeEngine/Geometry/QuadDef/Quad.cs:701-706 | ShapeEngine/Geometry/TriangleDef/Triangle.cs:903-908 — 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) ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:91 — ShapeEngine/Geometry/SegmentsDef/SegmentsMath.cs:91-96 | ShapeEngine/Geometry/TriangulationDef/TriangulationMath.cs:198-203 — 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) ShapeEngine/Core/Structs/Coordinates.cs:278 — ShapeEngine/Core/Structs/Coordinates.cs:278-283 | ShapeEngine/Geometry/RectDef/Rect.cs:307-312 — 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) ShapeEngine/Core/Structs/ValueRange.cs:436 — ShapeEngine/Core/Structs/ValueRange.cs:436-441 | ShapeEngine/Core/Structs/ValueRangeInt.cs:419-424 — 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) ShapeEngine/Core/Logging/Logger.cs:78 — ShapeEngine/Core/Logging/Logger.cs:78-83 | ShapeEngine/StaticLib/ShapeLogger.cs:117-122 — 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) ShapeEngine/Geometry/CollisionSystem/IntersectionPoint.cs:221 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoint.cs:221-226 | ShapeEngine/Geometry/RayDef/Ray.cs:311-316 — 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) Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:497 — Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:497-502 | Examples/Scenes/ExampleScenes/ShipInputExample.cs:372-378 — 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 · Duplicated block (13 lines × 2) · ×20
  • Duplicated block (13 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1726 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1726-1738 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1859-1871 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:763 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:763-775 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:779-791 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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) ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:214 — ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:214-226 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:311-323 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:214` it does not close everything it opens, so those 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 (13 lines × 2) ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:464 — ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:464-476 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:594-606 — 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 `ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:464` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:245 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:245-257 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:394-406 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:245` 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 (13 lines × 2) ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:303 — ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:303-315 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:354-366 — both copies are in the same file, so extract the 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 `other` to `Quad` in one and `Rect` 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 (13 lines × 2) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:479 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:479-491 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:525-537 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:493` calls `Right`, `Rotate`, `DrawSegment` and `ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:538` 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 × 2) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1740 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1740-1752 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1783-1795 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/PolygonDef/PolygonClipping.cs:517 — ShapeEngine/Geometry/PolygonDef/PolygonClipping.cs:517-530 | ShapeEngine/Geometry/PolygonDef/PolygonClipping.cs:577-589 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:514 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:514-526 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:663-675 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:514` 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 (13 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:95 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:95-107 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:84-96 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 279 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 `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:95` 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. 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) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:119 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:119-131 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:116-128 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 279 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 `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:119` 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. 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) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:143 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:143-155 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:148-160 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 279 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 `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:143` 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. 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) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:295 — ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:295-307 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:1173-1185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:295` 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 (13 lines × 2) ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:471 — ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:471-483 | ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:507-519 — both copies are in the same file, so extract the 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) REDACTED:969 — REDACTED:969-981 | REDACTED:1012-1024 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:969` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) REDACTED:1065 — REDACTED:1065-1077 | REDACTED:1106-1118 — both copies are in the same file, so extract the 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:1065` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:1061` calls `LoadText` and `REDACTED:1104` 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 × 2) REDACTED:1134 — REDACTED:1134-1146 | REDACTED:1180-1192 — both copies are in the same file, so extract the 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:1134` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:583 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:583-595 | ShapeEngine/Geometry/SegmentsDef/Segments.cs:80-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. 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) ShapeEngine/Serialization/JsonClassSerializer.cs:118 — ShapeEngine/Serialization/JsonClassSerializer.cs:118-130 | ShapeEngine/Serialization/JsonStructSerializer.cs:117-129 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×20
  • Duplicated block (12 lines × 2) ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:234 — ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:234-245 | ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:265-276 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:234` it does not close everything it opens, so those 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) ShapeEngine/Geometry/CollisionSystem/CastSpaceEntry.cs:148 — ShapeEngine/Geometry/CollisionSystem/CastSpaceEntry.cs:148-159 | ShapeEngine/Geometry/CollisionSystem/CastSpaceEntry.cs:178-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CollisionSystem/CastSpaceEntry.cs:148` it does not close everything it opens, so those 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) ShapeEngine/Audio/AudioDevice.cs:517 — ShapeEngine/Audio/AudioDevice.cs:517-528 | ShapeEngine/Audio/AudioDevice.cs:547-558 — both copies are in the same file, so extract the 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) REDACTED:316 — REDACTED:316-327 | ShapeEngine/Content/ContentPack.cs:476-487 — 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:316` 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 (12 lines × 2) ShapeEngine/Core/Logging/Logger.cs:351 — ShapeEngine/Core/Logging/Logger.cs:351-362 | ShapeEngine/StaticLib/ShapeLogger.cs:429-440 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Core/Logging/Logger.cs:351` 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. 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) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:107 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:107-118 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:126-137 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:107` 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. 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) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:686 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:686-697 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:790-801 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:686` 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. 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) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:234 — ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:234-245 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:489-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 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) ShapeEngine/Core/Structs/AnchorPoint.cs:196 — ShapeEngine/Core/Structs/AnchorPoint.cs:196-207 | ShapeEngine/Core/Structs/AnchorPoint.cs:229-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandler.cs:389 — ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandler.cs:389-400 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandler.cs:600-611 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandler.cs:389` it does not close everything it opens, so those 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) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:282 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:282-293 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:802-813 — before extracting anything, compare `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 299 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:282` 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. 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) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:128 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:128-139 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:159-170 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:128` it does not close everything it opens, so those 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) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:969 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:969-980 | ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:273-284 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:969` 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. 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) ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:152 — ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:152-163 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:188-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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:152` it does not close everything it opens, so those 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) REDACTED:273 — REDACTED:273-284 | REDACTED:379-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 (12 lines × 2) ShapeEngine/Geometry/PointsDef/Points.cs:487 — ShapeEngine/Geometry/PointsDef/Points.cs:487-498 | ShapeEngine/Geometry/PolylineDef/Polyline.cs:291-303 — 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 `ShapeEngine/Geometry/PointsDef/Points.cs:487` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Geometry/PolylineDef/Polyline.cs:289` calls `MinInt` and `ShapeEngine/Geometry/PointsDef/Points.cs:485` 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 × 2) ShapeEngine/StaticLib/ShapeRegex.cs:25 — ShapeEngine/StaticLib/ShapeRegex.cs:25-36 | ShapeEngine/StaticLib/ShapeRegex.cs:175-186 — both copies are in the same file, so extract the 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) Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Autogun.cs:204 — Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Autogun.cs:204-215 | Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Autogun.cs:233-244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Autogun.cs:204` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) Examples/Scenes/ExampleScenes/PathfinderExample2.cs:158 — Examples/Scenes/ExampleScenes/PathfinderExample2.cs:158-169 | Examples/Scenes/ExampleScenes/PathfinderExample2.cs:187-198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/PathfinderExample2.cs:158` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Ship.cs:60 — Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Ship.cs:60-71 | Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Ship.cs:156-167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×18
  • Edited copy of a member (8 corresponding lines) ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:135 — ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:135-142 | ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:150-158 — 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) ShapeEngine/Geometry/QuadDef/Quad.cs:377 — ShapeEngine/Geometry/QuadDef/Quad.cs:377-384 | ShapeEngine/Geometry/RectDef/Rect.cs:692-699 — 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) ShapeEngine/Core/DecimalQuantizer.cs:43 — ShapeEngine/Core/DecimalQuantizer.cs:43-50 | ShapeEngine/Core/DecimalQuantizer.cs:58-65 — 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) ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:671 — ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:671-678 | ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:691-706 — 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) ShapeEngine/Random/ChanceList.cs:104 — ShapeEngine/Random/ChanceList.cs:104-112 | ShapeEngine/Random/ChanceListIndices.cs: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) ShapeEngine/Geometry/QuadDef/Quad.cs:756 — ShapeEngine/Geometry/QuadDef/Quad.cs:756-764 | ShapeEngine/Geometry/RectDef/Rect.cs:1249-1256 — 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) ShapeEngine/Geometry/RectDef/Rect.cs:1267 — ShapeEngine/Geometry/RectDef/Rect.cs:1267-1275 | ShapeEngine/Geometry/TriangleDef/Triangle.cs:1283-1290 — 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) ShapeEngine/Audio/SFX.cs:43 — ShapeEngine/Audio/SFX.cs:43-50 | ShapeEngine/Audio/SFXLoop.cs:148-156 — 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) ShapeEngine/Random/ChanceList.cs:143 — ShapeEngine/Random/ChanceList.cs:143-150 | ShapeEngine/Random/ChanceListIndices.cs:142-149 — 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) ShapeEngine/Color/ColorRgba.cs:1399 — ShapeEngine/Color/ColorRgba.cs:1399-1406 | ShapeEngine/Core/Structs/TransformMatrix2D.cs:527-536 — 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) ShapeEngine/Color/ColorRgba.cs:1414 — ShapeEngine/Color/ColorRgba.cs:1414-1421 | ShapeEngine/Core/Structs/TransformMatrix2D.cs:549-558 — 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) ShapeEngine/Geometry/RectDef/Rect.cs:473 — ShapeEngine/Geometry/RectDef/Rect.cs:473-481 | ShapeEngine/Geometry/TriangleDef/Triangle.cs:220-227 — 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) ShapeEngine/Geometry/RectDef/Rect.cs:495 — ShapeEngine/Geometry/RectDef/Rect.cs:495-503 | ShapeEngine/Geometry/TriangleDef/Triangle.cs:237-244 — 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) ShapeEngine/Geometry/RectDef/Rect.cs:529 — ShapeEngine/Geometry/RectDef/Rect.cs:529-537 | ShapeEngine/Geometry/TriangleDef/Triangle.cs:254-261 — 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) ShapeEngine/Random/ChanceList.cs:130 — ShapeEngine/Random/ChanceList.cs:130-137 | ShapeEngine/Random/ChanceListIndices.cs:128-135 — 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) ShapeEngine/Core/SlowMotion.cs:40 — ShapeEngine/Core/SlowMotion.cs:40-49 | ShapeEngine/Input/InputActionTreeGroup.cs:99-106 — 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) Examples/Scenes/ExampleScenes/JsonDataExample.cs:156 — Examples/Scenes/ExampleScenes/JsonDataExample.cs:156-163 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:179-186 — 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) Examples/Scenes/ExampleScenes/CameraExample.cs:102 — Examples/Scenes/ExampleScenes/CameraExample.cs:102-112 | Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:390-397 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×18
  • Duplicated block (18 lines × 2) ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:531 — ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:531-548 | ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:576-593 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:462 — ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:462-479 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:503-520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:550 — ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:550-567 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:592-609 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 × 2) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:200 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:200-217 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:285-302 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:200` it does not close everything it opens, so those 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 (18 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1196 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1196-1213 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1426-1443 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1196` 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) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:636 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:636-653 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:568-585 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:636` it does not close everything it opens, so those 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 (18 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:794 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:794-811 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:724-741 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 (18 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:841 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:841-858 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:765-782 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 (18 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:888 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:888-905 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:806-823 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 (18 lines × 2) ShapeEngine/Content/ContentPack.cs:559 — ShapeEngine/Content/ContentPack.cs:559-576 | ShapeEngine/Content/ContentPack.cs:1050-1067 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:323 — ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:323-340 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:502-519 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) ShapeEngine/Serialization/XmlClassSerializer.cs:147 — ShapeEngine/Serialization/XmlClassSerializer.cs:147-164 | ShapeEngine/Serialization/XmlDataObjectSerializer.cs:168-185 — before extracting anything, compare `ShapeEngine/Serialization/XmlClassSerializer.cs` and `ShapeEngine/Serialization/XmlDataObjectSerializer.cs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) ShapeEngine/Geometry/CollisionSystem/CollisionInformation.cs:497 — ShapeEngine/Geometry/CollisionSystem/CollisionInformation.cs:497-514 | ShapeEngine/Geometry/CollisionSystem/CollisionInformation.cs:561-578 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:401 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:401-418 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:475-492 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:401` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1013 — ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1013-1030 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1187-1204 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1013` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (18 lines × 2) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1047 — ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1047-1064 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1220-1237 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1047` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (18 lines × 2) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1081 — ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1081-1098 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1253-1270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1081` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (18 lines × 2) Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:914 — Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:914-931 | Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:475-492 — 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, `Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:912` calls `DebugDraw`, `SetAlpha` and `Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:474` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×16
  • Members sharing a duplicated core (4 members, 50+ identical tokens) ShapeEngine/Audio/AudioDevice.cs:416 — ShapeEngine/Audio/AudioDevice.cs:416-431 | ShapeEngine/Audio/AudioDevice.cs:574-589 | ShapeEngine/Audio/AudioDevice.cs:602-617 | ShapeEngine/Audio/AudioDevice.cs:652-661 — 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) ShapeEngine/Core/TriangleBatch.cs:482 — ShapeEngine/Core/TriangleBatch.cs:482-496 | ShapeEngine/Core/TriangleBatch.cs:529-543 | ShapeEngine/Core/TriangleBatch.cs:610-626 | ShapeEngine/Core/TriangleBatch.cs:640-656 — 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) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:403 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:403-422 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:494-513 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:484-503 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:484-503 — 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) ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:118 — ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:118-155 | ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:168-207 | ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:479-521 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:363-401 — 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) ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:177 — ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:177-191 | ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:292-312 | ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:320-336 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:370-389 — 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) ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:25 — ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:25-49 | ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:84-98 | ShapeEngine/Geometry/RayDef/RayOverlapStatic.cs:55-72 | ShapeEngine/Geometry/RayDef/RayOverlapStatic.cs:85-103 — 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) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:187 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:187-215 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:222-251 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:223-251 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:265-294 — 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) ShapeEngine/Geometry/PolygonDef/PolygonCollider.cs:75 — ShapeEngine/Geometry/PolygonDef/PolygonCollider.cs:75-88 | ShapeEngine/Geometry/PolygonDef/PolygonShape.cs:76-89 | ShapeEngine/Geometry/PolylineDef/PolylineCollider.cs:60-73 | ShapeEngine/Geometry/PolylineDef/PolylineShape.cs:56-69 — 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) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:860 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:860-870 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:881-891 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:908-919 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:930-941 — 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) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:197 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:197-229 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:238-278 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:216-248 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:264-304 — 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) ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:213 — ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:213-244 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:310-348 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:354-449 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:605-726 — 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) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1574 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1574-1615 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1638-1687 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1705-1763 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1838-1903 — 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) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:887 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:887-925 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1499-1540 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:805-833 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1315-1348 — 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) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:67 — ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:67-129 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:198-285 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:1060-1079 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:1089-1108 — 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) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:347 — ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:347-380 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:397-430 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:447-480 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:497-530 — 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) Examples/Scenes/ExampleScenes/InputExample.cs:99 — Examples/Scenes/ExampleScenes/InputExample.cs:99-165 | Examples/Scenes/ExampleScenes/InputExample.cs:371-402 | Examples/Scenes/ExampleScenes/InputExample.cs:469-526 | Examples/Scenes/ExampleScenes/InputExample.cs:593-636 — 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 (7 corresponding lines) · ×15
  • Edited copy of a member (7 corresponding lines) ShapeEngine/Text/TextFont.cs:294 — ShapeEngine/Text/TextFont.cs:294-300 | ShapeEngine/Text/TextFont.cs:309-321 — 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) ShapeEngine/Geometry/CircleDef/Circle.cs:631 — ShapeEngine/Geometry/CircleDef/Circle.cs:631-637 | ShapeEngine/Geometry/CircleDef/Circle.cs:646-652 — 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) ShapeEngine/Geometry/CircleDef/Circle.cs:585 — ShapeEngine/Geometry/CircleDef/Circle.cs:585-591 | ShapeEngine/Geometry/CircleDef/Circle.cs:598-604 — 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) ShapeEngine/Geometry/PolygonDef/Polygon.cs:213 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:213-219 | ShapeEngine/Geometry/PolylineDef/Polyline.cs:225-231 — 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) ShapeEngine/Input/GamepadDevice.cs:977 — ShapeEngine/Input/GamepadDevice.cs:977-983 | ShapeEngine/Input/MouseDevice.cs:779-785 — 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) ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:127 — ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:127-160 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:121-127 — 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) ShapeEngine/Geometry/SegmentDef/SegmentMath.cs:248 — ShapeEngine/Geometry/SegmentDef/SegmentMath.cs:248-255 | ShapeEngine/StaticLib/ShapeVec.cs:653-659 — 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) ShapeEngine/Geometry/CollisionSystem/IntersectionPoint.cs:207 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoint.cs:207-213 | ShapeEngine/Geometry/RayDef/Ray.cs:297-303 — 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) ShapeEngine/Core/Logging/Logger.cs:66 — ShapeEngine/Core/Logging/Logger.cs:66-72 | ShapeEngine/StaticLib/ShapeLogger.cs:105-111 — 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) ShapeEngine/Geometry/RectDef/Rect.cs:1284 — ShapeEngine/Geometry/RectDef/Rect.cs:1284-1290 | ShapeEngine/Geometry/TriangleDef/Triangle.cs:1304-1310 — 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) ShapeEngine/Geometry/PolygonDef/PolygonCollider.cs:64 — ShapeEngine/Geometry/PolygonDef/PolygonCollider.cs:64-70 | ShapeEngine/Geometry/PolygonDef/PolygonShape.cs:67-73 — 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) ShapeEngine/Core/Structs/BitFlag.cs:126 — ShapeEngine/Core/Structs/BitFlag.cs:126-132 | ShapeEngine/Core/Structs/BitFlagLong.cs:127-133 — 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) Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:1056 — Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:1056-1062 | Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:1064-1070 — 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) Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/ExplosivePayload.cs:60 — Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/ExplosivePayload.cs:60-66 | Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Penetrator.cs:48-58 — 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) Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:423 — Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:423-430 | Examples/Scenes/ExampleScenes/CameraAreaDrawExample.cs:52-58 — 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 copy of a member (12 corresponding lines) · ×14
  • Edited copy of a member (12 corresponding lines) ShapeEngine/Core/Structs/Grid.cs:252 — ShapeEngine/Core/Structs/Grid.cs:252-263 | ShapeEngine/Core/Structs/Grid.cs:272-283 — 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) ShapeEngine/Color/Colorscheme.cs:73 — ShapeEngine/Color/Colorscheme.cs:73-84 | ShapeEngine/Color/Colorscheme.cs:93-104 — 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) ShapeEngine/Geometry/CircleDef/Circle.cs:611 — ShapeEngine/Geometry/CircleDef/Circle.cs:611-622 | ShapeEngine/Geometry/CircleDef/Circle.cs:660-672 — 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) ShapeEngine/StaticLib/ShapePhysics.cs:857 — ShapeEngine/StaticLib/ShapePhysics.cs:857-868 | ShapeEngine/StaticLib/ShapePhysics.cs:880-891 — 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) ShapeEngine/StaticLib/ShapeVec.cs:919 — ShapeEngine/StaticLib/ShapeVec.cs:919-933 | ShapeEngine/StaticLib/ShapeVec.cs:952-963 — 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) ShapeEngine/Geometry/RectDef/Rect.cs:227 — ShapeEngine/Geometry/RectDef/Rect.cs:227-239 | ShapeEngine/Geometry/RectDef/Rect.cs:250-261 — 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) ShapeEngine/Input/InputActionTree.cs:191 — ShapeEngine/Input/InputActionTree.cs:191-207 | ShapeEngine/Input/InputActionTreeGroup.cs:25-36 — 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) ShapeEngine/UI/ControlNodeContainer.cs:395 — ShapeEngine/UI/ControlNodeContainer.cs:395-406 | ShapeEngine/UI/ControlNodeContainer.cs:414-425 — 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) ShapeEngine/Geometry/PointsDef/Points.cs:260 — ShapeEngine/Geometry/PointsDef/Points.cs:260-271 | ShapeEngine/Geometry/TriangulationDef/Triangulation.cs:256-267 — 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) ShapeEngine/Geometry/SegmentsDef/Segments.cs:165 — ShapeEngine/Geometry/SegmentsDef/Segments.cs:165-176 | ShapeEngine/Geometry/SegmentsDef/Segments.cs:187-212 — 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) ShapeEngine/UI/ControlNode.cs:623 — ShapeEngine/UI/ControlNode.cs:623-634 | ShapeEngine/UI/RectNode.cs:437-448 — 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) ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:264 — ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:264-278 | ShapeEngine/UI/RectNode.cs:364-375 — 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) ShapeEngine/Input/KeyboardDevice.cs:174 — ShapeEngine/Input/KeyboardDevice.cs:174-185 | ShapeEngine/Input/MouseDevice.cs:287-298 — 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) Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:794 — Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:794-805 | Examples/Scenes/ExampleScenes/PathfinderExample.cs:300-313 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×13
  • Edited copy of a member (13 corresponding lines) ShapeEngine/Text/BitmapFont.cs:156 — ShapeEngine/Text/BitmapFont.cs:156-169 | ShapeEngine/Text/BitmapFont.cs:180-192 — 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) ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:199 — ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:199-213 | ShapeEngine/Geometry/SegmentDef/SegmentOverlap.cs:307-319 — 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) ShapeEngine/Content/ContentLoader.cs:1407 — ShapeEngine/Content/ContentLoader.cs:1407-1419 | ShapeEngine/Content/ContentLoader.cs:1432-1444 — 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) ShapeEngine/Content/ContentLoader.cs:1457 — ShapeEngine/Content/ContentLoader.cs:1457-1469 | ShapeEngine/Content/ContentLoader.cs:1482-1494 — 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) ShapeEngine/Geometry/PointsDef/Points.cs:455 — ShapeEngine/Geometry/PointsDef/Points.cs:455-467 | ShapeEngine/Geometry/PolylineDef/Polyline.cs:256-268 — 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) ShapeEngine/Input/InputState.cs:160 — ShapeEngine/Input/InputState.cs:160-173 | ShapeEngine/Input/InputState.cs:184-196 — 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) ShapeEngine/UI/ControlNode.cs:641 — ShapeEngine/UI/ControlNode.cs:641-653 | ShapeEngine/UI/RectNode.cs:457-469 — 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) ShapeEngine/UI/ControlNodeNavigator.cs:170 — ShapeEngine/UI/ControlNodeNavigator.cs:170-182 | ShapeEngine/UI/ControlNodeNavigator.cs:189-201 — 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) ShapeEngine/Geometry/SegmentDef/SegmentMath.cs:80 — ShapeEngine/Geometry/SegmentDef/SegmentMath.cs:80-92 | ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:473-487 — 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) ShapeEngine/UI/ControlNodeNavigator.cs:367 — ShapeEngine/UI/ControlNodeNavigator.cs:367-379 | ShapeEngine/UI/ControlNodeNavigator.cs:382-394 — 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) ShapeEngine/Geometry/CollisionSystem/BroadphaseBucket.cs:16 — ShapeEngine/Geometry/CollisionSystem/BroadphaseBucket.cs:16-29 | ShapeEngine/Geometry/CollisionSystem/CollisionInformation.cs:233-245 — 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) Examples/Scenes/ExampleScenes/TextBoxExample.cs:83 — Examples/Scenes/ExampleScenes/TextBoxExample.cs:83-95 | Examples/Scenes/ExampleScenes/TextWrapEmphasisExample.cs:187-201 — 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) Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:713 — Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:713-726 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:849-861 — 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 copies of one member (3 members, 8+ corresponding lines) · ×13
  • Edited copies of one member (3 members, 8+ corresponding lines) ShapeEngine/Input/MouseDevice.cs:460 — ShapeEngine/Input/MouseDevice.cs:460-468 | ShapeEngine/Input/MouseDevice.cs:480-487 | ShapeEngine/Input/MouseDevice.cs:599-606 — 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) ShapeEngine/Serialization/XmlClassSerializer.cs:77 — ShapeEngine/Serialization/XmlClassSerializer.cs:77-84 | ShapeEngine/Serialization/XmlDataObjectSerializer.cs:84-91 | ShapeEngine/Serialization/XmlStructSerializer.cs:76-83 — 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) ShapeEngine/Geometry/PointsDef/PointsMath.cs:53 — ShapeEngine/Geometry/PointsDef/PointsMath.cs:53-60 | ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:476-484 | ShapeEngine/Geometry/PolylineDef/PolylineMath.cs:148-156 — 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) ShapeEngine/Geometry/PointsDef/PointsMath.cs:124 — ShapeEngine/Geometry/PointsDef/PointsMath.cs:124-131 | ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:520-528 | ShapeEngine/Geometry/PolylineDef/PolylineMath.cs:202-210 — 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) ShapeEngine/Geometry/PointsDef/PointsMath.cs:142 — ShapeEngine/Geometry/PointsDef/PointsMath.cs:142-149 | ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:535-543 | ShapeEngine/Geometry/PolylineDef/PolylineMath.cs:220-228 — 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) ShapeEngine/Screen/CameraTweenOffset.cs:45 — ShapeEngine/Screen/CameraTweenOffset.cs:45-52 | ShapeEngine/Screen/CameraTweenRotation.cs:38-45 | ShapeEngine/Screen/CameraTweenZoomFactor.cs:38-45 — 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) ShapeEngine/Geometry/PointsDef/PointsMath.cs:88 — ShapeEngine/Geometry/PointsDef/PointsMath.cs:88-95 | ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:505-513 | ShapeEngine/Geometry/PolylineDef/PolylineMath.cs:184-192 — 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) ShapeEngine/Serialization/JsonClassSerializer.cs:61 — ShapeEngine/Serialization/JsonClassSerializer.cs:61-68 | ShapeEngine/Serialization/JsonDataObjectSerializer.cs:72-79 | ShapeEngine/Serialization/JsonStructSerializer.cs:68-75 — 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) ShapeEngine/Geometry/CircleDef/Circle.cs:343 — ShapeEngine/Geometry/CircleDef/Circle.cs:343-351 | ShapeEngine/Geometry/RectDef/Rect.cs:772-782 | ShapeEngine/Geometry/TriangleDef/Triangle.cs:514-521 — 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) ShapeEngine/Screen/CameraTweenOffset.cs:31 — ShapeEngine/Screen/CameraTweenOffset.cs:31-38 | ShapeEngine/Screen/CameraTweenRotation.cs:29-36 | ShapeEngine/Screen/CameraTweenZoomFactor.cs:29-36 — 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) ShapeEngine/Geometry/ShapeList.cs:75 — ShapeEngine/Geometry/ShapeList.cs:75-82 | ShapeEngine/Input/InputActionTree.cs:461-470 | ShapeEngine/Input/InputActionTreeGroup.cs:162-171 — 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) ShapeEngine/Serialization/XmlClassSerializer.cs:91 — ShapeEngine/Serialization/XmlClassSerializer.cs:91-98 | ShapeEngine/Serialization/XmlDataObjectSerializer.cs:103-110 | ShapeEngine/Serialization/XmlStructSerializer.cs:91-98 — 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) ShapeEngine/Serialization/XmlClassSerializer.cs:173 — ShapeEngine/Serialization/XmlClassSerializer.cs:173-180 | ShapeEngine/Serialization/XmlDataObjectSerializer.cs:200-207 | ShapeEngine/Serialization/XmlStructSerializer.cs:173-180 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×13
  • Edited copy of a member (5 corresponding lines) ShapeEngine/Core/Structs/Coordinates.cs:207 — ShapeEngine/Core/Structs/Coordinates.cs:207-211 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:826-830 — 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) ShapeEngine/Input/InputTypeGamepadJoyAxis.cs:107 — ShapeEngine/Input/InputTypeGamepadJoyAxis.cs:107-111 | ShapeEngine/Input/InputTypeGamepadTriggerAxis.cs:84-88 — 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) ShapeEngine/Core/Structs/Size.cs:175 — ShapeEngine/Core/Structs/Size.cs:175-180 | ShapeEngine/StaticLib/ShapeVec.cs:447-451 — 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) ShapeEngine/Core/Structs/ValueRange.cs:141 — ShapeEngine/Core/Structs/ValueRange.cs:141-145 | ShapeEngine/Core/Structs/ValueRangeInt.cs:128-132 — 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) ShapeEngine/Core/Structs/ValueRange.cs:331 — ShapeEngine/Core/Structs/ValueRange.cs:331-335 | ShapeEngine/Core/Structs/ValueRangeInt.cs:273-277 — 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) ShapeEngine/Core/Structs/ValueRange.cs:383 — ShapeEngine/Core/Structs/ValueRange.cs:383-387 | ShapeEngine/Core/Structs/ValueRangeInt.cs:322-326 — 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) ShapeEngine/Input/GamepadDevice.cs:827 — ShapeEngine/Input/GamepadDevice.cs:827-831 | ShapeEngine/Input/MouseDevice.cs:544-548 — 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) ShapeEngine/Geometry/QuadDef/QuadMath.cs:689 — ShapeEngine/Geometry/QuadDef/QuadMath.cs:689-693 | ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:308-312 — 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) ShapeEngine/Input/InputTypeMouseAxis.cs:72 — ShapeEngine/Input/InputTypeMouseAxis.cs:72-76 | ShapeEngine/Input/InputTypeMouseWheelAxis.cs:71-75 — 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) ShapeEngine/Core/Structs/ValueRange.cs:569 — ShapeEngine/Core/Structs/ValueRange.cs:569-573 | ShapeEngine/Core/Structs/ValueRangeInt.cs:467-471 — 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) ShapeEngine/Geometry/QuadDef/QuadMath.cs:649 — ShapeEngine/Geometry/QuadDef/QuadMath.cs:649-653 | ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:294-298 — 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) ShapeEngine/Geometry/QuadDef/QuadMath.cs:668 — ShapeEngine/Geometry/QuadDef/QuadMath.cs:668-672 | ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:321-325 — 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) ShapeEngine/Serialization/DataObjectDict.cs:21 — ShapeEngine/Serialization/DataObjectDict.cs:21-25 | ShapeEngine/Serialization/DataObjectList.cs:54-58 — 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.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×12
  • Edited copy of a member (16 corresponding lines) ShapeEngine/Geometry/TriangleDef/Triangle.cs:643 — ShapeEngine/Geometry/TriangleDef/Triangle.cs:643-658 | ShapeEngine/Geometry/TriangleDef/Triangle.cs:672-687 — 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) ShapeEngine/Geometry/RectDef/RectSplit.cs:154 — ShapeEngine/Geometry/RectDef/RectSplit.cs:154-170 | ShapeEngine/Geometry/RectDef/RectSplit.cs:181-196 — 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) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:362 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:362-378 | ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:85-100 — 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) ShapeEngine/Geometry/PolylineDef/PolylineOverlap.cs:197 — ShapeEngine/Geometry/PolylineDef/PolylineOverlap.cs:197-212 | ShapeEngine/Geometry/PolylineDef/PolylineOverlapStatic.cs:180-195 — 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) ShapeEngine/StaticLib/ShapePhysics.cs:307 — ShapeEngine/StaticLib/ShapePhysics.cs:307-322 | ShapeEngine/StaticLib/ShapePhysics.cs:370-385 — 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) ShapeEngine/Text/TextInputBox.cs:252 — ShapeEngine/Text/TextInputBox.cs:252-267 | ShapeEngine/Text/TextInputBox.cs:274-289 — 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) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1334 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1334-1349 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1358-1374 — 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) ShapeEngine/Screen/ScreenTexture.cs:176 — ShapeEngine/Screen/ScreenTexture.cs:176-191 | ShapeEngine/Screen/ScreenTexture.cs:239-258 — 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) ShapeEngine/Geometry/PolygonDef/Polygon.cs:693 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:693-708 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:832-847 — 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) ShapeEngine/Geometry/LineDef/LineClosestPointStatic.cs:21 — ShapeEngine/Geometry/LineDef/LineClosestPointStatic.cs:21-36 | ShapeEngine/Geometry/RayDef/RayClosestPointStatic.cs:22-45 — 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) ShapeEngine/Core/GameDef/GameSavegameSystem.cs:385 — ShapeEngine/Core/GameDef/GameSavegameSystem.cs:385-400 | ShapeEngine/Core/GameDef/GameSavegameSystem.cs:445-460 — 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) Examples/Scenes/ExampleScenes/JsonDataExample.cs:227 — Examples/Scenes/ExampleScenes/JsonDataExample.cs:227-242 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:250-265 — 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 (11 corresponding lines) · ×12
  • Edited copy of a member (11 corresponding lines) ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:212 — ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:212-222 | ShapeEngine/Geometry/RayDef/RayOverlapStatic.cs:235-245 — 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) ShapeEngine/Audio/AudioDevice.cs:783 — ShapeEngine/Audio/AudioDevice.cs:783-793 | ShapeEngine/Audio/AudioDevice.cs:806-819 — 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) ShapeEngine/Core/TriangleBatch.cs:506 — ShapeEngine/Core/TriangleBatch.cs:506-516 | ShapeEngine/Core/TriangleBatch.cs:553-566 — 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) ShapeEngine/StaticLib/ShapeVec.cs:985 — ShapeEngine/StaticLib/ShapeVec.cs:985-995 | ShapeEngine/StaticLib/ShapeVec.cs:1004-1026 — 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) ShapeEngine/Geometry/LineDef/LineClosestPointStatic.cs:96 — ShapeEngine/Geometry/LineDef/LineClosestPointStatic.cs:96-125 | ShapeEngine/Geometry/RayDef/RayClosestPointStatic.cs:60-70 — 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) ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:121 — ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:121-131 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:114-124 — 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) ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:144 — ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:144-154 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:134-144 — 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) ShapeEngine/Geometry/SegmentsDef/SegmentsOverlap.cs:170 — ShapeEngine/Geometry/SegmentsDef/SegmentsOverlap.cs:170-180 | ShapeEngine/Geometry/SegmentsDef/SegmentsOverlapStatic.cs:143-153 — 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) ShapeEngine/Audio/SFXLoop.cs:134 — ShapeEngine/Audio/SFXLoop.cs:134-144 | ShapeEngine/Audio/Song.cs:57-67 — 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) ShapeEngine/Input/InputSettingsGamepad.cs:86 — ShapeEngine/Input/InputSettingsGamepad.cs:86-96 | ShapeEngine/Input/InputSettingsMouse.cs:86-96 — 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) ShapeEngine/Geometry/CollisionSystem/BroadphaseColliderRegister.cs:66 — ShapeEngine/Geometry/CollisionSystem/BroadphaseColliderRegister.cs:66-76 | ShapeEngine/Geometry/CollisionSystem/BroadphaseStaticColliderRegister.cs:70-81 — 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) Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:561 — Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:561-572 | Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:574-584 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×12
  • Duplicated block (6 lines × 3) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:498 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:498-503 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:380-385 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:379-384 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 314 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) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:545 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:545-550 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:420-425 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:419-424 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 314 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) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:334 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:334-339 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:398-403 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:366-371 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 × 3) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:396 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:396-401 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:467-472 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:430-435 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 × 3) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:469 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:469-474 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:547-552 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:505-510 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 × 3) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:542 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:542-547 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:627-632 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:580-585 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 × 3) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:587 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:587-592 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:679-684 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:627-632 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 × 3) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:632 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:632-637 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:730-735 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:674-679 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 × 3) ShapeEngine/Geometry/PolygonDef/Polygon.cs:373 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:373-378 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:454-459 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:537-542 — 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) ShapeEngine/Core/TriangleBatch.cs:560 — ShapeEngine/Core/TriangleBatch.cs:560-565 | ShapeEngine/Core/TriangleBatch.cs:588-593 | ShapeEngine/Core/TriangleBatch.cs:679-684 — 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, `ShapeEngine/Core/TriangleBatch.cs:586` calls `Color4f` and `ShapeEngine/Core/TriangleBatch.cs:558` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) ShapeEngine/Serialization/XmlClassSerializer.cs:49 — ShapeEngine/Serialization/XmlClassSerializer.cs:49-54 | ShapeEngine/Serialization/XmlDataObjectSerializer.cs:51-56 | ShapeEngine/Serialization/XmlStructSerializer.cs:49-54 — before extracting anything, compare `ShapeEngine/Serialization/XmlClassSerializer.cs` and `ShapeEngine/Serialization/XmlDataObjectSerializer.cs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 3) Examples/GameloopExamples.cs:193 — Examples/GameloopExamples.cs:193-198 | Examples/GameloopExamples.cs:200-205 | Examples/GameloopExamples.cs:207-212 — 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.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×11
  • Members sharing a duplicated core (5 members, 50+ identical tokens) ShapeEngine/Geometry/CircleDef/CircleContains.cs:234 — ShapeEngine/Geometry/CircleDef/CircleContains.cs:234-246 | ShapeEngine/Geometry/PolygonDef/PolygonContains.cs:187-199 | ShapeEngine/Geometry/QuadDef/QuadContains.cs:167-179 | ShapeEngine/Geometry/RectDef/RectContains.cs:224-236 | ShapeEngine/Geometry/TriangleDef/TriangleContains.cs:234-246 — 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) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:580 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:580-586 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:763-769 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:596-602 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:593-599 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:595-601 — 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) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:177 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:177-217 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:230-282 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:294-370 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:379-431 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:439-518 — 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) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:802 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:802-821 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:828-847 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:855-875 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:911-932 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:940-960 — 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) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:506 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:506-548 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:563-604 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:765-793 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:258-300 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:315-356 — 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) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:618 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:618-677 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:692-750 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:805-851 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:370-429 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:444-502 — 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) ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:267 — ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:267-301 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:312-353 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:364-405 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:242-276 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:253-291 — 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) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:348 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:348-369 | ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:407-437 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:259-278 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:309-329 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:319-355 — 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) ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:65 — ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:65-87 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:127-149 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:158-180 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:151-173 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:187-209 — 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) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:378 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:378-395 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:140-155 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:399-417 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:144-160 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:451-469 — 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) REDACTED:965 — REDACTED:965-981 | REDACTED:992-1024 | REDACTED:1033-1052 | REDACTED:1128-1146 | REDACTED:1157-1192 — 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 (10 corresponding lines) · ×11
  • Edited copy of a member (10 corresponding lines) ShapeEngine/Geometry/RectDef/RectContainsStatic.cs:62 — ShapeEngine/Geometry/RectDef/RectContainsStatic.cs:62-71 | ShapeEngine/Geometry/RectDef/RectContainsStatic.cs:87-97 — 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) ShapeEngine/Geometry/CircleDef/CircleOverlapStatic.cs:125 — ShapeEngine/Geometry/CircleDef/CircleOverlapStatic.cs:125-134 | ShapeEngine/Geometry/SegmentDef/SegmentOverlapStatic.cs:153-162 — 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) ShapeEngine/ShapeClipper/ShapeClipper64.cs:231 — ShapeEngine/ShapeClipper/ShapeClipper64.cs:231-240 | ShapeEngine/ShapeClipper/ShapeClipper64.cs:372-384 — 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) ShapeEngine/Geometry/PolygonDef/Polygon.cs:668 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:668-677 | ShapeEngine/Geometry/PolylineDef/Polyline.cs:172-182 — 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) ShapeEngine/ShapeClipper/ShapeClipper64.cs:268 — ShapeEngine/ShapeClipper/ShapeClipper64.cs:268-277 | ShapeEngine/ShapeClipper/ShapeClipper64.cs:415-427 — 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) ShapeEngine/Geometry/SegmentsDef/Segments.cs:219 — ShapeEngine/Geometry/SegmentsDef/Segments.cs:219-228 | ShapeEngine/Geometry/SegmentsDef/Segments.cs:274-285 — 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) ShapeEngine/ShapeClipper/ShapeClipper2D.cs:476 — ShapeEngine/ShapeClipper/ShapeClipper2D.cs:476-485 | ShapeEngine/ShapeClipper/ShapeClipper2D.cs:549-558 — 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) ShapeEngine/Serialization/DataObjectDict.cs:383 — ShapeEngine/Serialization/DataObjectDict.cs:383-392 | ShapeEngine/Serialization/DataObjectList.cs:460-469 — 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) ShapeEngine/Core/Structs/BitFlag.cs:187 — ShapeEngine/Core/Structs/BitFlag.cs:187-196 | ShapeEngine/Core/Structs/BitFlagLong.cs:188-197 — 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) ShapeEngine/Core/Structs/BitFlag.cs:170 — ShapeEngine/Core/Structs/BitFlag.cs:170-179 | ShapeEngine/Core/Structs/BitFlagLong.cs:171-180 — 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) Examples/Scenes/ExampleScenes/JsonDataExample.cs:182 — Examples/Scenes/ExampleScenes/JsonDataExample.cs:182-191 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:205-214 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×11
  • Duplicated block (10 lines × 3) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:67 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:67-76 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:122-131 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:114-123 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 3) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:443 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:443-452 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:484-493 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:527-536 — 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 (10 lines × 3) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:668 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:668-677 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:519-528 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:590-599 — 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 `ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:668` 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. 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 × 3) ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:804 — ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:804-813 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:717-726 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:810-819 — before extracting anything, compare `ShapeEngine/Geometry/LineDef/LineIntersectShape.cs` and `ShapeEngine/Geometry/RayDef/RayIntersectShape.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 203 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 `ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:804` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:589 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:589-598 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:458-467 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:456-465 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 314 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 (10 lines × 3) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:642 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:642-651 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:500-509 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:498-507 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 314 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 (10 lines × 3) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:698 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:698-707 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:543-552 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:542-551 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 314 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 (10 lines × 3) ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:84 — ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:84-95 | ShapeEngine/Geometry/RayDef/RayOverlapStatic.cs:55-64 | ShapeEngine/Geometry/RayDef/RayOverlapStatic.cs:85-94 — 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 `ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:84` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:402 — ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:402-411 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:471-480 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:551-560 — 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 `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.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. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `Triangle` in one and `Quad` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 3) Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:352 — Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:352-361 | Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:332-341 | Examples/Scenes/ExampleScenes/ShipInputExample.cs:246-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 all 3 call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) Examples/Scenes/ExampleScenes/DataExample.cs:90 — Examples/Scenes/ExampleScenes/DataExample.cs:90-99 | Examples/Scenes/ExampleScenes/JsonDataExample.cs:86-95 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:86-95 — before extracting anything, compare `Examples/Scenes/ExampleScenes/DataExample.cs` and `Examples/Scenes/ExampleScenes/JsonDataExample.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×11
  • Duplicated block (7 lines × 3) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:105 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:105-111 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:100-106 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:140-146 — before extracting anything, compare `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 299 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:105` 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. 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) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:343 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:343-349 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:377-383 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:418-424 — 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:343` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:194 — ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:194-200 | ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:359-365 | ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:373-379 — 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) ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:243 — ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:243-249 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:294-300 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:354-360 — 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 `ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:243` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `Triangle` in one and `Quad` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 3) ShapeEngine/Geometry/PolygonDef/Polygon.cs:348 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:348-354 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:423-429 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:506-512 — 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 `ShapeEngine/Geometry/PolygonDef/Polygon.cs:348` it does not close everything it opens, so those 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 (7 lines × 3) REDACTED:320 — REDACTED:320-326 | ShapeEngine/Content/ContentPack.cs:480-486 | ShapeEngine/Content/ContentPack.cs:1432-1438 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (7 lines × 3) ShapeEngine/Geometry/QuadDef/Quad.cs:193 — ShapeEngine/Geometry/QuadDef/Quad.cs:193-199 | ShapeEngine/Geometry/QuadDef/Quad.cs:228-234 | ShapeEngine/Geometry/QuadDef/Quad.cs:261-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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/QuadDef/Quad.cs:193` it does not close everything it opens, so those 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 `pivot` to `AnchorPoint` in one and `Vector2` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 3) ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:299 — ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:299-305 | ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:325-331 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:377-383 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadOverlap.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 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 `ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:299` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, `ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:306` calls `OverlapSegmentSegment` and `ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:385` 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 × 3) ShapeEngine/Text/BitmapFontAtlas.cs:217 — ShapeEngine/Text/BitmapFontAtlas.cs:217-224 | ShapeEngine/Text/BitmapFontAtlas.cs:357-363 | ShapeEngine/Text/BitmapFontAtlas.cs:433-439 — 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, `ShapeEngine/Text/BitmapFontAtlas.cs:353` calls `Max`, `Ceiling`, `Sqrt` and `ShapeEngine/Text/BitmapFontAtlas.cs:215` 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 × 3) ShapeEngine/Screen/CameraTweenOffset.cs:66 — ShapeEngine/Screen/CameraTweenOffset.cs:66-72 | ShapeEngine/Screen/CameraTweenRotation.cs:58-65 | ShapeEngine/Screen/CameraTweenZoomFactor.cs:58-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 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 (7 lines × 3) ShapeEngine/Serialization/XmlClassSerializer.cs:78 — ShapeEngine/Serialization/XmlClassSerializer.cs:78-84 | ShapeEngine/Serialization/XmlDataObjectSerializer.cs:85-91 | ShapeEngine/Serialization/XmlStructSerializer.cs:77-83 — before extracting anything, compare `ShapeEngine/Serialization/XmlClassSerializer.cs` and `ShapeEngine/Serialization/XmlDataObjectSerializer.cs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) · ×10
  • Members sharing a duplicated core (9 members, 50+ identical tokens) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:26 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:26-40 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:26-40 | ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:97-111 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:149-163 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:27-41 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:26-40 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:26-40 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:169-183 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:26-40 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:50 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:50-66 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:50-66 | ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:121-137 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:173-189 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:51-67 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:50-66 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:50-66 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:193-209 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:50-66 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:549 — ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:549-585 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:706-750 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:762-806 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:818-862 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:874-918 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:930-974 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:986-1030 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:1042-1086 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:1098-1142 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:939 — ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:939-965 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:976-1001 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:1012-1038 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:1049-1075 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:1086-1112 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:1123-1149 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:1159-1176 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:1187-1212 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:1223-1248 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) ShapeEngine/Geometry/CollisionSystem/Collider.cs:400 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:400-418 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:425-443 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:450-468 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:475-493 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:500-518 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:525-543 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:550-568 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:575-593 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:600-618 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) ShapeEngine/Geometry/CollisionSystem/Collider.cs:1383 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:1383-1418 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1425-1460 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1467-1502 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1509-1544 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1551-1586 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1593-1628 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1635-1670 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1677-1712 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1719-1754 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) ShapeEngine/Geometry/CollisionSystem/Collider.cs:1849 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:1849-1884 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1896-1931 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1943-1978 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1990-2025 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:2037-2072 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:2084-2119 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:2131-2166 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:2178-2213 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:2225-2260 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:331 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:331-386 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:393-459 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:466-532 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:395-450 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:464-530 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:544-610 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:363-417 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:427-492 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:502-567 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:199 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:199-236 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:246-282 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:292-329 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:204-241 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:249-285 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:293-330 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:184-212 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:224-252 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:264-292 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:386 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:386-516 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:526-698 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:708-880 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:383-513 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:521-693 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:701-873 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:343-440 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:452-579 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:591-718 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×10
  • Edited copy of a member (20 corresponding lines) ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:226 — ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:226-249 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:340-359 — 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) ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:66 — ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:66-85 | ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:96-117 — 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) ShapeEngine/Geometry/PolygonDef/Polygon.cs:1101 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:1101-1120 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:1135-1154 — 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) ShapeEngine/Geometry/PointsDef/Points.cs:479 — ShapeEngine/Geometry/PointsDef/Points.cs:479-498 | ShapeEngine/Geometry/PolylineDef/Polyline.cs:280-303 — 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) ShapeEngine/Geometry/PolygonDef/Polygon.cs:946 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:946-965 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:1029-1049 — 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) ShapeEngine/Core/TriangleBatch.cs:185 — ShapeEngine/Core/TriangleBatch.cs:185-205 | ShapeEngine/Core/TriangleBatch.cs:699-718 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) ShapeEngine/Geometry/PolygonDef/Polygon.cs:267 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:267-286 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:302-321 — 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) ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:231 — ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:231-250 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:212-231 — 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) ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:263 — ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:263-310 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:241-260 — 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) Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:271 — Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:271-298 | Examples/Scenes/ExampleScenes/DelaunayExample.cs:37-56 — 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 (18 corresponding lines) · ×10
  • Edited copy of a member (18 corresponding lines) REDACTED:190 — REDACTED:190-207 | REDACTED:217-238 — 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) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:139 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:139-156 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:224-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) ShapeEngine/Core/TriangleBatch.cs:579 — ShapeEngine/Core/TriangleBatch.cs:579-596 | ShapeEngine/Core/TriangleBatch.cs:668-687 — 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) ShapeEngine/Geometry/PolygonDef/Polygon.cs:868 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:868-885 | ShapeEngine/Geometry/PolylineDef/Polyline.cs:191-208 — 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) ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:38 — ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:38-55 | ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:62-79 — 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) ShapeEngine/Geometry/PointsDef/Points.cs:187 — ShapeEngine/Geometry/PointsDef/Points.cs:187-204 | ShapeEngine/Geometry/PointsDef/Points.cs:212-229 — 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) ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:470 — ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:470-487 | ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:505-523 — 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) ShapeEngine/Color/ColorPalette.cs:240 — ShapeEngine/Color/ColorPalette.cs:240-257 | ShapeEngine/Color/ColorPalette.cs:264-281 — 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) Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Ship.cs:176 — Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Ship.cs:176-208 | Examples/Scenes/ExampleScenes/PathfinderExample2.cs:116-133 — 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) Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/ExplosivePayload.cs:123 — Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/ExplosivePayload.cs:123-140 | Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/TurretPayload.cs:134-151 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×10
  • Edited copy of a member (4 corresponding lines) ShapeEngine/Geometry/SegmentDef/SegmentCollider.cs:80 — ShapeEngine/Geometry/SegmentDef/SegmentCollider.cs:80-83 | ShapeEngine/Geometry/SegmentDef/SegmentShape.cs:95-98 — 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) ShapeEngine/Geometry/LineDef/LineDrawing.cs:140 — ShapeEngine/Geometry/LineDef/LineDrawing.cs:140-143 | ShapeEngine/Geometry/RayDef/RayDrawing.cs:123-126 — 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) ShapeEngine/Geometry/LineDef/Line.cs:143 — ShapeEngine/Geometry/LineDef/Line.cs:143-146 | ShapeEngine/Geometry/RayDef/Ray.cs:120-123 — 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) ShapeEngine/Geometry/LineDef/LineDrawing.cs:156 — ShapeEngine/Geometry/LineDef/LineDrawing.cs:156-159 | ShapeEngine/Geometry/RayDef/RayDrawing.cs:139-142 — 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) ShapeEngine/Geometry/PointsDef/Points.cs:612 — ShapeEngine/Geometry/PointsDef/Points.cs:612-616 | ShapeEngine/Geometry/SegmentsDef/Segments.cs:364-367 — 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) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1020 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1020-1023 | ShapeEngine/Geometry/RectDef/RectDrawing.cs:262-265 — 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) ShapeEngine/Geometry/LineDef/LineClosestPointStatic.cs:141 — ShapeEngine/Geometry/LineDef/LineClosestPointStatic.cs:141-144 | ShapeEngine/Geometry/RayDef/RayClosestPointStatic.cs:119-122 — 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) Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:31 — Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:31-34 | Examples/Scenes/ExampleScenes/StripedShapeDrawingExample.cs:29-32 — 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) Examples/Scenes/ExampleScenes/PathfinderExample2.cs:1068 — Examples/Scenes/ExampleScenes/PathfinderExample2.cs:1068-1071 | Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:497-502 — 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) Examples/Scenes/ExampleScenes/TextBoxExample.cs:45 — Examples/Scenes/ExampleScenes/TextBoxExample.cs:45-49 | Examples/Scenes/ExampleScenes/TextScalingExample.cs:41-44 — 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.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×10
  • Duplicated block (19 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:347 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:347-365 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:593-611 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:424 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:424-442 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:177-195 — before extracting anything, compare `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 299 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:424` 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. 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) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:31 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:31-49 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:30-48 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 135 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:31` 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. 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 (19 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:556 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:556-574 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:715-733 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:31 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:31-49 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:84-102 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:376 — ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:376-394 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:416-434 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:376` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) ShapeEngine/Content/ContentLoader.cs:908 — ShapeEngine/Content/ContentLoader.cs:908-926 | ShapeEngine/Content/ContentLoader.cs:958-976 — both copies are in the same file, so extract the 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 `ShapeEngine/Content/ContentLoader.cs:908` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (19 lines × 2) ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:170 — ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:170-188 | ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:481-499 — 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 `ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:170` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `circleCenter` to `IntersectionPoint b) IntersectCircleLine(Vector2` in one and `Vector2` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (19 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:382 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:382-400 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:381-399 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1185 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 `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:382` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:422 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:422-440 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:421-439 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1185 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 `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:422` it does not close everything it opens, so those 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 · Duplicated block (16 lines × 2) · ×10
  • Duplicated block (16 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:200 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:200-215 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:236-251 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:200` 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. 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) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:236 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:236-251 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:279-294 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:236` 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. 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) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:272 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:272-287 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:322-337 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:272` 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. 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) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1167 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1167-1182 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1398-1413 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1167` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) ShapeEngine/Geometry/QuadDef/QuadMath.cs:71 — ShapeEngine/Geometry/QuadDef/QuadMath.cs:71-86 | ShapeEngine/Geometry/RectDef/RectMath.cs:174-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:254 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:254-269 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:331-346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:254` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:345 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:345-360 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:384-399 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 279 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 `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:345` 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. 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) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:372 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:372-387 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:419-434 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 279 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 `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:372` 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. 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) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:402 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:402-417 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:454-469 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 279 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 `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:402` 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. 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) Examples/Scenes/ExampleScenes/InputExample.cs:432 — Examples/Scenes/ExampleScenes/InputExample.cs:432-447 | Examples/Scenes/ExampleScenes/InputExample.cs:556-571 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/InputExample.cs:432` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D2 · Cognitive Complexity · CollisionHandler.IntersectSpace (cognitive 23) · ×9
  • CollisionHandler.IntersectSpace (cognitive 23) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:150 — CollisionHandler.IntersectSpace 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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.IntersectSpace (cognitive 23) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:207 — CollisionHandler.IntersectSpace 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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.IntersectSpace (cognitive 23) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:264 — CollisionHandler.IntersectSpace 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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.IntersectSpace (cognitive 23) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:321 — CollisionHandler.IntersectSpace 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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.IntersectSpace (cognitive 23) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:378 — CollisionHandler.IntersectSpace 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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.IntersectSpace (cognitive 23) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:435 — CollisionHandler.IntersectSpace 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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.IntersectSpace (cognitive 23) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:492 — CollisionHandler.IntersectSpace 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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.IntersectSpace (cognitive 23) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:549 — CollisionHandler.IntersectSpace 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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.IntersectSpace (cognitive 23) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:606 — CollisionHandler.IntersectSpace 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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, CollisionHandler.IntersectSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
D2 · Cognitive Complexity · CollisionHandler.CastSpace (cognitive 17) · ×9
  • CollisionHandler.CastSpace (cognitive 17) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:174 — CollisionHandler.CastSpace has cognitive complexity 17 (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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.CastSpace, CollisionHandler.CastSpace, CollisionHandler.CastSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.CastSpace (cognitive 17) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:210 — CollisionHandler.CastSpace has cognitive complexity 17 (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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.CastSpace, CollisionHandler.CastSpace, CollisionHandler.CastSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.CastSpace (cognitive 17) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:246 — CollisionHandler.CastSpace has cognitive complexity 17 (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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.CastSpace, CollisionHandler.CastSpace, CollisionHandler.CastSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.CastSpace (cognitive 17) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:282 — CollisionHandler.CastSpace has cognitive complexity 17 (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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.CastSpace, CollisionHandler.CastSpace, CollisionHandler.CastSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.CastSpace (cognitive 17) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:318 — CollisionHandler.CastSpace has cognitive complexity 17 (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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.CastSpace, CollisionHandler.CastSpace, CollisionHandler.CastSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.CastSpace (cognitive 17) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:354 — CollisionHandler.CastSpace has cognitive complexity 17 (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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.CastSpace, CollisionHandler.CastSpace, CollisionHandler.CastSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.CastSpace (cognitive 17) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:390 — CollisionHandler.CastSpace has cognitive complexity 17 (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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.CastSpace, CollisionHandler.CastSpace, CollisionHandler.CastSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.CastSpace (cognitive 17) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:426 — CollisionHandler.CastSpace has cognitive complexity 17 (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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.CastSpace, CollisionHandler.CastSpace, CollisionHandler.CastSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
  • CollisionHandler.CastSpace (cognitive 17) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:501 — CollisionHandler.CastSpace has cognitive complexity 17 (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. This shape REPEATS in the file: 8 other methods here (CollisionHandler.CastSpace, CollisionHandler.CastSpace, CollisionHandler.CastSpace, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×9
  • Edited copy of a member (21 corresponding lines) ShapeEngine/Geometry/QuadDef/QuadOverlapStatic.cs:102 — ShapeEngine/Geometry/QuadDef/QuadOverlapStatic.cs:102-124 | ShapeEngine/Geometry/TriangleDef/TriangleOverlapStatic.cs:111-131 — 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) ShapeEngine/Geometry/CustomDrawing.cs:234 — ShapeEngine/Geometry/CustomDrawing.cs:234-254 | ShapeEngine/Geometry/CustomDrawing.cs:269-291 — 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) ShapeEngine/ShapeClipper/ShapeClipper64.cs:308 — ShapeEngine/ShapeClipper/ShapeClipper64.cs:308-328 | ShapeEngine/ShapeClipper/ShapeClipper64.cs:481-504 — 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) ShapeEngine/Serialization/DataObjectDict.cs:235 — ShapeEngine/Serialization/DataObjectDict.cs:235-255 | ShapeEngine/Serialization/DataObjectList.cs:204-226 — 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) ShapeEngine/Content/ContentLoader.cs:1177 — ShapeEngine/Content/ContentLoader.cs:1177-1197 | ShapeEngine/Content/ContentLoader.cs:1206-1226 — 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) ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:142 — ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:142-165 | ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:312-332 — 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) Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Destructor.cs:22 — Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Destructor.cs:22-42 | Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Destructor.cs:44-67 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:286 — Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:286-308 | Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:414-434 — 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) Examples/Scenes/ExampleScenes/InputExample.cs:201 — Examples/Scenes/ExampleScenes/InputExample.cs:201-221 | Examples/Scenes/ExampleScenes/InputExample.cs:347-368 — 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 (14 corresponding lines) · ×9
  • Edited copy of a member (14 corresponding lines) ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:183 — ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:183-196 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:230-243 — 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) ShapeEngine/Geometry/PolygonDef/Polygon.cs:727 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:727-741 | ShapeEngine/Geometry/PolylineDef/Polyline.cs:133-146 — 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) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1815 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1815-1830 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1845-1858 — 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) ShapeEngine/Geometry/PolygonDef/PolygonClipping.cs:143 — ShapeEngine/Geometry/PolygonDef/PolygonClipping.cs:143-156 | ShapeEngine/Geometry/PolygonDef/PolygonClipping.cs:184-199 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) ShapeEngine/Text/FontDimensions.cs:233 — ShapeEngine/Text/FontDimensions.cs:233-246 | ShapeEngine/Text/FontDimensions.cs:261-282 — 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) ShapeEngine/Serialization/DataObjectDict.cs:123 — ShapeEngine/Serialization/DataObjectDict.cs:123-137 | ShapeEngine/Serialization/DataObjectList.cs:181-194 — 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) ShapeEngine/Input/InputAction.cs:670 — ShapeEngine/Input/InputAction.cs:670-684 | ShapeEngine/Input/InputAction.cs:693-706 — 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) ShapeEngine/Pathfinding/Pathfinder.cs:1489 — ShapeEngine/Pathfinding/Pathfinder.cs:1489-1502 | ShapeEngine/Pathfinding/Pathfinder.cs:1512-1526 — 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) Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:478 — Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:478-491 | Examples/Scenes/ExampleScenes/ShipInputExample.cs:353-366 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×9
  • Duplicated block (12 lines × 3) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:186 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:186-197 | ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:228-239 | ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:279-290 — 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 first that the copies are not typed on the same thing: the declarations holding them bind `other` to `Triangle` in one and `Quad` 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 (12 lines × 3) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:200 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:200-211 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:205-216 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:185-196 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:293 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:293-304 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:294-305 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:265-276 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:95 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:95-106 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:210-221 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:212-223 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) ShapeEngine/Content/ContentPack.cs:563 — ShapeEngine/Content/ContentPack.cs:563-574 | ShapeEngine/Content/ContentPack.cs:939-950 | ShapeEngine/Content/ContentPack.cs:1054-1065 — 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 (12 lines × 3) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:966 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:966-977 | ShapeEngine/Geometry/RectDef/RectDrawing.cs:668-679 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:839-850 — 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 (12 lines × 3) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:53 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:53-66 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:22-33 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:64-75 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (12 lines × 3) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:470 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:470-482 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:518-529 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:566-577 — 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:470` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:834 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:834-845 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:847-858 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:877-888 — 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 `ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:834` it does not close everything it opens, so those 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 · Duplicated block (9 lines × 3) · ×9
  • Duplicated block (9 lines × 3) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1700 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1700-1708 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1745-1753 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1788-1796 — 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 (9 lines × 3) ShapeEngine/Audio/AudioDevice.cs:417 — ShapeEngine/Audio/AudioDevice.cs:417-425 | ShapeEngine/Audio/AudioDevice.cs:575-583 | ShapeEngine/Audio/AudioDevice.cs:603-611 — 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) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:356 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:356-364 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:356-364 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:355-363 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1185 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 `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:356` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:203 — ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:203-211 | ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:251-259 | ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:295-303 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:203` 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. 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) ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:119 — ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:119-127 | ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:149-157 | ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:181-190 — 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 (9 lines × 3) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:514 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:514-523 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:571-579 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:766-775 — 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs: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. 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, `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:764` calls `ValidateByOther` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:512` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 3) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:629 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:629-637 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:703-711 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:810-819 — 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:629` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 3) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:958 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:958-966 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:971-979 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:984-992 — 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) Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:93 — Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:93-101 | Examples/Scenes/ExampleScenes/PathfinderExample2.cs:96-104 | Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:183-191 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D2 · Cognitive Complexity · BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended (cognitive 28) · ×8
  • BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended (cognitive 28) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:705 — BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended has cognitive complexity 28 (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. This shape REPEATS in the file: 7 other methods here (BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended (cognitive 28) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:761 — BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended has cognitive complexity 28 (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. This shape REPEATS in the file: 7 other methods here (BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended (cognitive 28) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:817 — BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended has cognitive complexity 28 (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. This shape REPEATS in the file: 7 other methods here (BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended (cognitive 28) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:873 — BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended has cognitive complexity 28 (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. This shape REPEATS in the file: 7 other methods here (BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended (cognitive 28) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:929 — BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended has cognitive complexity 28 (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. This shape REPEATS in the file: 7 other methods here (BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended (cognitive 28) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:985 — BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended has cognitive complexity 28 (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. This shape REPEATS in the file: 7 other methods here (BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended (cognitive 28) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:1041 — BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended has cognitive complexity 28 (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. This shape REPEATS in the file: 7 other methods here (BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
  • BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended (cognitive 28) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:1097 — BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended has cognitive complexity 28 (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. This shape REPEATS in the file: 7 other methods here (BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, BroadphaseDynamicSpatialHash.GetCandidateBucketsExtended, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×8
  • Edited copy of a member (15 corresponding lines) ShapeEngine/Geometry/QuadDef/QuadContainsStatic.cs:139 — ShapeEngine/Geometry/QuadDef/QuadContainsStatic.cs:139-153 | ShapeEngine/Geometry/RectDef/RectContainsStatic.cs:155-173 — 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) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:200 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:200-217 | ShapeEngine/Geometry/RectDef/RectDrawing.cs:169-183 — 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) ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:16 — ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:16-30 | ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:39-56 — 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) ResourcePacker/ResourcePackManager.cs:27 — ResourcePacker/ResourcePackManager.cs:27-44 | ResourcePacker/ResourcePackManager.cs:57-71 — 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) ShapeEngine/Pathfinding/Pathfinder.cs:617 — ShapeEngine/Pathfinding/Pathfinder.cs:617-631 | ShapeEngine/Pathfinding/Pathfinder.cs:695-709 — 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) ShapeEngine/Serialization/JsonClassSerializer.cs:157 — ShapeEngine/Serialization/JsonClassSerializer.cs:157-171 | ShapeEngine/Serialization/JsonDataObjectSerializer.cs:171-185 — 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) Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:231 — Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:231-245 | Examples/Scenes/ExampleScenes/StatSystemExample.cs:306-320 — 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) Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:38 — Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:38-52 | Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:70-87 — 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.
IC1 · Incompleteness & stubs · Both branches open with the same statements · ×8
  • Both branches open with the same statements — the condition does not decide them ResourcePacker/Program.cs:246 — The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
  • Both branches open with the same statements — the condition does not decide them ResourcePacker/Program.cs:485 — The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
  • Both branches open with the same statements — the condition does not decide them ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:848 — The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
  • Both branches open with the same statements — the condition does not decide them ShapeEngine/Geometry/TriangleDef/TriangleCollider.cs:60 — The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
  • Both branches open with the same statements — the condition does not decide them ShapeEngine/Geometry/TriangleDef/TriangleCollider.cs:93 — The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
  • Both branches open with the same statements — the condition does not decide them ShapeEngine/Geometry/TriangleDef/TriangleShape.cs:71 — The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
  • Both branches open with the same statements — the condition does not decide them ShapeEngine/Geometry/TriangleDef/TriangleShape.cs:105 — The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
  • Both branches open with the same statements — the condition does not decide them ShapeEngine/Screen/ScreenTexture.cs:417 — The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
AX2 · Stateful singletons · Stateful shared instance · ×7
  • Stateful shared instance: Paths64PooledBuffer ShapeEngine/ShapeClipper/Paths64PooledBuffer.cs:12 — `Paths64PooledBuffer` is not registered, but `Polygon` creates it and keeps it in the static `clipPooledBuffer`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (path64Pool; e.g. `path64Pool` at line 73).
  • Stateful shared instance: Rng ShapeEngine/Random/Rng.cs:12 — `Rng` keeps one instance of itself in the static `Instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Rand, Seed; e.g. `Rand` at line 73).
  • Stateful shared instance: TriMesh ShapeEngine/ShapeClipper/TriMesh.cs:19 — `TriMesh` is not registered, but `ShapeClipperDrawing2D` creates it and keeps it in the static `triMeshBuffer`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (triangleVertices; e.g. `triangleVertices` at line 76).
  • Stateful shared instance: IdCounter ShapeEngine/Core/IdCounter.cs:6 — `IdCounter` is not registered, but `ShapeID` creates it and keeps it in the static `counter`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (count; e.g. `count` at line 19).
  • Stateful shared instance: ColorPalette ShapeEngine/Color/ColorPalette.cs:9 — `ColorPalette` is not registered, but `Colors` creates it and keeps it in the static `colorPalette`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (colors, CurrentColorScheme; e.g. `colors` at line 106).
  • Stateful shared instance: TextFont ShapeEngine/Text/TextFont.cs:17 — `TextFont` is not registered, but `ControlNodeLabel` creates it and keeps it in the static `textFont`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (FontDimensions; e.g. `FontDimensions` at line 123).
  • Stateful shared instance: ChanceList ShapeEngine/Random/ChanceList.cs:16 — `ChanceList` is not registered, but `AsteroidSpawner` creates it and keeps it in the static `ChanceList`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (values; e.g. `values` at line 94).
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×7
  • Edited copies of one member (3 members, 13+ corresponding lines) ShapeEngine/Core/Structs/NinePatchRect.cs:104 — ShapeEngine/Core/Structs/NinePatchRect.cs:104-117 | ShapeEngine/Core/Structs/NinePatchRect.cs:127-140 | ShapeEngine/Core/Structs/NinePatchRect.cs:172-184 — 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) ShapeEngine/Geometry/CircleDef/CircleOverlapStatic.cs:159 — ShapeEngine/Geometry/CircleDef/CircleOverlapStatic.cs:159-173 | ShapeEngine/Geometry/SegmentDef/SegmentOverlap.cs:282-296 | ShapeEngine/Geometry/SegmentDef/SegmentOverlapStatic.cs:190-202 — 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) ShapeEngine/Core/TriangleBatch.cs:335 — ShapeEngine/Core/TriangleBatch.cs:335-347 | ShapeEngine/Core/TriangleBatch.cs:380-392 | ShapeEngine/Core/TriangleBatch.cs:428-443 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 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) ShapeEngine/Geometry/PolygonDef/Polygon.cs:369 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:369-381 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:450-462 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:531-545 — 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) ShapeEngine/Geometry/CollisionSystem/Collider.cs:1315 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:1315-1327 | ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:514-530 | ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:537-549 — 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) ShapeEngine/Input/InputState.cs:138 — ShapeEngine/Input/InputState.cs:138-151 | ShapeEngine/Input/InputState.cs:205-217 | ShapeEngine/Input/InputState.cs:226-238 — 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) ShapeEngine/Audio/SFXLoop.cs:54 — ShapeEngine/Audio/SFXLoop.cs:54-66 | ShapeEngine/Audio/SFXLoop.cs:79-93 | ShapeEngine/Audio/Song.cs:30-42 — 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) · ×7
  • Edited copies of one member (3 members, 9+ corresponding lines) ShapeEngine/Input/GamepadDevice.cs:247 — ShapeEngine/Input/GamepadDevice.cs:247-255 | ShapeEngine/Input/KeyboardDevice.cs:199-207 | ShapeEngine/Input/MouseDevice.cs:164-172 — 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) ShapeEngine/Geometry/CircleDef/CircleContainsStatic.cs:77 — ShapeEngine/Geometry/CircleDef/CircleContainsStatic.cs:77-85 | ShapeEngine/Geometry/QuadDef/QuadContainsStatic.cs:101-110 | ShapeEngine/Geometry/TriangleDef/TriangleContainsStatic.cs:112-120 — 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) ShapeEngine/Input/InputSettingsGamepad.cs:204 — ShapeEngine/Input/InputSettingsGamepad.cs:204-214 | ShapeEngine/Input/InputSettingsKeyboard.cs:149-157 | ShapeEngine/Input/InputSettingsMouse.cs:260-270 — 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) ShapeEngine/Input/InputSettingsGamepad.cs:167 — ShapeEngine/Input/InputSettingsGamepad.cs:167-177 | ShapeEngine/Input/InputSettingsKeyboard.cs:106-114 | ShapeEngine/Input/InputSettingsMouse.cs:176-186 — 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) ShapeEngine/Input/InputSettingsGamepad.cs:117 — ShapeEngine/Input/InputSettingsGamepad.cs:117-127 | ShapeEngine/Input/InputSettingsKeyboard.cs:68-76 | ShapeEngine/Input/InputSettingsMouse.cs:117-127 — 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) Examples/Scenes/ExampleScenes/DataExample.cs:118 — Examples/Scenes/ExampleScenes/DataExample.cs:118-126 | Examples/Scenes/ExampleScenes/JsonDataExample.cs:114-122 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:114-122 — 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) Examples/Scenes/ExampleScenes/DataExample.cs:41 — Examples/Scenes/ExampleScenes/DataExample.cs:41-50 | Examples/Scenes/ExampleScenes/JsonDataExample.cs:47-55 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:46-55 — 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 · Duplicated block (17 lines × 2) · ×7
  • Duplicated block (17 lines × 2) ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:179 — ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:179-195 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:217-233 — both copies are in the same file, so extract the 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 (17 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:308 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:308-324 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:365-381 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:308` 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. 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) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:619 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:619-635 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:371-387 — before extracting anything, compare `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 299 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:619` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:164 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:164-180 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:193-209 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:164` 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. 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 (17 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:174 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:174-190 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:881-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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:174` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:224 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:224-240 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:802-818 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:224` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:563 — ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:563-579 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:702-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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:563` 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. 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 `other` to `Quad` in one and `Rect` 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.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×7
  • Duplicated block (5 lines × 4) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:410 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:410-414 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:432-436 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:390-394 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:412-416 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 (5 lines × 4) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:373 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:373-377 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:462-466 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:452-456 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:451-455 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs` and `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 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 `ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:373` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 4) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:157 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:157-161 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:775-779 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:157-161 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:756-760 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1185 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 × 4) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:182 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:182-186 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:636-640 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:182-186 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:631-635 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1185 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 × 4) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:207 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:207-211 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1025-1029 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:207-211 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:1004-1008 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1185 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 × 4) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:232 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:232-236 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:900-904 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:232-236 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:880-884 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1185 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 × 4) Examples/GameloopExamples.cs:209 — Examples/GameloopExamples.cs:209-213 | Examples/GameloopExamples.cs:214-218 | Examples/GameloopExamples.cs:219-223 | Examples/GameloopExamples.cs:224-228 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×7
  • Duplicated block (10 lines × 4) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:381 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:381-390 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:396-405 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:395-404 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:394-403 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:381` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 4) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:763 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:763-772 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:779-788 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:795-804 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:810-819 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:763` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:647 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:647-656 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:720-729 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:399-408 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:472-481 — before extracting anything, compare `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 299 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:647` it does not close everything it opens, so those 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, `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:646` calls `Normalize` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:719` 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 × 4) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:87 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:87-96 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:81-90 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:81-90 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:81-90 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 314 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 (10 lines × 4) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1585 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1585-1594 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1655-1664 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1729-1738 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1862-1871 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1585` 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. 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 × 4) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:126 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:126-138 | ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:191-203 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:101-110 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:155-164 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:126` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `linePoint` to `float t) IntersectLineRayInfo(Vector2` in one and `Vector2` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 4) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:348 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:348-360 | ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:407-419 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:259-268 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:309-318 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:348` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×6
  • Members sharing a duplicated core (8 members, 50+ identical tokens) REDACTED:272 — REDACTED:272-365 | REDACTED:378-500 | ShapeEngine/Content/ContentPack.cs:430-508 | ShapeEngine/Content/ContentPack.cs:526-616 | ShapeEngine/Content/ContentPack.cs:902-984 | ShapeEngine/Content/ContentPack.cs:1017-1106 | ShapeEngine/Content/ContentPack.cs:1327-1358 | ShapeEngine/Content/ContentPack.cs:1417-1440 — 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.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) ShapeEngine/Content/ContentPack.cs:1920 — ShapeEngine/Content/ContentPack.cs:1920-1948 | ShapeEngine/Content/ContentPack.cs:1962-1990 | ShapeEngine/Content/ContentPack.cs:2006-2034 | ShapeEngine/Content/ContentPack.cs:2048-2076 | ShapeEngine/Content/ContentPack.cs:2090-2118 | ShapeEngine/Content/ContentPack.cs:2132-2160 | ShapeEngine/Content/ContentPack.cs:2174-2202 | ShapeEngine/Content/ContentPack.cs:2216-2244 — 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.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:329 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:329-358 | ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:366-395 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:416-444 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:455-483 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:405-434 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:445-473 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:404-433 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:444-473 — 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.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:175 — ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:175-196 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:211-232 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:247-268 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:283-304 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:319-340 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:355-376 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:391-412 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:427-448 — 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.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:540 — ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:540-563 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:575-598 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:610-633 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:645-668 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:680-703 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:715-738 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:750-773 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:785-808 — 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.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:28 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:28-73 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:84-132 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:443-482 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:492-529 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:538-577 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:586-629 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:639-685 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:694-743 — 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 · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×6
  • Members sharing a duplicated core (6 members, 50+ identical tokens) ShapeEngine/Content/ContentLoader.cs:905 — ShapeEngine/Content/ContentLoader.cs:905-941 | ShapeEngine/Content/ContentLoader.cs:955-986 | ShapeEngine/Content/ContentLoader.cs:1002-1034 | ShapeEngine/Content/ContentLoader.cs:1048-1079 | ShapeEngine/Content/ContentLoader.cs:1093-1124 | ShapeEngine/Content/ContentLoader.cs:1137-1168 — 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) ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:556 — ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:556-568 | ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:575-587 | ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:594-606 | ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:613-625 | ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:632-644 | ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:651-663 — 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) ShapeEngine/Geometry/LineDef/LineDrawing.cs:27 — ShapeEngine/Geometry/LineDef/LineDrawing.cs:27-33 | ShapeEngine/Geometry/LineDef/LineDrawing.cs:44-50 | ShapeEngine/Geometry/LineDef/LineDrawing.cs:61-67 | ShapeEngine/Geometry/LineDef/LineDrawing.cs:78-84 | ShapeEngine/Geometry/LineDef/LineDrawing.cs:95-101 | ShapeEngine/Geometry/LineDef/LineDrawing.cs:117-123 — 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) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:890 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:890-956 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:965-1030 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:880-946 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:953-1018 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:730-785 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:797-852 — 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) ShapeEngine/StaticLib/ShapePhysics.cs:982 — ShapeEngine/StaticLib/ShapePhysics.cs:982-1004 | ShapeEngine/StaticLib/ShapePhysics.cs:1020-1040 | ShapeEngine/StaticLib/ShapePhysics.cs:1130-1150 | ShapeEngine/StaticLib/ShapePhysics.cs:1206-1226 | ShapeEngine/StaticLib/ShapePhysics.cs:1284-1305 | ShapeEngine/StaticLib/ShapePhysics.cs:1365-1386 — 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) ShapeEngine/StaticLib/ShapePhysics.cs:1053 — ShapeEngine/StaticLib/ShapePhysics.cs:1053-1077 | ShapeEngine/StaticLib/ShapePhysics.cs:1092-1114 | ShapeEngine/StaticLib/ShapePhysics.cs:1165-1188 | ShapeEngine/StaticLib/ShapePhysics.cs:1243-1266 | ShapeEngine/StaticLib/ShapePhysics.cs:1322-1345 | ShapeEngine/StaticLib/ShapePhysics.cs:1405-1428 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) · ×6
  • Edited copies of one member (4 members, 17+ corresponding lines) ShapeEngine/Geometry/QuadDef/QuadOverlapStatic.cs:154 — ShapeEngine/Geometry/QuadDef/QuadOverlapStatic.cs:154-170 | ShapeEngine/Geometry/RectDef/RectOverlap.cs:248-271 | ShapeEngine/Geometry/RectDef/RectOverlap.cs:279-298 | ShapeEngine/Geometry/TriangleDef/TriangleOverlapStatic.cs:158-175 — 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.
  • Edited copies of one member (4 members, 17+ corresponding lines) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:90 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:90-107 | ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:115-131 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:230-256 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:209-226 — 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.
  • Edited copies of one member (4 members, 17+ corresponding lines) ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:258 — ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:258-274 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:285-301 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:607-624 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:636-653 — 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.
  • Edited copies of one member (4 members, 17+ corresponding lines) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:1024 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:1024-1040 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:1047-1063 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:1070-1086 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:1093-1109 — 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.
  • Edited copies of one member (4 members, 17+ corresponding lines) ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:361 — ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:361-377 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:387-403 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:413-429 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:471-490 — 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.
  • Edited copies of one member (4 members, 17+ corresponding lines) ShapeEngine/ShapeClipper/ShapeClipper2D.cs:1035 — ShapeEngine/ShapeClipper/ShapeClipper2D.cs:1035-1051 | ShapeEngine/ShapeClipper/ShapeClipper2D.cs:1060-1076 | ShapeEngine/ShapeClipper/ShapeClipper2D.cs:1115-1131 | ShapeEngine/ShapeClipper/ShapeClipper2D.cs:1140-1156 — 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 · Duplicated block (14 lines × 3) · ×6
  • Duplicated block (14 lines × 3) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1408 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1408-1421 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1457-1470 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1231-1244 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 (14 lines × 3) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:341 — ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:341-354 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:366-379 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:391-404 — 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 × 3) ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:199 — ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:199-212 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:239-252 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:279-292 — 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 `ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:199` 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. 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 `other` to `Line` in one and `Ray` 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 (14 lines × 3) ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:221 — ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:221-234 | ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:278-291 | ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:339-352 — 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 × 3) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:338 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:338-351 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:400-413 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:473-486 — 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:338` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `Triangle` in one and `Quad` 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 (14 lines × 3) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:653 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:653-666 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:699-712 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:745-759 — 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 `ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:653` 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.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×6
  • Duplicated block (11 lines × 4) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:34 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:34-44 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:37-47 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:37-47 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:37-47 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 314 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 × 4) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:49 — ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:49-59 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:347-357 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:386-396 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:426-436 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:46` calls `Clear`, `EnsureCapacity` and `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:345` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 4) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:53 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:53-63 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:57-67 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:57-67 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:57-67 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:53` 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. 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 lines × 4) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:422 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:422-432 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:436-446 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:435-445 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:434-444 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:422` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 4) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:50 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:50-60 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:105-115 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:462-472 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:605-615 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:50` it does not close everything it opens, so those 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, `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:101` calls `Clear` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:601` 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 × 4) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:380 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:380-390 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:420-430 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:379-390 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:419-430 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1075 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.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×6
  • Duplicated block (13–14 lines × 2) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:930 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:930-943 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:947-959 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:930` it does not close everything it opens, so those 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 × 2) ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:264 — ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:264-277 | ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:280-292 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:244 — ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:244-256 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:213-226 — before extracting anything, compare `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs` and `ShapeEngine/Geometry/RayDef/RayClosestPoint.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 224 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 `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:244` 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13–14 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:446 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:446-458 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:496-509 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:446` it does not close everything it opens, so those 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, `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:510` calls `DrawTriangle` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:459` 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–14 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:378 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:378-390 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:377-390 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1075 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 (13–14 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:418 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:418-430 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:417-430 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1075 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.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×6
  • Duplicated block (12–13 lines × 2) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:491 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:491-502 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:534-546 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:491` it does not close everything it opens, so those 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–13 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:507 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:507-518 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:550-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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:507` it does not close everything it opens, so those 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–13 lines × 2) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:504 — ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:504-515 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:547-559 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:504` it does not close everything it opens, so those 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–13 lines × 2) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:505 — ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:505-516 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:549-561 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:505` it does not close everything it opens, so those 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–13 lines × 2) Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:123 — Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:123-134 | Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:198-210 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:123` it does not close everything it opens, so those exact lines 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) Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:233 — Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:233-245 | Examples/Scenes/ExampleScenes/StatSystemExample.cs:309-320 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:233` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Examples/Scenes/ExampleScenes/StatSystemExample.cs:307` calls `RotateDeg` and `Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:231` 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×5
  • Edited copy of a member (19 corresponding lines) ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:257 — ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:257-284 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:303-328 — 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) ShapeEngine/Geometry/PointsDef/Points.cs:374 — ShapeEngine/Geometry/PointsDef/Points.cs:374-393 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:582-600 — 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) ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:78 — ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:78-96 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:79-98 — 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) ShapeEngine/Pathfinding/Pathfinder.cs:387 — ShapeEngine/Pathfinding/Pathfinder.cs:387-406 | ShapeEngine/Pathfinding/Pathfinder.cs:430-448 — 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) Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:109 — Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:109-129 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:131-149 — 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 · Members sharing a duplicated core (10 members, 50+ identical tokens) · ×5
  • Members sharing a duplicated core (10 members, 50+ identical tokens) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:25 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:25-37 | ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:25-37 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:51-63 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:25-38 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:25-37 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:25-37 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:25-37 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:25-37 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:25-37 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:25-37 — These 10 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 10 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 10 times.
  • Members sharing a duplicated core (10 members, 50+ identical tokens) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:49 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:49-84 | ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:50-85 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:70-105 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:52-87 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:45-80 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:48-83 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:50-85 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:47-82 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:48-83 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:48-83 — These 10 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 10 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 10 times.
  • Members sharing a duplicated core (10 members, 50+ identical tokens) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:390 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:390-404 | ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:777-791 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:406-420 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:445-459 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:724-738 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:690-704 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:845-859 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:783-797 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:311-325 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:647-661 — These 10 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 10 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 10 times.
  • Members sharing a duplicated core (10 members, 50+ identical tokens) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:941 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:941-955 | ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:803-817 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:429-443 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:481-495 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1554-1568 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:716-730 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:925-939 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:809-823 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:665-679 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1362-1376 — These 10 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 10 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 10 times.
  • Members sharing a duplicated core (10 members, 50+ identical tokens) ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:70 — ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:70-81 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:90-101 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:110-121 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:130-141 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:150-161 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:170-181 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:190-201 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:210-224 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:233-247 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:256-268 — These 10 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 10 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 10 times.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×5
  • Edited copy of a member (24 corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:674 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:674-697 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:778-801 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) ShapeEngine/ShapeClipper/ShapeClipper2D.cs:130 — ShapeEngine/ShapeClipper/ShapeClipper2D.cs:130-154 | ShapeEngine/ShapeClipper/ShapeClipper2D.cs:217-240 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:165 — ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:165-188 | ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:196-219 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:232 — ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:232-255 | ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:263-286 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) ShapeEngine/Geometry/PointsDef/PointsMath.cs:627 — ShapeEngine/Geometry/PointsDef/PointsMath.cs:627-651 | ShapeEngine/Geometry/PointsDef/PointsMath.cs:665-688 — 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 copy of a member (29 corresponding lines) · ×5
  • Edited copy of a member (29 corresponding lines) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:723 — ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:723-751 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:764-792 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) ShapeEngine/Geometry/RectDef/RectCollision.cs:22 — ShapeEngine/Geometry/RectDef/RectCollision.cs:22-50 | ShapeEngine/Geometry/RectDef/RectCollision.cs:63-91 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:191 — ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:191-219 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:170-199 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) Examples/Scenes/ExampleScenes/PathfinderExample.cs:316 — Examples/Scenes/ExampleScenes/PathfinderExample.cs:316-344 | Examples/Scenes/TextExampleScene.cs:375-421 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) Examples/Scenes/ExampleScenes/JsonDataExample.cs:245 — Examples/Scenes/ExampleScenes/JsonDataExample.cs:245-273 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:268-301 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×5
  • Edited copy of a member (23 corresponding lines) ShapeEngine/Core/GameDef/GameSavegameSystem.cs:105 — ShapeEngine/Core/GameDef/GameSavegameSystem.cs:105-127 | ShapeEngine/Core/GameDef/GameSavegameSystem.cs:301-323 — 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) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:75 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:75-97 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:257-283 — 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) ShapeEngine/Input/GamepadDevice.cs:614 — ShapeEngine/Input/GamepadDevice.cs:614-637 | ShapeEngine/Input/KeyboardDevice.cs:384-406 — 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) ShapeEngine/StaticLib/ShapePhysics.cs:519 — ShapeEngine/StaticLib/ShapePhysics.cs:519-542 | ShapeEngine/StaticLib/ShapePhysics.cs:708-730 — 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) Examples/Scenes/ExampleScenes/JsonDataExample.cs:275 — Examples/Scenes/ExampleScenes/JsonDataExample.cs:275-298 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:303-325 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 16+ corresponding lines) ShapeEngine/Geometry/CircleDef/CircleSector.cs:177 — ShapeEngine/Geometry/CircleDef/CircleSector.cs:177-192 | ShapeEngine/Geometry/CircleDef/CircleSector.cs:203-218 | ShapeEngine/Geometry/CircleDef/CircleSector.cs:229-246 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:720 — ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:720-735 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:637-652 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:729-744 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:157 — ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:157-172 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:389-406 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:418-435 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:91 — ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:91-106 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:114-129 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:137-152 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:63 — Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:63-83 | Examples/Scenes/ExampleScenes/PathfinderExample2.cs:54-73 | Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:149-164 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 10+ corresponding lines) ShapeEngine/Serialization/DataObjectDict.cs:45 — ShapeEngine/Serialization/DataObjectDict.cs:45-54 | ShapeEngine/Serialization/DataObjectDict.cs:62-72 | ShapeEngine/Serialization/DataObjectList.cs:83-92 — 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) ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:419 — ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:419-428 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:358-367 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:442-451 — 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) ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:438 — ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:438-447 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:378-387 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:463-472 — 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) ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:459 — ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:459-468 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:398-407 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:484-493 — 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) Examples/Scenes/ExampleScenes/StatSystemExample.cs:28 — Examples/Scenes/ExampleScenes/StatSystemExample.cs:28-37 | Examples/Scenes/ExampleScenes/StatSystemExample.cs:44-53 | Examples/Scenes/ExampleScenes/StatSystemExample.cs:60-70 — 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 · Duplicated block (35 lines × 2) · ×5
  • Duplicated block (35 lines × 2) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:202 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:202-236 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:207-241 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:202` 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. 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 × 2) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:295 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:295-329 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:296-330 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:295` 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. 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 × 2) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:342 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:342-376 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:341-375 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:342` 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. 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 × 2) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:299 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:299-333 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:330-364 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 279 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 `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:299` 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. 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 × 2) Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:70 — Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:70-104 | Examples/Scenes/ExampleScenes/StripedShapeDrawingExample.cs:67-101 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×5
  • Duplicated block (21 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1500 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1500-1520 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1316-1336 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1500` it does not close everything it opens, so those 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 (21 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1226 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1226-1246 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1456-1476 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1226` 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 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1263 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1263-1283 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1493-1513 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1263` 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 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:43 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:43-63 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:43-63 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1185 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 `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:43` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:342 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:342-362 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:342-362 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1185 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 `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:342` it does not close everything it opens, so those 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 · Duplicated block (13–14 lines × 5) · ×5
  • Duplicated block (13–14 lines × 5) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:606 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:606-618 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:790-803 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:621-634 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:617-629 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:620-633 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:606` it does not close everything it opens, so those 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 (13–14 lines × 5) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:746 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:746-758 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:869-882 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:760-773 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:742-754 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:745-758 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:746` it does not close everything it opens, so those 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 (13–14 lines × 5) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:870 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:870-882 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:948-961 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:885-898 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:866-878 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:870-883 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:870` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:994 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:994-1006 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1027-1040 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1010-1023 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:990-1002 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:995-1008 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:994` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1118 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1118-1131 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1106-1119 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1135-1148 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:1114-1126 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:1120-1133 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1118` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×5
  • Duplicated block (12 lines × 4) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:335 — ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:335-346 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:360-371 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:385-396 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:409-420 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:335` 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. 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) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:452 — ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:452-463 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:485-496 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:518-529 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:550-561 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:452` 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. 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) ResourcePacker/Program.cs:209 — ResourcePacker/Program.cs:209-220 | ResourcePacker/Program.cs:251-262 | ResourcePacker/Program.cs:453-464 | ResourcePacker/Program.cs:490-501 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ResourcePacker/Program.cs:209` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 4) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:628 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:628-639 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:767-778 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:892-903 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1017-1028 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:628` it does not close everything it opens, so those 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 × 4) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:623 — ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:623-634 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:748-759 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:872-883 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:996-1007 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:623` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×5
  • Duplicated block (11 lines × 3) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:194 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:194-204 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:252-262 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:329-339 — 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 `ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs: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. 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, `ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:249` calls `DistanceSquared` and `ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:192` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 3) ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:282 — ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:282-293 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:256-267 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:272-282 — before extracting anything, compare `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs` and `ShapeEngine/Geometry/RayDef/RayClosestPoint.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 224 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) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:455 — ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:455-465 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:496-506 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:539-549 — 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 (11 lines × 3) ShapeEngine/Serialization/XmlClassSerializer.cs:29 — ShapeEngine/Serialization/XmlClassSerializer.cs:29-39 | ShapeEngine/Serialization/XmlDataObjectSerializer.cs:31-41 | ShapeEngine/Serialization/XmlStructSerializer.cs:29-39 — before extracting anything, compare `ShapeEngine/Serialization/XmlClassSerializer.cs` and `ShapeEngine/Serialization/XmlDataObjectSerializer.cs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 3) Examples/Scenes/ExampleScenes/DataExample.cs:186 — Examples/Scenes/ExampleScenes/DataExample.cs:186-196 | Examples/Scenes/ExampleScenes/JsonDataExample.cs:195-205 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:218-228 — before extracting anything, compare `Examples/Scenes/ExampleScenes/DataExample.cs` and `Examples/Scenes/ExampleScenes/JsonDataExample.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×5
  • Duplicated block (7 lines × 4) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:146 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:146-152 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:407-413 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:151-157 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:459-465 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 279 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 `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:146` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:94 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:94-101 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:469-476 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:512-518 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:556-562 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:94` it does not close everything it opens, so those 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, `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:94` calls `Clear` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:469` 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 × 4) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:94 — ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:94-101 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:467-474 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:509-515 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:553-559 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:94` it does not close everything it opens, so those 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, `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:94` calls `Clear` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs: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 (7 lines × 4) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:413 — ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:413-420 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:421-427 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:658-665 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:666-672 — 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 (7 lines × 4) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:94 — ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:94-101 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:467-474 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:510-516 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:555-561 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:94` it does not close everything it opens, so those 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, `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:94` calls `Clear` and `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs: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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×5
  • Duplicated block (5 lines × 3) ShapeEngine/Geometry/CustomDrawing.cs:86 — ShapeEngine/Geometry/CustomDrawing.cs:86-90 | ShapeEngine/Geometry/CustomDrawing.cs:127-131 | ShapeEngine/Geometry/CustomDrawing.cs:164-168 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `tailPoint` to `Triangle head) CalculateArrowPoints(Vector2` in one and `Triangle head) CalculateArrowPoints2(Vector2` 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) ShapeEngine/Text/BitmapFontAtlas.cs:321 — ShapeEngine/Text/BitmapFontAtlas.cs:321-325 | ShapeEngine/Text/BitmapFontAtlas.cs:376-380 | ShapeEngine/Text/BitmapFontAtlas.cs:452-456 — 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 `ShapeEngine/Text/BitmapFontAtlas.cs:321` 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 (5 lines × 3) ShapeEngine/Input/InputTypeGamepadButton.cs:37 — ShapeEngine/Input/InputTypeGamepadButton.cs:37-41 | ShapeEngine/Input/InputTypeKeyboardButton.cs:52-56 | ShapeEngine/Input/InputTypeMouseButton.cs:43-47 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 3) ShapeEngine/Input/InputTypeGamepadJoyAxis.cs:79 — ShapeEngine/Input/InputTypeGamepadJoyAxis.cs:79-83 | ShapeEngine/Input/InputTypeGamepadTriggerAxis.cs:56-60 | ShapeEngine/Input/InputTypeMouseAxis.cs:43-47 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 3) ShapeEngine/Input/ModifierKeyGamepadButton.cs:97 — ShapeEngine/Input/ModifierKeyGamepadButton.cs:97-101 | ShapeEngine/Input/ModifierKeyKeyboardButton.cs:88-92 | ShapeEngine/Input/ModifierKeyMouseButton.cs:98-102 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D1 · Cyclomatic Complexity · Circle.DrawStriped (cyclomatic 18) · ×4
  • Circle.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:598 — Circle.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Circle.DrawStriped, Circle.DrawStriped, Circle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Circle.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:738 — Circle.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Circle.DrawStriped, Circle.DrawStriped, Circle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Circle.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:863 — Circle.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Circle.DrawStriped, Circle.DrawStriped, Circle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Circle.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:987 — Circle.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Circle.DrawStriped, Circle.DrawStriped, Circle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
D1 · Cyclomatic Complexity · Quad.DrawStriped (cyclomatic 18) · ×4
  • Quad.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:614 — Quad.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Quad.DrawStriped, Quad.DrawStriped, Quad.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Quad.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:754 — Quad.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Quad.DrawStriped, Quad.DrawStriped, Quad.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Quad.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:878 — Quad.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Quad.DrawStriped, Quad.DrawStriped, Quad.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Quad.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1003 — Quad.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Quad.DrawStriped, Quad.DrawStriped, Quad.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
D1 · Cyclomatic Complexity · Rect.DrawStriped (cyclomatic 18) · ×4
  • Rect.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:610 — Rect.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Rect.DrawStriped, Rect.DrawStriped, Rect.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Rect.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:735 — Rect.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Rect.DrawStriped, Rect.DrawStriped, Rect.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Rect.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:859 — Rect.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Rect.DrawStriped, Rect.DrawStriped, Rect.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Rect.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:983 — Rect.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Rect.DrawStriped, Rect.DrawStriped, Rect.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
D1 · Cyclomatic Complexity · Triangle.DrawStriped (cyclomatic 18) · ×4
  • Triangle.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:613 — Triangle.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Triangle.DrawStriped, Triangle.DrawStriped, Triangle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Triangle.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:739 — Triangle.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Triangle.DrawStriped, Triangle.DrawStriped, Triangle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Triangle.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:863 — Triangle.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Triangle.DrawStriped, Triangle.DrawStriped, Triangle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Triangle.DrawStriped (cyclomatic 18) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:988 — Triangle.DrawStriped has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (Triangle.DrawStriped, Triangle.DrawStriped, Triangle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
D2 · Cognitive Complexity · Circle.DrawStriped (cognitive 35) · ×4
  • Circle.DrawStriped (cognitive 35) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:598 — Circle.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Circle.DrawStriped, Circle.DrawStriped, Circle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Circle.DrawStriped (cognitive 35) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:738 — Circle.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Circle.DrawStriped, Circle.DrawStriped, Circle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Circle.DrawStriped (cognitive 35) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:863 — Circle.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Circle.DrawStriped, Circle.DrawStriped, Circle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Circle.DrawStriped (cognitive 35) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:987 — Circle.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Circle.DrawStriped, Circle.DrawStriped, Circle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
D2 · Cognitive Complexity · Quad.DrawStriped (cognitive 35) · ×4
  • Quad.DrawStriped (cognitive 35) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:614 — Quad.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Quad.DrawStriped, Quad.DrawStriped, Quad.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Quad.DrawStriped (cognitive 35) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:754 — Quad.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Quad.DrawStriped, Quad.DrawStriped, Quad.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Quad.DrawStriped (cognitive 35) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:878 — Quad.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Quad.DrawStriped, Quad.DrawStriped, Quad.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Quad.DrawStriped (cognitive 35) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1003 — Quad.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Quad.DrawStriped, Quad.DrawStriped, Quad.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
D2 · Cognitive Complexity · Rect.DrawStriped (cognitive 35) · ×4
  • Rect.DrawStriped (cognitive 35) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:610 — Rect.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Rect.DrawStriped, Rect.DrawStriped, Rect.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Rect.DrawStriped (cognitive 35) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:735 — Rect.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Rect.DrawStriped, Rect.DrawStriped, Rect.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Rect.DrawStriped (cognitive 35) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:859 — Rect.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Rect.DrawStriped, Rect.DrawStriped, Rect.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Rect.DrawStriped (cognitive 35) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:983 — Rect.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Rect.DrawStriped, Rect.DrawStriped, Rect.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
D2 · Cognitive Complexity · Triangle.DrawStriped (cognitive 35) · ×4
  • Triangle.DrawStriped (cognitive 35) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:613 — Triangle.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Triangle.DrawStriped, Triangle.DrawStriped, Triangle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Triangle.DrawStriped (cognitive 35) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:739 — Triangle.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Triangle.DrawStriped, Triangle.DrawStriped, Triangle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Triangle.DrawStriped (cognitive 35) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:863 — Triangle.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Triangle.DrawStriped, Triangle.DrawStriped, Triangle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Triangle.DrawStriped (cognitive 35) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:988 — Triangle.DrawStriped has cognitive complexity 35 (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. This shape REPEATS in the file: 3 other methods here (Triangle.DrawStriped, Triangle.DrawStriped, Triangle.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
D2 · Cognitive Complexity · Polygon.DrawStriped (cognitive 28) · ×4
  • Polygon.DrawStriped (cognitive 28) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:782 — Polygon.DrawStriped has cognitive complexity 28 (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. This shape REPEATS in the file: 3 other methods here (Polygon.DrawStriped, Polygon.DrawStriped, Polygon.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Polygon.DrawStriped (cognitive 28) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:861 — Polygon.DrawStriped has cognitive complexity 28 (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. This shape REPEATS in the file: 3 other methods here (Polygon.DrawStriped, Polygon.DrawStriped, Polygon.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Polygon.DrawStriped (cognitive 28) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:940 — Polygon.DrawStriped has cognitive complexity 28 (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. This shape REPEATS in the file: 3 other methods here (Polygon.DrawStriped, Polygon.DrawStriped, Polygon.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Polygon.DrawStriped (cognitive 28) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1019 — Polygon.DrawStriped has cognitive complexity 28 (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. This shape REPEATS in the file: 3 other methods here (Polygon.DrawStriped, Polygon.DrawStriped, Polygon.DrawStriped) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
D2 · Cognitive Complexity · Quad.IntersectShape (cognitive 22) · ×4
  • Quad.IntersectShape (cognitive 22) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:933 — Quad.IntersectShape 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.
  • Quad.IntersectShape (cognitive 22) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1400 — Quad.IntersectShape 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. This shape REPEATS in the file: one other method here (Quad.IntersectShape) 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.
  • Quad.IntersectShape (cognitive 22) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1449 — Quad.IntersectShape 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. This shape REPEATS in the file: one other method here (Quad.IntersectShape) 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.
  • Quad.IntersectShape (cognitive 22) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1498 — Quad.IntersectShape 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.
D2 · Cognitive Complexity · Rect.IntersectShape (cognitive 22) · ×4
  • Rect.IntersectShape (cognitive 22) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:242 — Rect.IntersectShape 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.
  • Rect.IntersectShape (cognitive 22) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:749 — Rect.IntersectShape 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. This shape REPEATS in the file: one other method here (Rect.IntersectShape) 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.
  • Rect.IntersectShape (cognitive 22) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:808 — Rect.IntersectShape 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. This shape REPEATS in the file: one other method here (Rect.IntersectShape) 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.
  • Rect.IntersectShape (cognitive 22) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:866 — Rect.IntersectShape 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.
D2 · Cognitive Complexity · Segment.DrawMasked (cognitive 22) · ×4
  • Segment.DrawMasked (cognitive 22) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:346 — Segment.DrawMasked 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. This shape REPEATS in the file: 3 other methods here (Segment.DrawMasked, Segment.DrawMasked, Segment.DrawMasked) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Segment.DrawMasked (cognitive 22) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:396 — Segment.DrawMasked 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. This shape REPEATS in the file: 3 other methods here (Segment.DrawMasked, Segment.DrawMasked, Segment.DrawMasked) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Segment.DrawMasked (cognitive 22) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:446 — Segment.DrawMasked 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. This shape REPEATS in the file: 3 other methods here (Segment.DrawMasked, Segment.DrawMasked, Segment.DrawMasked) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Segment.DrawMasked (cognitive 22) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:496 — Segment.DrawMasked 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. This shape REPEATS in the file: 3 other methods here (Segment.DrawMasked, Segment.DrawMasked, Segment.DrawMasked) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
D35 · Change Coupling · Change coupling · ×4
  • Change coupling: GamepadDeviceManager.cs ↔ KeyboardDevice.cs ShapeEngine/Input/GamepadDeviceManager.cs:1 — `ShapeEngine/Input/GamepadDeviceManager.cs` and `ShapeEngine/Input/KeyboardDevice.cs` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `165f1deb` Fix: Ensure input devices correctly handle active state, resetting us…; `4e260b13` Feat: Introduce InputDeviceBase for unified input device management a…; `3c082415` Feat: HeldButtons and HeldAxis system added the GamepadDevice. Feat: … — run `git show` on any of them.
  • Change coupling: Polygon.cs ↔ SegmentCollider.cs ShapeEngine/Geometry/PolygonDef/Polygon.cs:1 — `ShapeEngine/Geometry/PolygonDef/Polygon.cs` and `ShapeEngine/Geometry/SegmentDef/SegmentCollider.cs` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `32f6e9ea` Intersection functions vs Ray and Line finished for all shapes. Ray a… (at that commit the files were still `ShapeEngine/Core/Shapes/Polygon.cs` and `ShapeEngine/Core/CollisionSystem/SegmentCollider.cs`); `1a635ba2` CircleSectorCollider added. (at that commit the files were still `ShapeEngine/Core/Shapes/Polygon.cs` and `ShapeEngine/Core/Collision/SegmentCollider.cs`); `6fae2b80` Transform2d overhaul finished. collider / collision system updated to… (at that commit the files were still `ShapeEngine/Core/Shapes/Polygon.cs` and `ShapeEngine/Core/Collision/SegmentCollider.cs`) — run `git show` on any of them.
  • Change coupling: SpawnArea.cs ↔ Effect.cs ShapeEngine/Core/SpawnArea.cs:1 — `ShapeEngine/Core/SpawnArea.cs` and `ShapeEngine/Effects/Effect.cs` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `918c8add` Refactor: Inital clean up. FixedUpdate/InterpolateUpdate functions re…; `2c3637c1` PhysicsUpdate/ InterpolatePhysicsUpdate renamed to FixedUpdate & Inte…; `424ae846` reworked gameobject hierarchy -> GameObject -> PhysicsObject -> Colli… (at that commit the file was still `ShapeEngine/Core/GameObjectHandler.cs`) — run `git show` on any of them.
  • Change coupling: GamepadDeviceManager.cs ↔ MouseDevice.cs ShapeEngine/Input/GamepadDeviceManager.cs:1 — `ShapeEngine/Input/GamepadDeviceManager.cs` and `ShapeEngine/Input/MouseDevice.cs` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `165f1deb` Fix: Ensure input devices correctly handle active state, resetting us…; `4e260b13` Feat: Introduce InputDeviceBase for unified input device management a…; `3c082415` Feat: HeldButtons and HeldAxis system added the GamepadDevice. Feat: … — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (44 corresponding lines) · ×4
  • Edited copy of a member (44 corresponding lines) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:227 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:227-270 | ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:278-321 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (44 corresponding lines) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:187 — ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:187-230 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:867-913 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (44 corresponding lines) ShapeEngine/Content/ContentPack.cs:191 — ShapeEngine/Content/ContentPack.cs:191-234 | ShapeEngine/Content/ContentPack.cs:279-344 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (44 corresponding lines) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:264 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:264-307 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:225-277 — 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 (33 corresponding lines) · ×4
  • Edited copy of a member (33 corresponding lines) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:410 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:410-442 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:457-490 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:163 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:163-195 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:210-242 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:596 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:596-628 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:793-826 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1450 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1450-1490 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1269-1301 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×4
  • Edited copy of a member (28 corresponding lines) ShapeEngine/ShapeClipper/ShapeClipperDrawing2D.cs:186 — ShapeEngine/ShapeClipper/ShapeClipperDrawing2D.cs:186-213 | ShapeEngine/ShapeClipper/ShapeClipperDrawing2D.cs:233-260 — 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) ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:249 — ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:249-276 | ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:295-322 — 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) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:245 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:245-280 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:245-272 — 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) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:179 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:179-206 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:266-302 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 15+ corresponding lines) ShapeEngine/Geometry/CircleDef/CircleContains.cs:132 — ShapeEngine/Geometry/CircleDef/CircleContains.cs:132-146 | ShapeEngine/Geometry/RectDef/RectContains.cs:98-113 | ShapeEngine/Geometry/TriangleDef/TriangleContains.cs:100-114 — 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) ShapeEngine/Geometry/PolygonDef/Polygon.cs:389 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:389-404 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:475-489 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:557-572 — 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) ShapeEngine/Geometry/PolygonDef/Polygon.cs:345 — ShapeEngine/Geometry/PolygonDef/Polygon.cs:345-359 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:420-434 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:502-517 — 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) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:26 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:26-40 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:317-331 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:342-356 — 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 copy of a member (22 corresponding lines) · ×4
  • Edited copy of a member (22 corresponding lines) ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:57 — ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:57-78 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:717-738 — 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) ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:113 — ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:113-134 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:148-172 — 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) ShapeEngine/Geometry/RectDef/RectSplit.cs:69 — ShapeEngine/Geometry/RectDef/RectSplit.cs:69-90 | ShapeEngine/Geometry/RectDef/RectSplit.cs:101-122 — 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) ShapeEngine/Stats/StatSet.cs:498 — ShapeEngine/Stats/StatSet.cs:498-519 | ShapeEngine/Stats/StatSet.cs:528-556 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 22+ corresponding lines) · ×4
  • Edited copies of one member (4 members, 22+ corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:269 — ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:269-292 | ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:301-322 | ShapeEngine/Geometry/PolygonDef/PolygonOverlapStatic.cs:167-190 | ShapeEngine/Geometry/PolygonDef/PolygonOverlapStatic.cs:199-220 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 22+ corresponding lines) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1111 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1111-1141 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1152-1182 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:931-952 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:966-987 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 22+ corresponding lines) ShapeEngine/Geometry/CollisionSystem/CastSpaceEntry.cs:146 — ShapeEngine/Geometry/CollisionSystem/CastSpaceEntry.cs:146-168 | ShapeEngine/Geometry/CollisionSystem/CastSpaceEntry.cs:176-198 | ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:299-320 | ShapeEngine/Geometry/CollisionSystem/CastSpaceResult.cs:329-350 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 22+ corresponding lines) Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:253 — Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:253-274 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:361-382 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:467-488 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:588-609 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×4
  • Edited copy of a member (17 corresponding lines) ShapeEngine/StaticLib/ShapeVec.cs:856 — ShapeEngine/StaticLib/ShapeVec.cs:856-875 | ShapeEngine/StaticLib/ShapeVec.cs:893-909 — 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) ShapeEngine/Geometry/CircleDef/CircleSector.cs:123 — ShapeEngine/Geometry/CircleDef/CircleSector.cs:123-139 | ShapeEngine/Geometry/CircleDef/CircleSectorCollider.cs:89-105 — 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) ShapeEngine/Text/TextInputBox.cs:193 — ShapeEngine/Text/TextInputBox.cs:193-209 | ShapeEngine/Text/TextInputBox.cs:329-346 — 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) Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:201 — Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:201-220 | Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:256-272 — 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, 11+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 11+ corresponding lines) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:628 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:628-638 | ShapeEngine/Geometry/PointsDef/Points.cs:115-126 | ShapeEngine/Geometry/SegmentsDef/Segments.cs:62-72 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) ShapeEngine/ShapeClipper/ShapeClipper64.cs:394 — ShapeEngine/ShapeClipper/ShapeClipper64.cs:394-405 | ShapeEngine/ShapeClipper/ShapeClipper64.cs:437-447 | ShapeEngine/ShapeClipper/ShapeClipper64.cs:457-467 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:148 — ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:148-158 | ShapeEngine/Geometry/PolylineDef/PolylineMath.cs:91-101 | ShapeEngine/Geometry/PolylineDef/PolylineMath.cs: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 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) Examples/Scenes/ExampleScenes/BouncyCircles.cs:209 — Examples/Scenes/ExampleScenes/BouncyCircles.cs:209-220 | Examples/Scenes/ExampleScenes/CameraAreaDrawExample.cs:176-186 | Examples/Scenes/ExampleScenes/TextScalingExample.cs:63-73 — 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, 5+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 5+ corresponding lines) ShapeEngine/Input/InputTypeGamepadButtonAxis.cs:69 — ShapeEngine/Input/InputTypeGamepadButtonAxis.cs:69-73 | ShapeEngine/Input/InputTypeKeyboardButtonAxis.cs:72-76 | ShapeEngine/Input/InputTypeMouseButtonAxis.cs: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) ShapeEngine/Geometry/QuadDef/QuadMath.cs:709 — ShapeEngine/Geometry/QuadDef/QuadMath.cs:709-713 | ShapeEngine/Geometry/SegmentDef/SegmentMath.cs:527-531 | ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:336-340 — 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) ShapeEngine/Input/GamepadDevice.cs:1017 — ShapeEngine/Input/GamepadDevice.cs:1017-1021 | ShapeEngine/Input/KeyboardDevice.cs:505-509 | ShapeEngine/Input/MouseDevice.cs:823-827 — 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) ShapeEngine/Input/InputTypeGamepadButton.cs:65 — ShapeEngine/Input/InputTypeGamepadButton.cs:65-69 | ShapeEngine/Input/InputTypeKeyboardButton.cs:66-70 | ShapeEngine/Input/InputTypeMouseButton.cs:56-60 — 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.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×4
  • Duplicated block (26 lines × 2) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:628 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:628-653 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:688-713 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:628` 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. 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 (26 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1416 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1416-1441 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1465-1490 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1416` 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. 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 (26 lines × 2) ShapeEngine/Pathfinding/AStar.cs:218 — ShapeEngine/Pathfinding/AStar.cs:218-243 | ShapeEngine/Pathfinding/AStar.cs:247-272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) REDACTED:110 — REDACTED:110-135 | REDACTED:234-259 — both copies are in the same file, so extract the 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:110` 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. 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 · Duplicated block (23 lines × 2) · ×4
  • Duplicated block (23 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:649 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:649-671 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:692-714 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:649` 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. 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 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:644 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:644-666 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:742-764 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:644` 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. 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) ShapeEngine/Core/GameWindow.cs:956 — ShapeEngine/Core/GameWindow.cs:956-978 | ShapeEngine/Core/GameWindow.cs:995-1018 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/QuadDef/QuadMath.cs:485 — ShapeEngine/Geometry/QuadDef/QuadMath.cs:485-507 | ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:156-178 — 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.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×4
  • Duplicated block (20 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1305 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1305-1324 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1535-1554 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1305` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1402 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1402-1421 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1225-1244 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1402` it does not close everything it opens, so those 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 (20 lines × 2) ShapeEngine/Geometry/SegmentDef/SegmentClosestPointStatic.cs:181 — ShapeEngine/Geometry/SegmentDef/SegmentClosestPointStatic.cs:181-200 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPointStatic.cs:274-293 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/SegmentDef/SegmentClosestPointStatic.cs:181` 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `segmentStart` to `Vector2 other) GetClosestPointSegmentLine(Vector2` in one and `Vector2 other) GetClosestPointSegmentRay(Vector2` 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) ShapeEngine/StaticLib/ShapePhysics.cs:474 — ShapeEngine/StaticLib/ShapePhysics.cs:474-494 | ShapeEngine/StaticLib/ShapePhysics.cs:664-683 — both copies are in the same file, so extract the 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.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×4
  • Duplicated block (22 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1073 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1073-1094 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1206-1227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) ShapeEngine/Text/BitmapFont.cs:209 — ShapeEngine/Text/BitmapFont.cs:209-230 | ShapeEngine/Text/BitmapFont.cs:261-282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Text/BitmapFont.cs:209` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) REDACTED:219 — REDACTED:219-240 | REDACTED:360-381 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:242 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:242-263 | ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:293-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. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `Quad` in one and `Rect` 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.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×4
  • Duplicated block (22–23 lines × 2) ShapeEngine/Core/Logging/Logger.cs:129 — ShapeEngine/Core/Logging/Logger.cs:129-151 | ShapeEngine/StaticLib/ShapeLogger.cs:169-190 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (22–23 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:325 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:325-346 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:563-585 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22–23 lines × 2) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:322 — ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:322-343 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:518-540 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22–23 lines × 2) REDACTED:1000 — REDACTED:1000-1021 | REDACTED:1167-1189 — both copies are in the same file, so extract the 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:1000` 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.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×4
  • Duplicated block (14 lines × 4) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:204 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:204-217 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:245-258 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:223-236 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:271-284 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 279 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 (14 lines × 4) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:288 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:288-301 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:512-525 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:285-298 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:467-480 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 (14 lines × 4) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:890 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:890-903 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1507-1520 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:808-821 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1323-1336 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 (14 lines × 4) ShapeEngine/Pathfinding/AStar.cs:77 — ShapeEngine/Pathfinding/AStar.cs:77-90 | ShapeEngine/Pathfinding/AStar.cs:110-123 | ShapeEngine/Pathfinding/AStar.cs:222-235 | ShapeEngine/Pathfinding/AStar.cs:251-264 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Pathfinding/AStar.cs:77` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×4
  • Duplicated block (6 lines × 5) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:195 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:195-200 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:245-250 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:295-300 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:345-350 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:396-401 — 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:195` 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) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:80 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:80-85 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:457-462 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:499-504 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:542-547 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:80-85 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1185 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 × 5) ShapeEngine/Geometry/CircleDef/CircleContains.cs:137 — ShapeEngine/Geometry/CircleDef/CircleContains.cs:137-142 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:661-666 | ShapeEngine/Geometry/PolygonDef/PolygonContains.cs:46-51 | ShapeEngine/Geometry/RectDef/RectContains.cs:104-109 | ShapeEngine/Geometry/TriangleDef/TriangleContains.cs:105-110 — 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 `ShapeEngine/Geometry/CircleDef/CircleContains.cs:137` 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 (6 lines × 5) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:581 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:581-586 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:764-769 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:597-602 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:594-599 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:596-601 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×4
  • Duplicated block (15 lines × 2) ShapeEngine/Geometry/CollisionSystem/Collider.cs:888 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:888-902 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:912-926 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CollisionSystem/Collider.cs:888` 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. 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 `other` to `Collider` in one and `IShape` 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) ShapeEngine/Geometry/CollisionSystem/Collider.cs:1337 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:1337-1351 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1361-1375 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/Collider.cs:1337` 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) ShapeEngine/StaticLib/ShapePhysics.cs:520 — ShapeEngine/StaticLib/ShapePhysics.cs:520-534 | ShapeEngine/StaticLib/ShapePhysics.cs:709-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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/StaticLib/ShapePhysics.cs:520` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) ShapeEngine/Geometry/CollisionSystem/Collider.cs:1792 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:1792-1806 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1822-1836 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/Collider.cs:1792` 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. 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 `other` to `Collider` in one and `IShape` 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.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×4
  • Duplicated block (13 lines × 3) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:763 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:763-775 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:779-791 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:795-807 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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:966 — REDACTED:966-978 | REDACTED:1035-1049 | REDACTED:1131-1143 — 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:966` it does not close everything it opens, so those 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 (13 lines × 3) Examples/Scenes/ExampleScenes/DataExample.cs:75 — Examples/Scenes/ExampleScenes/DataExample.cs:75-87 | Examples/Scenes/ExampleScenes/JsonDataExample.cs:71-83 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:71-83 — before extracting anything, compare `Examples/Scenes/ExampleScenes/DataExample.cs` and `Examples/Scenes/ExampleScenes/JsonDataExample.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 3) Examples/Scenes/ExampleScenes/DataExample.cs:103 — Examples/Scenes/ExampleScenes/DataExample.cs:103-115 | Examples/Scenes/ExampleScenes/JsonDataExample.cs:99-111 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:99-111 — before extracting anything, compare `Examples/Scenes/ExampleScenes/DataExample.cs` and `Examples/Scenes/ExampleScenes/JsonDataExample.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×4
  • Duplicated block (8 lines × 3) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1607 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1607-1614 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1679-1686 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1895-1902 — 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) Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:2124 — Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:2124-2131 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:2137-2144 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:2150-2157 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:2124` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 3) Examples/Scenes/ExampleScenes/DataExample.cs:119 — Examples/Scenes/ExampleScenes/DataExample.cs:119-126 | Examples/Scenes/ExampleScenes/JsonDataExample.cs:115-122 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:115-122 — before extracting anything, compare `Examples/Scenes/ExampleScenes/DataExample.cs` and `Examples/Scenes/ExampleScenes/JsonDataExample.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 3) Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:201 — Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:201-208 | Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:256-263 | Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:450-457 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:201` it does not close everything it opens, so those 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 · Duplicated block (8 lines × 8) · ×4
  • Duplicated block (8 lines × 8) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:154 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:154-161 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:179-186 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:204-211 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:229-236 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:633-640 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:772-779 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:897-904 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1022-1029 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:154` it does not close everything it opens, so those 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 × 8) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:154 — ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:154-161 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:179-186 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:204-211 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:229-236 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:628-635 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:753-760 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:877-884 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:1001-1008 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:154` it does not close everything it opens, so those 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 × 8) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:154 — ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:154-161 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:179-186 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:204-211 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:229-236 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:632-639 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:757-764 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:882-889 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:1007-1014 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:154` it does not close everything it opens, so those 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 × 8) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:184 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:184-191 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:234-241 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:284-291 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:334-341 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:812-819 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:891-898 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:970-977 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1049-1056 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:184` it does not close everything it opens, so those 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 · Duplicated block (9–10 lines × 5) · ×4
  • Duplicated block (9–10 lines × 5) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:335 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:335-343 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:449-458 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:338-347 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:339-347 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:338-347 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 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 (9–10 lines × 5) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:445 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:445-453 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:590-599 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:459-468 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:457-466 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:457-466 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 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–10 lines × 5) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:486 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:486-494 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:643-652 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:501-510 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:498-507 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:499-508 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 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–10 lines × 5) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:529 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:529-537 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:699-708 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:544-553 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:541-550 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:543-552 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 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.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×4
  • Duplicated block (9 lines × 4) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:518 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:518-526 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:566-574 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:667-675 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:725-733 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:518` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 4) ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:33 — ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:33-43 | ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:86-95 | ShapeEngine/Geometry/RayDef/RayOverlapStatic.cs:56-64 | ShapeEngine/Geometry/RayDef/RayOverlapStatic.cs:86-94 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (9 lines × 4) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:248 — ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:248-256 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:273-281 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:1070-1078 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:1099-1107 — 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 (9 lines × 4) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:428 — ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:428-450 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:451-459 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:673-681 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:682-690 — 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×4
  • Duplicated block (9–10 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:438 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:438-446 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:464-473 — both copies are in the same file, so extract the 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 (9–10 lines × 2) ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:183 — ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:183-191 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:230-239 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadOverlap.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 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 `ShapeEngine/Geometry/QuadDef/QuadOverlap.cs: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. 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–10 lines × 2) ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:405 — ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:405-414 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:445-453 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/RayDef/RayClosestPoint.cs: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. 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `Polygon` in one and `Polyline` 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 × 2) ShapeEngine/Text/BitmapFontAtlas.cs:311 — ShapeEngine/Text/BitmapFontAtlas.cs:311-320 | ShapeEngine/Text/BitmapFontAtlas.cs:443-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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Text/BitmapFontAtlas.cs:311` it does not close everything it opens, so those 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.
X2 · Cancellation propagation · Async method without CancellationToken · ×4
  • Async method without CancellationToken: UnpackFileToMemoryAsync ShapeEngine/Content/ContentPack.cs:900 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: UnpackFileToMemoryParallelAsync ShapeEngine/Content/ContentPack.cs:1015 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: UnpackTextToMemoryAsync ShapeEngine/Content/ContentPack.cs:1138 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: UnpackTextToMemoryParallelAsync ShapeEngine/Content/ContentPack.cs:1241 — No CancellationToken parameter — this work can't be stopped early once started.
D1 · Cyclomatic Complexity · Quad.IntersectShape (cyclomatic 17) · ×3
  • Quad.IntersectShape (cyclomatic 17) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:244 — Quad.IntersectShape 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.
  • Quad.IntersectShape (cyclomatic 17) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:381 — Quad.IntersectShape 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. This shape REPEATS in the file: one other method here (Quad.IntersectShape) 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.
  • Quad.IntersectShape (cyclomatic 17) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:510 — Quad.IntersectShape 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. This shape REPEATS in the file: one other method here (Quad.IntersectShape) 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.
D1 · Cyclomatic Complexity · Rect.IntersectShape (cyclomatic 17) · ×3
  • Rect.IntersectShape (cyclomatic 17) ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:299 — Rect.IntersectShape 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.
  • Rect.IntersectShape (cyclomatic 17) ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:461 — Rect.IntersectShape 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. This shape REPEATS in the file: one other method here (Rect.IntersectShape) 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.
  • Rect.IntersectShape (cyclomatic 17) ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:604 — Rect.IntersectShape 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. This shape REPEATS in the file: one other method here (Rect.IntersectShape) 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.
D2 · Cognitive Complexity · Triangle.IntersectShape (cognitive 17) · ×3
  • Triangle.IntersectShape (cognitive 17) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1223 — Triangle.IntersectShape has cognitive complexity 17 (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. This shape REPEATS in the file: one other method here (Triangle.IntersectShape) 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.
  • Triangle.IntersectShape (cognitive 17) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1268 — Triangle.IntersectShape has cognitive complexity 17 (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. This shape REPEATS in the file: one other method here (Triangle.IntersectShape) 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.
  • Triangle.IntersectShape (cognitive 17) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1314 — Triangle.IntersectShape has cognitive complexity 17 (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.
D3 · God Classes · ClassTooLong · ×3
  • ClassTooLong: BitmapFont ShapeEngine/Text/BitmapFont.cs — ClassTooLong — 546 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 146 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Program ResourcePacker/Program.cs — ClassTooLong — 471 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 71 over it, 1.18× 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.
  • ClassTooLong: TextFont ShapeEngine/Text/TextFont.cs — ClassTooLong — 415 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 15 over it, 1.04× 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 (27 corresponding lines) · ×3
  • Edited copy of a member (27 corresponding lines) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:87 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:87-124 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:207-238 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:470 — ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:470-503 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:1258-1284 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:30 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:30-56 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:83-109 — 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 · Members sharing a duplicated core (11 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (11 members, 50+ identical tokens) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:445 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:445-459 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:523-537 | ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:553-567 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:707-721 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:811-825 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1192-1206 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:513-527 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:1175-1189 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:553-567 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:748-762 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:997-1011 — These 11 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 11 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 11 times.
  • Members sharing a duplicated core (11 members, 50+ identical tokens) ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:222 — ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:222-236 | ShapeEngine/Geometry/LineDef/LineOverlap.cs:250-264 | ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:331-345 | ShapeEngine/Geometry/PolylineDef/PolylineOverlap.cs:289-303 | ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:345-359 | ShapeEngine/Geometry/RayDef/RayOverlap.cs:231-245 | ShapeEngine/Geometry/RectDef/RectOverlap.cs:335-349 | ShapeEngine/Geometry/SegmentDef/SegmentOverlap.cs:328-342 | ShapeEngine/Geometry/SegmentsDef/SegmentsOverlap.cs:250-264 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:425-439 | ShapeEngine/Geometry/TriangulationDef/TriangulationOverlap.cs:444-458 — These 11 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 11 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 11 times.
  • Members sharing a duplicated core (11 members, 50+ identical tokens) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:48 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:48-82 | ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:126-147 | ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:191-221 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:101-120 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:155-175 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:19-48 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:61-87 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:99-119 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:130-151 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:164-183 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:196-215 — These 11 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 11 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 11 times.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (7 members, 50+ identical tokens) ShapeEngine/Content/ContentLoader.cs:552 — ShapeEngine/Content/ContentLoader.cs:552-585 | ShapeEngine/Content/ContentLoader.cs:595-628 | ShapeEngine/Content/ContentLoader.cs:638-671 | ShapeEngine/Content/ContentLoader.cs:681-714 | ShapeEngine/Content/ContentLoader.cs:724-757 | ShapeEngine/Content/ContentLoader.cs:767-800 | ShapeEngine/Content/ContentLoader.cs:810-843 — 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) ShapeEngine/Geometry/CollisionSystem/Collider.cs:681 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:681-697 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:708-724 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:735-751 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:762-778 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:789-805 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:816-832 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:843-859 — 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) ShapeEngine/Pathfinding/Pathfinder.cs:1098 — ShapeEngine/Pathfinding/Pathfinder.cs:1098-1115 | ShapeEngine/Pathfinding/Pathfinder.cs:1117-1134 | ShapeEngine/Pathfinding/Pathfinder.cs:1136-1153 | ShapeEngine/Pathfinding/Pathfinder.cs:1155-1172 | ShapeEngine/Pathfinding/Pathfinder.cs:1174-1188 | ShapeEngine/Pathfinding/Pathfinder.cs:1190-1207 | ShapeEngine/Pathfinding/Pathfinder.cs:1209-1226 — 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 (37 corresponding lines) · ×3
  • Edited copy of a member (37 corresponding lines) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:540 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:540-576 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:538-575 — 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) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:624 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:624-668 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:688-724 — 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) ShapeEngine/Stats/StatSet.cs:749 — ShapeEngine/Stats/StatSet.cs:749-785 | ShapeEngine/Stats/StatSet.cs:791-833 — 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 (36 corresponding lines) · ×3
  • Edited copy of a member (36 corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:225 — ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:225-260 | ShapeEngine/Geometry/PolygonDef/PolygonOverlapStatic.cs:123-158 — 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) ShapeEngine/Screen/ScreenTexture.cs:268 — ShapeEngine/Screen/ScreenTexture.cs:268-307 | ShapeEngine/Screen/ScreenTexture.cs:318-353 — 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) Examples/Scenes/ExampleScenes/InputExample.cs:431 — Examples/Scenes/ExampleScenes/InputExample.cs:431-466 | Examples/Scenes/ExampleScenes/InputExample.cs:555-590 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×3
  • Edited copy of a member (30 corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:199 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:199-228 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:284-320 — 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) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:258 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:258-287 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:294-324 — 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) ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:548 — ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:548-577 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:590-630 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 25+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 25+ corresponding lines) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:131 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:131-162 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:169-200 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:137-161 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:173-197 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 25+ corresponding lines) REDACTED:598 — REDACTED:598-623 | REDACTED:696-722 | REDACTED:776-800 | REDACTED:816-840 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 25+ corresponding lines) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:48 — ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:48-78 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:93-122 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:136-160 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:460-491 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 18+ corresponding lines) ShapeEngine/Geometry/CustomDrawing.cs:83 — ShapeEngine/Geometry/CustomDrawing.cs:83-104 | ShapeEngine/Geometry/CustomDrawing.cs:124-141 | ShapeEngine/Geometry/CustomDrawing.cs:161-179 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 18+ corresponding lines) ShapeEngine/ShapeClipper/ShapeClipperConversion2D.cs:207 — ShapeEngine/ShapeClipper/ShapeClipperConversion2D.cs:207-224 | ShapeEngine/ShapeClipper/ShapeClipperConversion2D.cs:232-249 | ShapeEngine/ShapeClipper/ShapeClipperConversion2D.cs:257-274 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 18+ corresponding lines) Examples/Scenes/ExampleScenes/ControlNodeExampleScene.cs:353 — Examples/Scenes/ExampleScenes/ControlNodeExampleScene.cs:353-371 | Examples/Scenes/ExampleScenes/PathfinderExample2.cs:1098-1115 | Examples/Scenes/ExampleScenes/ScreenEffectsExample.cs:520-541 — 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, 25+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 25+ corresponding lines) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:539 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:539-563 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:413-437 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:485-509 — 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) ShapeEngine/StaticLib/ShapePhysics.cs:429 — ShapeEngine/StaticLib/ShapePhysics.cs:429-454 | ShapeEngine/StaticLib/ShapePhysics.cs:619-643 | ShapeEngine/StaticLib/ShapePhysics.cs:911-936 — 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) Examples/Scenes/ExampleScenes/DataExample.cs:241 — Examples/Scenes/ExampleScenes/DataExample.cs:241-265 | Examples/Scenes/ExampleScenes/JsonDataExample.cs:319-343 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:346-370 — 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 copies of one member (3 members, 20+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 20+ corresponding lines) REDACTED:857 — REDACTED:857-876 | REDACTED:933-952 | REDACTED:1208-1230 — 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.
  • Edited copies of one member (3 members, 20+ corresponding lines) ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:322 — ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:322-345 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:501-526 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:572-591 — 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.
  • Edited copies of one member (3 members, 20+ corresponding lines) ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:32 — ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:32-54 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:26-48 | ShapeEngine/Geometry/TriangulationDef/TriangulationClosestPoint.cs:109-128 — 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 (3 members, 17+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 17+ corresponding lines) ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:195 — ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:195-211 | ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:243-259 | ShapeEngine/ShapeClipper/ShapeClipperTriangulation2D.cs:287-303 — 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:905 — REDACTED:905-921 | REDACTED:1276-1292 | REDACTED:1302-1318 — 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) ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:751 — ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:751-767 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:664-680 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:757-773 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 13+ corresponding lines) · ×3
  • Edited copies of one member (5 members, 13+ corresponding lines) ShapeEngine/Core/Logging/Logger.cs:326 — ShapeEngine/Core/Logging/Logger.cs:326-338 | ShapeEngine/Core/Logging/Logger.cs:348-362 | ShapeEngine/StaticLib/ShapeLogger.cs:383-395 | ShapeEngine/StaticLib/ShapeLogger.cs:404-416 | ShapeEngine/StaticLib/ShapeLogger.cs:426-440 — 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.
  • Edited copies of one member (5 members, 13+ corresponding lines) ShapeEngine/Geometry/CircleDef/CircleClosestPointStatic.cs:38 — ShapeEngine/Geometry/CircleDef/CircleClosestPointStatic.cs:38-51 | ShapeEngine/Geometry/CircleDef/CircleClosestPointStatic.cs:64-76 | ShapeEngine/Geometry/CircleDef/CircleClosestPointStatic.cs:89-101 | ShapeEngine/Geometry/RayDef/RayClosestPointStatic.cs:137-149 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPointStatic.cs:307-320 — 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.
  • Edited copies of one member (5 members, 13+ corresponding lines) Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:656 — Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:656-668 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:784-796 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:937-949 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1077-1089 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1239-1251 — 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 (5 members, 10+ corresponding lines) · ×3
  • Edited copies of one member (5 members, 10+ corresponding lines) ShapeEngine/Audio/AudioDevice.cs:472 — ShapeEngine/Audio/AudioDevice.cs:472-481 | ShapeEngine/Audio/AudioDevice.cs:493-505 | ShapeEngine/Audio/AudioDevice.cs:629-638 | ShapeEngine/Audio/AudioDevice.cs:673-685 | ShapeEngine/Audio/AudioDevice.cs:699-711 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 10+ corresponding lines) ShapeEngine/Geometry/CircleDef/Circle.cs:446 — ShapeEngine/Geometry/CircleDef/Circle.cs:446-455 | ShapeEngine/Geometry/CircleDef/Circle.cs:463-472 | ShapeEngine/Geometry/CircleDef/Circle.cs:481-495 | ShapeEngine/Geometry/CircleDef/Circle.cs:503-512 | ShapeEngine/Geometry/CircleDef/Circle.cs:521-531 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 10+ corresponding lines) ShapeEngine/Geometry/PointsDef/PointsMath.cs:246 — ShapeEngine/Geometry/PointsDef/PointsMath.cs:246-257 | ShapeEngine/Geometry/PointsDef/PointsMath.cs:288-301 | ShapeEngine/Geometry/PointsDef/PointsMath.cs:314-327 | ShapeEngine/Geometry/PointsDef/PointsMath.cs:340-352 | ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:449-458 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 7+ corresponding lines) ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:152 — ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:152-181 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:108-117 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:104-110 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) ShapeEngine/Geometry/PointsDef/PointsMath.cs:71 — ShapeEngine/Geometry/PointsDef/PointsMath.cs:71-77 | ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:491-498 | ShapeEngine/Geometry/PolylineDef/PolylineMath.cs:166-173 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) ShapeEngine/Serialization/XmlClassSerializer.cs:48 — ShapeEngine/Serialization/XmlClassSerializer.cs:48-54 | ShapeEngine/Serialization/XmlDataObjectSerializer.cs:50-56 | ShapeEngine/Serialization/XmlStructSerializer.cs:48-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 · Duplicated block (102 lines × 4) · ×3
  • Duplicated block (102 lines × 4) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:751 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:751-852 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:766-867 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:747-848 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:751-852 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:751` 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 (102 lines × 4) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:875 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:875-976 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:891-992 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:871-972 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:876-977 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:875` 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 (102 lines × 4) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:999 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:999-1100 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1016-1117 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:995-1096 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:1001-1102 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:999` 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.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×3
  • Duplicated block (42 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1256 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1256-1297 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1108-1149 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1256` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (42 lines × 2) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:915 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:915-956 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:905-946 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:915` 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. 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 (42 lines × 2) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:507 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:507-548 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:259-300 — before extracting anything, compare `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 299 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×3
  • Duplicated block (40 lines × 2) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:638 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:638-677 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:390-429 — before extracting anything, compare `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 299 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:638` 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. 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 (40 lines × 2) ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:453 — ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:453-492 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:528-567 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:453` 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. 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 `other` to `Quad` in one and `Rect` 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 (40 lines × 2) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:254 — ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:254-293 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:1132-1171 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:254` it does not close everything it opens, so those 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 · Duplicated block (27 lines × 2) · ×3
  • Duplicated block (27 lines × 2) ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:487 — ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:487-513 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:422-448 — before extracting anything, compare `ShapeEngine/Geometry/LineDef/LineIntersectShape.cs` and `ShapeEngine/Geometry/RayDef/RayIntersectShape.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 203 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 `ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:487` 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. 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 × 2) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:465 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:465-491 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:505-531 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:465` 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. 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 × 2) ShapeEngine/Geometry/SegmentDef/SegmentClosestPointStatic.cs:144 — ShapeEngine/Geometry/SegmentDef/SegmentClosestPointStatic.cs:144-170 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPointStatic.cs:224-250 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/SegmentDef/SegmentClosestPointStatic.cs:144` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `segmentStart` to `Vector2 other) GetClosestPointSegmentLine(Vector2` in one and `Vector2 other) GetClosestPointSegmentRay(Vector2` 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.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×3
  • Duplicated block (25 lines × 2) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:580 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:580-604 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:332-356 — before extracting anything, compare `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 299 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:580` 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. 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 lines × 2) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:851 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:851-875 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:881-905 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:851` 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 (25 lines × 2) ShapeEngine/Geometry/TriangleDef/TriangleCollider.cs:81 — ShapeEngine/Geometry/TriangleDef/TriangleCollider.cs:81-105 | ShapeEngine/Geometry/TriangleDef/TriangleShape.cs:93-117 — 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 `ShapeEngine/Geometry/TriangleDef/TriangleShape.cs:93` 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.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×3
  • Duplicated block (24 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:554 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:554-577 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:639-662 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:554` 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (24 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:599 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:599-622 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:691-714 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:599` 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (24 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:97 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:97-120 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:212-235 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:97` 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.
D4 · Code Duplication · Duplicated block (25–26 lines × 2) · ×3
  • Duplicated block (25–26 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1048 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1048-1072 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1172-1197 — both copies are in the same file, so extract the 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) ShapeEngine/Geometry/TriangleDef/TriangleCollider.cs:48 — ShapeEngine/Geometry/TriangleDef/TriangleCollider.cs:48-73 | ShapeEngine/Geometry/TriangleDef/TriangleShape.cs:59-83 — 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 `ShapeEngine/Geometry/TriangleDef/TriangleShape.cs:59` 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 (25–26 lines × 2) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:949 — ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:949-973 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1053-1078 — both copies are in the same file, so extract the 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 · Duplicated block (18 lines × 3) · ×3
  • Duplicated block (18 lines × 3) ShapeEngine/Core/Logging/Logger.cs:134 — ShapeEngine/Core/Logging/Logger.cs:134-151 | ShapeEngine/StaticLib/ShapeLogger.cs:141-158 | ShapeEngine/StaticLib/ShapeLogger.cs:173-190 — 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 `ShapeEngine/Core/Logging/Logger.cs:134` 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 (18 lines × 3) ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:388 — ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:388-405 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:377-394 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:376-393 — before extracting anything, compare `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs` and `ShapeEngine/Geometry/RayDef/RayClosestPoint.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 224 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 `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:388` 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. 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 × 3) Examples/Scenes/ExampleScenes/DataExample.cs:248 — Examples/Scenes/ExampleScenes/DataExample.cs:248-265 | Examples/Scenes/ExampleScenes/JsonDataExample.cs:326-343 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:353-370 — before extracting anything, compare `Examples/Scenes/ExampleScenes/DataExample.cs` and `Examples/Scenes/ExampleScenes/JsonDataExample.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/DataExample.cs:248` 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.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×3
  • Duplicated block (15 lines × 4) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1236 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1236-1250 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1273-1287 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1466-1480 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1503-1517 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1236` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 4) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:358 — ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:358-372 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:408-422 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:458-472 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:508-522 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:358` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 4) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1287 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1287-1302 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1304-1318 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1139-1154 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1156-1170 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×3
  • Duplicated block (33 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:751 — ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:751-783 | ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:853-885 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:751` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (33 lines × 2) ShapeEngine/Text/BitmapFont.cs:313 — ShapeEngine/Text/BitmapFont.cs:313-345 | ShapeEngine/Text/BitmapFont.cs:378-410 — both copies are in the same file, so extract the 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 `ShapeEngine/Text/BitmapFont.cs:313` it does not close everything it opens, so those 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 (33 lines × 2) ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:451 — ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:451-483 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:524-556 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×3
  • Duplicated block (17 lines × 3) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1041 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1041-1057 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:1027-1043 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:865-881 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 3) ShapeEngine/Serialization/XmlClassSerializer.cs:148 — ShapeEngine/Serialization/XmlClassSerializer.cs:148-164 | ShapeEngine/Serialization/XmlDataObjectSerializer.cs:169-185 | ShapeEngine/Serialization/XmlStructSerializer.cs:148-164 — before extracting anything, compare `ShapeEngine/Serialization/XmlClassSerializer.cs` and `ShapeEngine/Serialization/XmlDataObjectSerializer.cs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 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 `ShapeEngine/Serialization/XmlClassSerializer.cs:148` 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. 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 (17 lines × 3) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:639 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:639-655 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:682-698 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:571-587 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:639` it does not close everything it opens, so those 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 · Duplicated block (14–16 lines × 2) · ×3
  • Duplicated block (14–16 lines × 2) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandler.cs:446 — ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandler.cs:446-459 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandler.cs:650-665 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandler.cs:446` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (14–16 lines × 2) ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:354 — ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:354-369 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:605-618 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:354` it does not close everything it opens, so those exact lines 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–16 lines × 2) ShapeEngine/Pathfinding/AStar.cs:39 — ShapeEngine/Pathfinding/AStar.cs:39-54 | ShapeEngine/Pathfinding/AStar.cs:184-197 — both copies are in the same file, so extract the 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 `ShapeEngine/Pathfinding/AStar.cs:39` it does not close everything it opens, so those 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, `ShapeEngine/Pathfinding/AStar.cs:198` calls `ThrowIfCancellationRequested` and `ShapeEngine/Pathfinding/AStar.cs:55` 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.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×3
  • Duplicated block (15–16 lines × 2) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:471 — ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:471-486 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:510-524 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:471` it does not close everything it opens, so those 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 (15–16 lines × 2) ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:226 — ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:226-240 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:340-355 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadOverlap.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 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 `ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:226` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–16 lines × 2) ShapeEngine/UI/ControlNode.cs:844 — ShapeEngine/UI/ControlNode.cs:844-858 | ShapeEngine/UI/RectNode.cs:569-584 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×3
  • Duplicated block (11 lines × 6) ShapeEngine/StaticLib/ShapePhysics.cs:985 — ShapeEngine/StaticLib/ShapePhysics.cs:985-995 | ShapeEngine/StaticLib/ShapePhysics.cs:1023-1033 | ShapeEngine/StaticLib/ShapePhysics.cs:1133-1143 | ShapeEngine/StaticLib/ShapePhysics.cs:1209-1219 | ShapeEngine/StaticLib/ShapePhysics.cs:1287-1297 | ShapeEngine/StaticLib/ShapePhysics.cs:1368-1378 — 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 `ShapeEngine/StaticLib/ShapePhysics.cs:985` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ShapeEngine/StaticLib/ShapePhysics.cs:1300` calls `distanceFactorAdjustor` and `ShapeEngine/StaticLib/ShapePhysics.cs:1146` 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 × 6) ShapeEngine/StaticLib/ShapePhysics.cs:1056 — ShapeEngine/StaticLib/ShapePhysics.cs:1056-1066 | ShapeEngine/StaticLib/ShapePhysics.cs:1095-1105 | ShapeEngine/StaticLib/ShapePhysics.cs:1168-1178 | ShapeEngine/StaticLib/ShapePhysics.cs:1246-1256 | ShapeEngine/StaticLib/ShapePhysics.cs:1325-1335 | ShapeEngine/StaticLib/ShapePhysics.cs:1408-1418 — 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 `ShapeEngine/StaticLib/ShapePhysics.cs:1056` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, `ShapeEngine/StaticLib/ShapePhysics.cs:1338` calls `distanceFactorAdjustor` and `ShapeEngine/StaticLib/ShapePhysics.cs:1182` 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 × 6) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:334 — ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:334-344 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:612-622 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:737-747 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:861-871 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:985-995 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:1109-1119 — 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. 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 · Duplicated block (13 lines × 4) · ×3
  • Duplicated block (13 lines × 4) ShapeEngine/Geometry/PolygonDef/PolygonCollider.cs:76 — ShapeEngine/Geometry/PolygonDef/PolygonCollider.cs:76-88 | ShapeEngine/Geometry/PolygonDef/PolygonShape.cs:77-89 | ShapeEngine/Geometry/PolylineDef/PolylineCollider.cs:61-73 | ShapeEngine/Geometry/PolylineDef/PolylineShape.cs:57-69 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 4) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:382 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:382-394 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:422-434 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:381-393 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:421-433 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1185 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 `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:382` it does not close everything it opens, so those exact lines 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 × 4) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:627 — ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:627-639 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:752-764 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:877-889 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:1002-1014 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:627` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×3
  • Duplicated block (8 lines × 4) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:132 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:132-139 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:163-170 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:156-163 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:192-199 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:132` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 4) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:334 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:334-341 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:421-428 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:410-418 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:409-416 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs` and `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 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 `ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:334` it does not close everything it opens, so those exact lines 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) ShapeEngine/Geometry/CircleDef/CircleContains.cs:139 — ShapeEngine/Geometry/CircleDef/CircleContains.cs:139-146 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:663-670 | ShapeEngine/Geometry/RectDef/RectContains.cs:106-113 | ShapeEngine/Geometry/TriangleDef/TriangleContains.cs:107-114 — 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 `ShapeEngine/Geometry/CircleDef/CircleContains.cs:139` 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.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×3
  • Duplicated block (8 lines × 5) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:79 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:79-86 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:90-97 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:84-91 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:84-91 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:84-91 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 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 (8 lines × 5) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:112 — ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:112-119 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:247-254 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:272-279 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:1069-1076 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:1098-1105 — 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 `ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:112` it does not close everything it opens, so those 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, `ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:121` calls `Rotate`, `DrawTriangle`, `ToRayColor` and `ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:255` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 5) ShapeEngine/Geometry/CircleDef/CircleContains.cs:117 — ShapeEngine/Geometry/CircleDef/CircleContains.cs:117-124 | ShapeEngine/Geometry/PolygonDef/PolygonContains.cs:23-30 | ShapeEngine/Geometry/QuadDef/QuadContains.cs:60-67 | ShapeEngine/Geometry/RectDef/RectContains.cs:81-88 | ShapeEngine/Geometry/TriangleDef/TriangleContains.cs:81-88 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D1 · Cyclomatic Complexity · Quad.IntersectShape (cyclomatic 32) · ×2
  • Quad.IntersectShape (cyclomatic 32) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1112 — Quad.IntersectShape 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. This shape REPEATS in the file: one other method here (Quad.IntersectShape) 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.
  • Quad.IntersectShape (cyclomatic 32) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1254 — Quad.IntersectShape 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. This shape REPEATS in the file: one other method here (Quad.IntersectShape) 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.
D1 · Cyclomatic Complexity · Rect.IntersectShape (cyclomatic 32) · ×2
  • Rect.IntersectShape (cyclomatic 32) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:442 — Rect.IntersectShape 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. This shape REPEATS in the file: one other method here (Rect.IntersectShape) 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.
  • Rect.IntersectShape (cyclomatic 32) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:591 — Rect.IntersectShape 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. This shape REPEATS in the file: one other method here (Rect.IntersectShape) 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.
D1 · Cyclomatic Complexity · Triangle.IntersectShape (cyclomatic 24) · ×2
  • Triangle.IntersectShape (cyclomatic 24) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:993 — Triangle.IntersectShape 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 shape REPEATS in the file: one other method here (Triangle.IntersectShape) 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.
  • Triangle.IntersectShape (cyclomatic 24) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1106 — Triangle.IntersectShape 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 shape REPEATS in the file: one other method here (Triangle.IntersectShape) 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.
D1 · Cyclomatic Complexity · Quad.OverlapShape (cyclomatic 18) · ×2
  • Quad.OverlapShape (cyclomatic 18) ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:225 — Quad.OverlapShape 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. This shape REPEATS in the file: one other method here (Quad.OverlapShape) 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.
  • Quad.OverlapShape (cyclomatic 18) ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:256 — Quad.OverlapShape 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. This shape REPEATS in the file: one other method here (Quad.OverlapShape) 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.
D1 · Cyclomatic Complexity · Circle.IntersectShape (cyclomatic 17) · ×2
  • Circle.IntersectShape (cyclomatic 17) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:215 — Circle.IntersectShape 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. This shape REPEATS in the file: one other method here (Circle.IntersectShape) 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.
  • Circle.IntersectShape (cyclomatic 17) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:265 — Circle.IntersectShape 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. This shape REPEATS in the file: one other method here (Circle.IntersectShape) 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.
D1 · Cyclomatic Complexity · Circle.IntersectShape (cyclomatic 16) · ×2
  • Circle.IntersectShape (cyclomatic 16) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:681 — Circle.IntersectShape 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. This shape REPEATS in the file: one other method here (Circle.IntersectShape) 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.
  • Circle.IntersectShape (cyclomatic 16) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:756 — Circle.IntersectShape 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. This shape REPEATS in the file: one other method here (Circle.IntersectShape) 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.
D1 · Cyclomatic Complexity · Quad.GetClosestPoint (cyclomatic 16) · ×2
  • Quad.GetClosestPoint (cyclomatic 16) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:525 — Quad.GetClosestPoint has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (Quad.GetClosestPoint) 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.
  • Quad.GetClosestPoint (cyclomatic 16) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:707 — Quad.GetClosestPoint has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (Quad.GetClosestPoint) 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.
D1 · Cyclomatic Complexity · Rect.GetClosestPoint (cyclomatic 16) · ×2
  • Rect.GetClosestPoint (cyclomatic 16) ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:520 — Rect.GetClosestPoint has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (Rect.GetClosestPoint) 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.
  • Rect.GetClosestPoint (cyclomatic 16) ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:700 — Rect.GetClosestPoint has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (Rect.GetClosestPoint) 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.
D17 · Explicit Debt · TodoComment · ×2
  • TodoComment Examples/Scenes/ExampleScenes/PhysicsExampleSource/Ship.cs:15 — //TODO: add effects for collision — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment ShapeEngine/Color/ColorHsl.cs:72 — //Todo Maybe just use raylib to/from hsv functions here as well? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · Quad.IntersectShape (cognitive 46) · ×2
  • Quad.IntersectShape (cognitive 46) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1112 — Quad.IntersectShape has cognitive complexity 46 (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. This shape REPEATS in the file: one other method here (Quad.IntersectShape) 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.
  • Quad.IntersectShape (cognitive 46) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1254 — Quad.IntersectShape has cognitive complexity 46 (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. This shape REPEATS in the file: one other method here (Quad.IntersectShape) 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.
D2 · Cognitive Complexity · Rect.IntersectShape (cognitive 46) · ×2
  • Rect.IntersectShape (cognitive 46) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:442 — Rect.IntersectShape has cognitive complexity 46 (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. This shape REPEATS in the file: one other method here (Rect.IntersectShape) 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.
  • Rect.IntersectShape (cognitive 46) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:591 — Rect.IntersectShape has cognitive complexity 46 (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. This shape REPEATS in the file: one other method here (Rect.IntersectShape) 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.
D2 · Cognitive Complexity · Triangle.IntersectShape (cognitive 34) · ×2
  • Triangle.IntersectShape (cognitive 34) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:993 — Triangle.IntersectShape has cognitive complexity 34 (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. This shape REPEATS in the file: one other method here (Triangle.IntersectShape) 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.
  • Triangle.IntersectShape (cognitive 34) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1106 — Triangle.IntersectShape has cognitive complexity 34 (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. This shape REPEATS in the file: one other method here (Triangle.IntersectShape) 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.
D2 · Cognitive Complexity · CollisionHandler.CastSpace (cognitive 32) · ×2
  • CollisionHandler.CastSpace (cognitive 32) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:47 — CollisionHandler.CastSpace has cognitive complexity 32 (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. This shape REPEATS in the file: one other method here (CollisionHandler.CastSpace) 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.
  • CollisionHandler.CastSpace (cognitive 32) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:92 — CollisionHandler.CastSpace has cognitive complexity 32 (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. This shape REPEATS in the file: one other method here (CollisionHandler.CastSpace) 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.
D2 · Cognitive Complexity · Circle.IntersectShape (cognitive 24) · ×2
  • Circle.IntersectShape (cognitive 24) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:215 — Circle.IntersectShape has cognitive complexity 24 (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. This shape REPEATS in the file: one other method here (Circle.IntersectShape) 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.
  • Circle.IntersectShape (cognitive 24) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:265 — Circle.IntersectShape has cognitive complexity 24 (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. This shape REPEATS in the file: one other method here (Circle.IntersectShape) 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.
D2 · Cognitive Complexity · Circle.IntersectShape (cognitive 22) · ×2
  • Circle.IntersectShape (cognitive 22) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:681 — Circle.IntersectShape 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. This shape REPEATS in the file: one other method here (Circle.IntersectShape) 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.
  • Circle.IntersectShape (cognitive 22) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:756 — Circle.IntersectShape 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. This shape REPEATS in the file: one other method here (Circle.IntersectShape) 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.
D2 · Cognitive Complexity · Polygon.IntersectShape (cognitive 22) · ×2
  • Polygon.IntersectShape (cognitive 22) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:237 — Polygon.IntersectShape 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. This shape REPEATS in the file: one other method here (Polygon.IntersectShape) 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.
  • Polygon.IntersectShape (cognitive 22) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:286 — Polygon.IntersectShape 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. This shape REPEATS in the file: one other method here (Polygon.IntersectShape) 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.
D2 · Cognitive Complexity · Polyline.IntersectShape (cognitive 22) · ×2
  • Polyline.IntersectShape (cognitive 22) ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:263 — Polyline.IntersectShape 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. This shape REPEATS in the file: one other method here (Polyline.IntersectShape) 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.
  • Polyline.IntersectShape (cognitive 22) ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:319 — Polyline.IntersectShape 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. This shape REPEATS in the file: one other method here (Polyline.IntersectShape) 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.
D2 · Cognitive Complexity · Points.ConvexHull_JarvisMarch (cognitive 18) · ×2
  • Points.ConvexHull_JarvisMarch (cognitive 18) ShapeEngine/Geometry/PointsDef/Points.cs:731 — Points.ConvexHull_JarvisMarch 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. This shape REPEATS in the file: one other method here (Points.ConvexHull_JarvisMarch) 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.
  • Points.ConvexHull_JarvisMarch (cognitive 18) ShapeEngine/Geometry/PointsDef/Points.cs:780 — Points.ConvexHull_JarvisMarch 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. This shape REPEATS in the file: one other method here (Points.ConvexHull_JarvisMarch) 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.
D2 · Cognitive Complexity · Quad.OverlapShape (cognitive 17) · ×2
  • Quad.OverlapShape (cognitive 17) ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:225 — Quad.OverlapShape has cognitive complexity 17 (threshold 15). 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. This shape REPEATS in the file: one other method here (Quad.OverlapShape) 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.
  • Quad.OverlapShape (cognitive 17) ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:256 — Quad.OverlapShape has cognitive complexity 17 (threshold 15). 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. This shape REPEATS in the file: one other method here (Quad.OverlapShape) 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.
D2 · Cognitive Complexity · Quad.IntersectShape (cognitive 16) · ×2
  • Quad.IntersectShape (cognitive 16) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:381 — Quad.IntersectShape has cognitive complexity 16 (threshold 15). 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. This shape REPEATS in the file: one other method here (Quad.IntersectShape) 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.
  • Quad.IntersectShape (cognitive 16) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:510 — Quad.IntersectShape has cognitive complexity 16 (threshold 15). 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. This shape REPEATS in the file: one other method here (Quad.IntersectShape) 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.
D2 · Cognitive Complexity · Rect.IntersectShape (cognitive 16) · ×2
  • Rect.IntersectShape (cognitive 16) ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:461 — Rect.IntersectShape has cognitive complexity 16 (threshold 15). 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. This shape REPEATS in the file: one other method here (Rect.IntersectShape) 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.
  • Rect.IntersectShape (cognitive 16) ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:604 — Rect.IntersectShape has cognitive complexity 16 (threshold 15). 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. This shape REPEATS in the file: one other method here (Rect.IntersectShape) 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.
D4 · Code Duplication · Near-duplicate member family (4 members, 24 shared lines) · ×2
  • Near-duplicate member family (4 members, 24 shared lines) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:31 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:31-63 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:31-67 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:31-67 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:31-67 — These 4 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Near-duplicate member family (4 members, 24 shared lines) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:74 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:74-110 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:78-114 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:78-114 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:78-114 — These 4 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 14 shared lines) · ×2
  • Near-duplicate member family (4 members, 14 shared lines) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:78 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:78-114 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:455-487 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:497-531 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:540-576 — These 4 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Near-duplicate member family (4 members, 14 shared lines) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:78 — ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:78-114 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:453-485 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:495-529 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:538-575 — These 4 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×2
  • Edited copy of a member (42 corresponding lines) ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:293 — ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:293-336 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:353-394 — 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) ShapeEngine/Text/BitmapFontAtlas.cs:340 — ShapeEngine/Text/BitmapFontAtlas.cs:340-381 | ShapeEngine/Text/BitmapFontAtlas.cs:393-457 — 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) · ×2
  • Edited copy of a member (35 corresponding lines) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:55 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:55-98 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:62-96 — 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) ShapeEngine/Geometry/QuadDef/QuadMath.cs:480 — ShapeEngine/Geometry/QuadDef/QuadMath.cs:480-526 | ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:153-187 — 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 (39 corresponding lines) · ×2
  • Edited copy of a member (39 corresponding lines) ShapeEngine/Geometry/RectDef/RectCollision.cs:104 — ShapeEngine/Geometry/RectDef/RectCollision.cs:104-142 | ShapeEngine/Geometry/RectDef/RectCollision.cs:155-195 — 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.
  • Edited copy of a member (39 corresponding lines) ShapeEngine/Text/BitmapFont.cs:208 — ShapeEngine/Text/BitmapFont.cs:208-247 | ShapeEngine/Text/BitmapFont.cs:260-298 — 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 (4 members, 42+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 42+ corresponding lines) ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:59 — ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:59-104 | ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:218-259 | ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:275-320 | ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:335-383 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 42 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, 42+ corresponding lines) ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:739 — ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:739-781 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:794-835 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:750-796 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:809-854 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 42 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 (31 corresponding lines) · ×2
  • Edited copy of a member (31 corresponding lines) ShapeEngine/Text/BitmapFontAtlas.cs:207 — ShapeEngine/Text/BitmapFontAtlas.cs:207-242 | ShapeEngine/Text/BitmapFontAtlas.cs:295-325 — 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) ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:1095 — ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:1095-1125 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:1135-1165 — 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 copies of one member (3 members, 37+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 37+ corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:629 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:629-666 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:727-764 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:671-707 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 37 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 37+ corresponding lines) ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:153 — ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:153-189 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:202-238 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:251-287 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 37 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×2
  • Edited copy of a member (40 corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonClipping.cs:499 — ShapeEngine/Geometry/PolygonDef/PolygonClipping.cs:499-538 | ShapeEngine/Geometry/PolygonDef/PolygonClipping.cs:553-597 — 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) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:76 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:76-115 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:125-165 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×2
  • Edited copy of a member (38 corresponding lines) ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:216 — ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:216-253 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:264-306 — 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) ShapeEngine/Geometry/PointsDef/Points.cs:732 — ShapeEngine/Geometry/PointsDef/Points.cs:732-770 | ShapeEngine/Geometry/PointsDef/Points.cs:781-818 — 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, 26+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 26+ corresponding lines) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:329 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:329-355 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:365-390 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:399-432 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 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, 26+ corresponding lines) ShapeEngine/Geometry/TriangulationDef/TriangulationClosestPoint.cs:170 — ShapeEngine/Geometry/TriangulationDef/TriangulationClosestPoint.cs:170-195 | ShapeEngine/Geometry/TriangulationDef/TriangulationClosestPoint.cs:207-232 | ShapeEngine/Geometry/TriangulationDef/TriangulationClosestPoint.cs:596-621 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 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, 30+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 30+ corresponding lines) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:678 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:678-714 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:567-596 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:608-637 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1224-1256 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 30+ corresponding lines) ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:529 — ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:529-558 | ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:574-614 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:460-489 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:501-541 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 26+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 26+ corresponding lines) REDACTED:499 — REDACTED:499-526 | REDACTED:539-566 | REDACTED:656-681 | REDACTED:736-762 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 26 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, 26+ corresponding lines) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:524 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:524-549 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:568-593 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:615-640 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:659-684 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 26 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, 24+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 24+ corresponding lines) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1684 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1684-1714 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1732-1759 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1776-1799 — 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) ShapeEngine/Geometry/QuadDef/Quad.cs:193 — ShapeEngine/Geometry/QuadDef/Quad.cs:193-218 | ShapeEngine/Geometry/QuadDef/Quad.cs:228-251 | ShapeEngine/Geometry/QuadDef/Quad.cs:261-289 — 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 copies of one member (3 members, 29+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 29+ corresponding lines) ShapeEngine/ShapeClipper/ShapeClipperConversion2D.cs:62 — ShapeEngine/ShapeClipper/ShapeClipperConversion2D.cs:62-90 | ShapeEngine/ShapeClipper/ShapeClipperConversion2D.cs:98-126 | ShapeEngine/ShapeClipper/ShapeClipperConversion2D.cs:134-162 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 29+ corresponding lines) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:543 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:543-571 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:583-611 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:506-535 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×2
  • Edited copy of a member (25 corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:199 — ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:199-223 | ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:234-263 — 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) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:94 — ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:94-125 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:209-233 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 21+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 21+ corresponding lines) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:328 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:328-349 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:356-376 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:862-883 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:890-910 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 21+ corresponding lines) ShapeEngine/Serialization/DataObjectDict.cs:147 — ShapeEngine/Serialization/DataObjectDict.cs:147-168 | ShapeEngine/Serialization/DataObjectDict.cs:266-295 | ShapeEngine/Serialization/DataObjectList.cs:237-257 | ShapeEngine/Serialization/DataObjectList.cs:268-296 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 24+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 24+ corresponding lines) ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:88 — ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:88-111 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:219-244 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:254-280 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:290-316 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:326-353 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 24+ corresponding lines) Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:731 — Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:731-754 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:866-889 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1007-1030 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1153-1176 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1306-1329 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 17+ corresponding lines) · ×2
  • Edited copies of one member (6 members, 17+ corresponding lines) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:661 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:661-677 | ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:693-709 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:512-528 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:542-558 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:583-599 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:610-626 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
  • Edited copies of one member (6 members, 17+ corresponding lines) ShapeEngine/Geometry/CollisionSystem/CastSpaceEntry.cs:93 — ShapeEngine/Geometry/CollisionSystem/CastSpaceEntry.cs:93-109 | ShapeEngine/Geometry/CollisionSystem/CastSpaceEntry.cs:116-132 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:977-993 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:1001-1017 | ShapeEngine/Geometry/PointsDef/Points.cs:508-524 | ShapeEngine/Geometry/PointsDef/Points.cs:532-548 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 18+ corresponding lines) · ×2
  • Edited copies of one member (6 members, 18+ corresponding lines) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:211 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:211-234 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:242-265 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:276-293 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:301-318 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:793-813 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:832-852 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
  • Edited copies of one member (6 members, 18+ corresponding lines) ShapeEngine/Random/Rng.cs:87 — ShapeEngine/Random/Rng.cs:87-104 | ShapeEngine/Random/Rng.cs:113-130 | ShapeEngine/Random/Rng.cs:138-155 | ShapeEngine/Random/Rng.cs:164-181 | ShapeEngine/Random/Rng.cs:190-207 | ShapeEngine/Random/Rng.cs:215-232 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 16+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 16+ corresponding lines) ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:690 — ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:690-705 | ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:760-775 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:610-625 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:605-620 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:701-716 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 16+ corresponding lines) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:725 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:725-742 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:572-589 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:367-382 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:637-654 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:333-351 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 13+ corresponding lines) ShapeEngine/StaticLib/ShapePhysics.cs:1441 — ShapeEngine/StaticLib/ShapePhysics.cs:1441-1453 | ShapeEngine/StaticLib/ShapePhysics.cs:1468-1480 | ShapeEngine/StaticLib/ShapePhysics.cs:1494-1507 | ShapeEngine/StaticLib/ShapePhysics.cs:1523-1537 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 13+ corresponding lines) ShapeEngine/ShapeClipper/ShapeClipperOffset.cs:225 — ShapeEngine/ShapeClipper/ShapeClipperOffset.cs:225-237 | ShapeEngine/ShapeClipper/ShapeClipperOffset.cs:249-261 | ShapeEngine/ShapeClipper/ShapeClipperOffset.cs:272-287 | ShapeEngine/ShapeClipper/ShapeClipperOffset.cs:299-314 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 12+ corresponding lines) ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:151 — ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:151-162 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:178-189 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:211-222 — 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) ShapeEngine/UI/ControlNode.cs:660 — ShapeEngine/UI/ControlNode.cs:660-671 | ShapeEngine/UI/ControlNode.cs:678-689 | ShapeEngine/UI/ControlNode.cs:696-707 — 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 (45 corresponding lines) · ×2
  • Edited copy of a member (45 corresponding lines) ShapeEngine/Geometry/SegmentDef/Segment.cs:513 — ShapeEngine/Geometry/SegmentDef/Segment.cs:513-560 | ShapeEngine/Geometry/SegmentDef/Segment.cs:568-612 — 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) Examples/Scenes/ExampleScenes/CurveDataExample.cs:106 — Examples/Scenes/ExampleScenes/CurveDataExample.cs:106-150 | Examples/Scenes/ExampleScenes/CurveDataExample.cs:152-196 — 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 (4 members, 10+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 10+ corresponding lines) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:146 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:146-155 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:169-178 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:190-200 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:213-223 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 10+ corresponding lines) ShapeEngine/Geometry/CircleDef/CircleOverlapStatic.cs:201 — ShapeEngine/Geometry/CircleDef/CircleOverlapStatic.cs:201-210 | ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:251-261 | ShapeEngine/Geometry/RayDef/RayOverlapStatic.cs:278-288 | ShapeEngine/Geometry/SegmentDef/SegmentOverlapStatic.cs:233-242 — 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 (6 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (6 members, 11+ corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:31 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:31-41 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:50-60 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:69-79 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:88-98 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:107-117 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:127-137 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
  • Edited copies of one member (6 members, 11+ corresponding lines) ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:136 — ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:136-146 | ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:155-165 | ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:174-184 | ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:193-203 | ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:212-222 | ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:234-244 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 14+ corresponding lines) ShapeEngine/Serialization/DataObjectDict.cs:79 — ShapeEngine/Serialization/DataObjectDict.cs:79-92 | ShapeEngine/Serialization/DataObjectDict.cs:100-114 | ShapeEngine/Serialization/DataObjectList.cs:127-143 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:117 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:117-130 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:305-318 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:335-349 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 11+ corresponding lines) ShapeEngine/Audio/AudioDevice.cs:831 — ShapeEngine/Audio/AudioDevice.cs:831-841 | ShapeEngine/Audio/AudioDevice.cs:853-866 | ShapeEngine/Audio/AudioDevice.cs:923-934 | ShapeEngine/Audio/AudioDevice.cs:946-957 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 11+ corresponding lines) ShapeEngine/Serialization/DataObjectDict.cs:215 — ShapeEngine/Serialization/DataObjectDict.cs:215-225 | ShapeEngine/Serialization/DataObjectDict.cs:302-313 | ShapeEngine/Serialization/DataObjectList.cs:344-354 | ShapeEngine/Serialization/DataObjectList.cs:364-375 — 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 (3 members, 6+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 6+ corresponding lines) ShapeEngine/Input/InputExtensions.cs:210 — ShapeEngine/Input/InputExtensions.cs:210-215 | ShapeEngine/Input/InputExtensions.cs:228-233 | ShapeEngine/Input/InputExtensions.cs:246-251 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) ShapeEngine/Input/ModifierKeyGamepadButton.cs:83 — ShapeEngine/Input/ModifierKeyGamepadButton.cs:83-88 | ShapeEngine/Input/ModifierKeyKeyboardButton.cs:74-79 | ShapeEngine/Input/ModifierKeyMouseButton.cs:97-102 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 8+ corresponding lines) ShapeEngine/Timing/TweenFloat.cs:69 — ShapeEngine/Timing/TweenFloat.cs:69-76 | ShapeEngine/Timing/TweenInt.cs:69-76 | ShapeEngine/Timing/TweenRect.cs:70-77 | ShapeEngine/Timing/TweenVector2.cs:70-77 — 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) ShapeEngine/Geometry/CircleDef/Circle.cs:392 — ShapeEngine/Geometry/CircleDef/Circle.cs:392-399 | ShapeEngine/Geometry/RectDef/Rect.cs:754-761 | ShapeEngine/Geometry/SegmentDef/Segment.cs:220-227 | ShapeEngine/Geometry/TriangleDef/Triangle.cs:496-503 — 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 (5 members, 8+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 8+ corresponding lines) ShapeEngine/Timing/TweenColor.cs:49 — ShapeEngine/Timing/TweenColor.cs:49-56 | ShapeEngine/Timing/TweenFloat.cs:48-55 | ShapeEngine/Timing/TweenInt.cs:48-55 | ShapeEngine/Timing/TweenRect.cs:49-56 | ShapeEngine/Timing/TweenVector2.cs:49-56 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 8+ corresponding lines) ShapeEngine/Timing/TweenColor.cs:35 — ShapeEngine/Timing/TweenColor.cs:35-42 | ShapeEngine/Timing/TweenFloat.cs:34-41 | ShapeEngine/Timing/TweenInt.cs:34-41 | ShapeEngine/Timing/TweenRect.cs:35-42 | ShapeEngine/Timing/TweenVector2.cs:35-42 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×2
  • Edited copy of a member (3 corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:236 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:236-238 | ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:36-38 — 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) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:270 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:270-272 | ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs: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.
D4 · Code Duplication · Duplicated block (106 lines × 2) · ×2
  • Duplicated block (106 lines × 2) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:593 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:593-698 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:588-693 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:593` 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. 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 (106 lines × 2) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:775 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:775-880 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:768-873 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:775` 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. 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 · Duplicated block (78–79 lines × 3) · ×2
  • Duplicated block (78–79 lines × 3) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:526 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:526-604 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:521-599 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:452-529 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:526` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (78–79 lines × 3) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:708 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:708-786 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:701-779 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:591-668 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:708` it does not close everything it opens, so those 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 · Duplicated block (52 lines × 2) · ×2
  • Duplicated block (52 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:408 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:408-459 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:479-530 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:408` 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. 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 (52 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:481 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:481-532 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:559-610 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:481` 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. 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 · Duplicated block (41 lines × 2) · ×2
  • Duplicated block (41 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:346 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:346-386 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:410-450 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:346` 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. 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 (41 lines × 2) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:990 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:990-1030 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:978-1018 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:990` 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. 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 · Duplicated block (35 lines × 9) · ×2
  • Duplicated block (35 lines × 9) ShapeEngine/Geometry/CollisionSystem/Collider.cs:1384 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:1384-1418 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1426-1460 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1468-1502 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1510-1544 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1552-1586 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1594-1628 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1636-1670 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1678-1712 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1720-1754 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (35 lines × 9) ShapeEngine/Geometry/CollisionSystem/Collider.cs:1850 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:1850-1884 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1897-1931 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1944-1978 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1991-2025 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:2038-2072 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:2085-2119 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:2132-2166 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:2179-2213 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:2226-2260 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (29–30 lines × 3) · ×2
  • Duplicated block (29–30 lines × 3) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:898 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:898-926 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:888-916 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:738-767 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:898` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (29–30 lines × 3) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:973 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:973-1001 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:961-989 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:805-834 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:973` it does not close everything it opens, so those 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 · Duplicated block (29 lines × 2) · ×2
  • Duplicated block (29 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:201 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:201-229 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:220-248 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 279 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 `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:201` 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. 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 × 2) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:67 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:67-95 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:122-150 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×2
  • Duplicated block (21–22 lines × 2) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:469 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:469-490 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:222-242 — before extracting anything, compare `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 299 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 `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:469` 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. 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) ShapeEngine/StaticLib/ShapePhysics.cs:429 — ShapeEngine/StaticLib/ShapePhysics.cs:429-450 | ShapeEngine/StaticLib/ShapePhysics.cs:619-639 — both copies are in the same file, so extract the 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 `ShapeEngine/StaticLib/ShapePhysics.cs:429` it does not close everything it opens, so those 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 `position1` to `Vector2 force2) CalculateAttraction(Vector2` in one and `Vector2 force2) CalculateRepulsion(Vector2` 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.
D4 · Code Duplication · Duplicated block (19 lines × 9) · ×2
  • Duplicated block (19 lines × 9) ShapeEngine/Geometry/CollisionSystem/Collider.cs:951 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:951-969 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:993-1011 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1035-1053 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1077-1095 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1119-1137 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1161-1179 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1203-1221 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1245-1263 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1287-1305 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CollisionSystem/Collider.cs:951` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 9) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:433 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:433-451 | ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:389-407 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:65-83 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:48-66 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:765-783 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:329-347 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:44-62 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:412-430 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:692-710 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:433` 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.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×2
  • Duplicated block (20–21 lines × 2) ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:282 — ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:282-301 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:256-276 — before extracting anything, compare `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs` and `ShapeEngine/Geometry/RayDef/RayClosestPoint.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 224 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 `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:282` 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. 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–21 lines × 2) ShapeEngine/StaticLib/ShapePhysics.cs:567 — ShapeEngine/StaticLib/ShapePhysics.cs:567-587 | ShapeEngine/StaticLib/ShapePhysics.cs:755-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. 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 · Duplicated block (18–20 lines × 2) · ×2
  • Duplicated block (18–20 lines × 2) ShapeEngine/Core/GameDef/Game.cs:533 — ShapeEngine/Core/GameDef/Game.cs:533-552 | ShapeEngine/Core/GameDef/Game.cs:553-570 — both copies are in the same file, so extract the 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 `ShapeEngine/Core/GameDef/Game.cs:533` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (18–20 lines × 2) ShapeEngine/Pathfinding/AStar.cs:118 — ShapeEngine/Pathfinding/AStar.cs:118-137 | ShapeEngine/Pathfinding/AStar.cs:259-276 — both copies are in the same file, so extract the 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 `ShapeEngine/Pathfinding/AStar.cs:118` 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. 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.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×2
  • Duplicated block (19–20 lines × 2) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1111 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1111-1130 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:931-949 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 456 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1111` it does not close everything it opens, so those exact lines 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–20 lines × 2) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1152 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1152-1171 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:966-984 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 456 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1152` it does not close everything it opens, so those 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 · Duplicated block (16 lines × 4) · ×2
  • Duplicated block (16 lines × 4) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1006 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1006-1021 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1114-1129 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:907-922 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:995-1010 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 (16 lines × 4) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:95 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:95-110 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:99-114 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:99-114 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:99-114 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:95` 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. 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 · Duplicated block (12–19 lines × 2) · ×2
  • Duplicated block (12–19 lines × 2) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:203 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:203-221 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:109-120 — 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 `ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:203` 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. 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 `linePoint` to `float t) IntersectLineRayInfo(Vector2` in one and `Vector2` 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 (12–19 lines × 2) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:419 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:419-437 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:267-278 — 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 `ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:419` 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. 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 · Duplicated block (17–18 lines × 3) · ×2
  • Duplicated block (17–18 lines × 3) ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:428 — ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:428-444 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:418-434 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:416-433 — before extracting anything, compare `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs` and `ShapeEngine/Geometry/RayDef/RayClosestPoint.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 224 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 `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:428` 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. 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 × 3) ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:467 — ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:467-483 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:457-473 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:456-473 — before extracting anything, compare `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs` and `ShapeEngine/Geometry/RayDef/RayClosestPoint.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 224 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 `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:467` 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. 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 · Duplicated block (17–18 lines × 2) · ×2
  • Duplicated block (17–18 lines × 2) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:242 — ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:242-259 | ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:267-283 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:242` 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 (17–18 lines × 2) REDACTED:191 — REDACTED:191-207 | REDACTED:221-238 — both copies are in the same file, so extract the 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:221` 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. 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 · Duplicated block (16 lines × 3) · ×2
  • Duplicated block (16 lines × 3) ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:72 — ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:72-87 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:134-149 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:158-173 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 449 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 `ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:72` 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. 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 × 3) ShapeEngine/StaticLib/ShapePhysics.cs:432 — ShapeEngine/StaticLib/ShapePhysics.cs:432-448 | ShapeEngine/StaticLib/ShapePhysics.cs:622-637 | ShapeEngine/StaticLib/ShapePhysics.cs:914-930 — 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.
D4 · Code Duplication · Duplicated block (15–16 lines × 3) · ×2
  • Duplicated block (15–16 lines × 3) ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:267 — ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:267-282 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:312-326 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:364-378 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:267` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `Triangle` in one and `Quad` 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–16 lines × 3) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:613 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:613-627 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:667-682 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:725-740 — 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:613` 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. 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 · Duplicated block (14 lines × 11) · ×2
  • Duplicated block (14 lines × 11) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:446 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:446-459 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:524-537 | ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:554-567 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:708-721 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:812-825 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1193-1206 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:514-527 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:1176-1189 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:554-567 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:749-762 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:998-1011 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs` and `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 11) ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:223 — ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:223-236 | ShapeEngine/Geometry/LineDef/LineOverlap.cs:251-264 | ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:332-345 | ShapeEngine/Geometry/PolylineDef/PolylineOverlap.cs:290-303 | ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:346-359 | ShapeEngine/Geometry/RayDef/RayOverlap.cs:232-245 | ShapeEngine/Geometry/RectDef/RectOverlap.cs:336-349 | ShapeEngine/Geometry/SegmentDef/SegmentOverlap.cs:329-342 | ShapeEngine/Geometry/SegmentsDef/SegmentsOverlap.cs:251-264 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:426-439 | ShapeEngine/Geometry/TriangulationDef/TriangulationOverlap.cs:445-458 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 11 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 11 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (14 lines × 9) · ×2
  • Duplicated block (14 lines × 9) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:27 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:27-40 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:27-40 | ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:98-111 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:150-163 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:28-41 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:27-40 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:27-40 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:170-183 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:27-40 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs` and `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 9) ShapeEngine/Geometry/CollisionSystem/Collider.cs:935 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:935-948 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:977-990 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1019-1032 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1061-1074 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1103-1116 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1145-1158 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1187-1200 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1229-1242 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1271-1284 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CollisionSystem/Collider.cs:935` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (14–15 lines × 3) · ×2
  • Duplicated block (14–15 lines × 3) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:246 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:246-259 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:249-262 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:224-238 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:246` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14–15 lines × 3) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:339 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:339-353 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:338-352 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:304-317 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:339` it does not close everything it opens, so those 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 · Duplicated block (13–14 lines × 4) · ×2
  • Duplicated block (13–14 lines × 4) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:47 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:47-59 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:345-358 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:385-398 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:425-438 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:46` calls `Clear`, `EnsureCapacity` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:345` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13–14 lines × 4) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:47 — ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:47-59 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:345-358 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:384-397 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:424-437 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:46` calls `Clear`, `EnsureCapacity` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:345` 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.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×2
  • Duplicated block (12 lines × 5) ShapeEngine/Geometry/CircleDef/CircleContains.cs:235 — ShapeEngine/Geometry/CircleDef/CircleContains.cs:235-246 | ShapeEngine/Geometry/PolygonDef/PolygonContains.cs:188-199 | ShapeEngine/Geometry/QuadDef/QuadContains.cs:168-179 | ShapeEngine/Geometry/RectDef/RectContains.cs:225-236 | ShapeEngine/Geometry/TriangleDef/TriangleContains.cs:235-246 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 5) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:836 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:836-847 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:915-926 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:994-1005 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1073-1084 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1157-1168 — 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:836` 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.
D4 · Code Duplication · Duplicated block (10 lines × 10) · ×2
  • Duplicated block (10 lines × 10) ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:45 — ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:45-54 | ShapeEngine/Geometry/LineDef/LineOverlap.cs:137-146 | ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:142-151 | ShapeEngine/Geometry/PolylineDef/PolylineOverlap.cs:155-164 | ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:125-134 | ShapeEngine/Geometry/RayDef/RayOverlap.cs:128-137 | ShapeEngine/Geometry/RectDef/RectOverlap.cs:147-156 | ShapeEngine/Geometry/SegmentDef/SegmentOverlap.cs:122-131 | ShapeEngine/Geometry/SegmentsDef/SegmentsOverlap.cs:115-124 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:184-193 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:45` it does not close everything it opens, so those 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 × 10) ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:222 — ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:222-231 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:319-328 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:363-372 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:385-394 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:407-416 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:428-437 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:612-621 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:641-650 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:670-679 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:698-707 — before extracting anything, compare `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs` and `ShapeEngine/Geometry/RectDef/RectIntersectShape.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 133 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 `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:222` it does not close everything it opens, so those 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 · Duplicated block (10–12 lines × 3) · ×2
  • Duplicated block (10–12 lines × 3) ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:177 — ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:177-186 | ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:292-303 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:370-381 — 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 `ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:177` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:306` calls `OverlapSegmentSegment` and `ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:385` 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–12 lines × 3) ShapeEngine/Input/InputTypeGamepadButtonAxis.cs:36 — ShapeEngine/Input/InputTypeGamepadButtonAxis.cs:36-45 | ShapeEngine/Input/InputTypeKeyboardButtonAxis.cs:34-44 | ShapeEngine/Input/InputTypeMouseButtonAxis.cs:42-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 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Input/InputTypeKeyboardButtonAxis.cs:30` calls `Copy`, `InputTypeKeyboardButtonAxis` and `ShapeEngine/Input/InputTypeGamepadButtonAxis.cs:32` 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.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×2
  • Duplicated block (11–12 lines × 2) REDACTED:281 — REDACTED:281-292 | ShapeEngine/Content/ContentPack.cs:437-447 — 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:281` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:295` calls `StartNew` and `ShapeEngine/Content/ContentPack.cs:451` 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–12 lines × 2) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:31 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:31-42 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:128-138 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 · Duplicated block (9 lines × 11) · ×2
  • Duplicated block (9 lines × 11) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:333 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:333-341 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:604-612 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:744-752 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:868-876 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:992-1000 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:337-345 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:615-623 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:740-748 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:864-872 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:988-996 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:1112-1120 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 979 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 × 11) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:56 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:56-66 | ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:128-138 | ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:193-203 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:102-110 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:156-164 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:24-33 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:66-75 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:100-108 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:131-139 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:165-173 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:197-205 — there are 11 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 11 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 `linePoint` to `float t) IntersectLineSegmentInfo(Vector2` in one and `float t) IntersectLineRayInfo(Vector2` 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.
D4 · Code Duplication · Duplicated block (10 lines × 6) · ×2
  • Duplicated block (10 lines × 6) ShapeEngine/Content/ContentLoader.cs:908 — ShapeEngine/Content/ContentLoader.cs:908-917 | ShapeEngine/Content/ContentLoader.cs:958-967 | ShapeEngine/Content/ContentLoader.cs:1005-1014 | ShapeEngine/Content/ContentLoader.cs:1051-1060 | ShapeEngine/Content/ContentLoader.cs:1096-1105 | ShapeEngine/Content/ContentLoader.cs:1140-1149 — 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 `ShapeEngine/Content/ContentLoader.cs:908` 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. 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 × 6) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:380 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:380-390 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:420-430 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:380-389 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:420-429 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:379-390 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:419-430 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1185 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 4) · ×2
  • Duplicated block (10–11 lines × 4) ShapeEngine/Geometry/CircleDef/CircleContains.cs:133 — ShapeEngine/Geometry/CircleDef/CircleContains.cs:133-142 | ShapeEngine/Geometry/PolygonDef/PolygonContains.cs:42-51 | ShapeEngine/Geometry/RectDef/RectContains.cs:99-109 | ShapeEngine/Geometry/TriangleDef/TriangleContains.cs:101-110 — 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 `ShapeEngine/Geometry/CircleDef/CircleContains.cs:133` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10–11 lines × 4) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:802 — ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:802-811 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:828-837 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:911-921 | ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:940-950 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:802` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:922` calls `Normalize` and `ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:951` 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×2
  • Duplicated block (10–11 lines × 2) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:658 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:658-668 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:715-724 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:658` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 2) Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:255 — Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:255-265 | Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:268-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:255` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:254` calls `SetRect`, `ApplyMargins`, `Update` and `Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:268` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×2
  • Duplicated block (9 lines × 5) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:969 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:969-977 | ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:273-281 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:2076-2084 | ShapeEngine/Geometry/RectDef/RectDrawing.cs:671-679 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:842-850 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:969` 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. 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 × 5) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:350 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:350-360 | ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:409-419 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:260-268 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:310-318 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:331-340 — 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.
D4 · Code Duplication · Duplicated block (7 lines × 8) · ×2
  • Duplicated block (7 lines × 8) ShapeEngine/Content/ContentPack.cs:1926 — ShapeEngine/Content/ContentPack.cs:1926-1932 | ShapeEngine/Content/ContentPack.cs:1968-1974 | ShapeEngine/Content/ContentPack.cs:2012-2018 | ShapeEngine/Content/ContentPack.cs:2054-2060 | ShapeEngine/Content/ContentPack.cs:2096-2102 | ShapeEngine/Content/ContentPack.cs:2138-2144 | ShapeEngine/Content/ContentPack.cs:2180-2186 | ShapeEngine/Content/ContentPack.cs:2222-2228 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Content/ContentPack.cs:1926` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 8) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:422 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:422-428 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:544-550 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:436-442 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:560-566 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:435-441 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:557-563 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:434-440 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:559-565 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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.
D4 · Code Duplication · Duplicated block (8 lines × 6) · ×2
  • Duplicated block (8 lines × 6) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:742 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:742-749 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:769-776 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:796-803 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:823-830 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:850-857 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:878-885 — 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 `ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:742` it does not close everything it opens, so those 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 × 6) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:918 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:918-925 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:926-933 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:934-941 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:961-968 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:974-981 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:987-994 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×2
  • Duplicated block (5 lines × 6) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:498 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:498-502 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:545-549 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:380-384 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:420-424 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:379-383 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:419-423 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 314 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 × 6) ShapeEngine/Geometry/LineDef/LineDrawing.cs:28 — ShapeEngine/Geometry/LineDef/LineDrawing.cs:28-32 | ShapeEngine/Geometry/LineDef/LineDrawing.cs:45-49 | ShapeEngine/Geometry/LineDef/LineDrawing.cs:62-66 | ShapeEngine/Geometry/LineDef/LineDrawing.cs:79-83 | ShapeEngine/Geometry/LineDef/LineDrawing.cs:96-100 | ShapeEngine/Geometry/LineDef/LineDrawing.cs:118-122 — 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. 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 `mask` to `Triangle` in one and `Circle` 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 3) · ×2
  • Duplicated block (8–9 lines × 3) REDACTED:387 — REDACTED:387-395 | ShapeEngine/Content/ContentPack.cs:533-541 | ShapeEngine/Content/ContentPack.cs:1025-1032 — 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 `REDACTED:387` 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, `ShapeEngine/Content/ContentPack.cs:1024` calls `Invoke` and `ShapeEngine/Content/ContentPack.cs:532` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8–9 lines × 3) Examples/Scenes/ExampleScenes/InputExample.cs:99 — Examples/Scenes/ExampleScenes/InputExample.cs:99-107 | Examples/Scenes/ExampleScenes/InputExample.cs:469-476 | Examples/Scenes/ExampleScenes/InputExample.cs:593-600 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/InputExample.cs:99` it does not close everything it opens, so those 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 · Duplicated block (6 lines × 4) · ×2
  • Duplicated block (6 lines × 4) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:958 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:958-963 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:971-976 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:984-989 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:997-1002 — 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 (6 lines × 4) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1078 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1078-1083 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1095-1101 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1110-1116 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1130-1138 — 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.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×2
  • Sync-over-async blocking — 1 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 REDACTED:231 — `producer.Wait()` 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).
AX5 · Architecture & structure · Appears unstructured (no recognised architecture) · ×1
  • Appears unstructured (no recognised architecture) — ~161.2k production LoC (547 types) across 3 project(s) / 46 namespace(s) with no recognised architectural style or layering — at this size, deliberate module boundaries would help. No DDD/clean/vertical-slice/CQRS/transaction-script organisation was detected — code is likely organised ad hoc, which makes change and onboarding harder as it grows.
D1 · Cyclomatic Complexity · InputExtensions.GetButtonName (cyclomatic 195) · ×1
  • InputExtensions.GetButtonName (cyclomatic 195) ShapeEngine/Input/InputExtensions.cs:527 — InputExtensions.GetButtonName has cyclomatic complexity 195 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · StripedShapeDrawingExample.OnDrawGameExample (cyclomatic 97) · ×1
  • StripedShapeDrawingExample.OnDrawGameExample (cyclomatic 97) Examples/Scenes/ExampleScenes/StripedShapeDrawingExample.cs:434 — StripedShapeDrawingExample.OnDrawGameExample has cyclomatic complexity 97 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextFont.DrawTextWrapChar (cyclomatic 58) · ×1
  • TextFont.DrawTextWrapChar (cyclomatic 58) ShapeEngine/Text/TextFont.cs:476 — TextFont.DrawTextWrapChar has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Polygon.GenerateStripedSegments (cyclomatic 57) · ×1
  • Polygon.GenerateStripedSegments (cyclomatic 57) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:149 — Polygon.GenerateStripedSegments has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InputExtensions.GetButtonName (cyclomatic 53) · ×1
  • InputExtensions.GetButtonName (cyclomatic 53) ShapeEngine/Input/InputExtensions.cs:756 — InputExtensions.GetButtonName has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GameloopExamples.Update (cyclomatic 45) · ×1
  • GameloopExamples.Update (cyclomatic 45) Examples/GameloopExamples.cs:724 — GameloopExamples.Update has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AdaptiveFpsLimiter.Update (cyclomatic 44) · ×1
  • AdaptiveFpsLimiter.Update (cyclomatic 44) ShapeEngine/Core/AdaptiveFpsLimiter.cs:401 — AdaptiveFpsLimiter.Update 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.
D1 · Cyclomatic Complexity · ControlNode.InternalUpdate (cyclomatic 43) · ×1
  • ControlNode.InternalUpdate (cyclomatic 43) ShapeEngine/UI/ControlNode.cs:926 — ControlNode.InternalUpdate 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.
D1 · Cyclomatic Complexity · Circle.GenerateStripedSegments (cyclomatic 41) · ×1
  • Circle.GenerateStripedSegments (cyclomatic 41) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:127 — Circle.GenerateStripedSegments 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.
D1 · Cyclomatic Complexity · Quad.GenerateStripedSegments (cyclomatic 41) · ×1
  • Quad.GenerateStripedSegments (cyclomatic 41) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:131 — Quad.GenerateStripedSegments 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.
D1 · Cyclomatic Complexity · Rect.GenerateStripedSegments (cyclomatic 41) · ×1
  • Rect.GenerateStripedSegments (cyclomatic 41) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:131 — Rect.GenerateStripedSegments 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.
D1 · Cyclomatic Complexity · Triangle.GenerateStripedSegments (cyclomatic 41) · ×1
  • Triangle.GenerateStripedSegments (cyclomatic 41) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:131 — Triangle.GenerateStripedSegments 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.
D1 · Cyclomatic Complexity · Game.RunGameloop (cyclomatic 40) · ×1
  • Game.RunGameloop (cyclomatic 40) ShapeEngine/Core/GameDef/GameGameloop.cs:62 — Game.RunGameloop has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Program.ConstructUnpackCommand (cyclomatic 38) · ×1
  • Program.ConstructUnpackCommand (cyclomatic 38) ResourcePacker/Program.cs:426 — Program.ConstructUnpackCommand has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PolylineInflationExample.OnDrawGameExample (cyclomatic 36) · ×1
  • PolylineInflationExample.OnDrawGameExample (cyclomatic 36) Examples/Scenes/ExampleScenes/PolylineInflationExample.cs:119 — PolylineInflationExample.OnDrawGameExample 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.
D1 · Cyclomatic Complexity · Program.ConstructPackCommand (cyclomatic 35) · ×1
  • Program.ConstructPackCommand (cyclomatic 35) ResourcePacker/Program.cs:183 — Program.ConstructPackCommand 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.
D1 · Cyclomatic Complexity · Triangle.DrawLinesPercentageHelper (cyclomatic 34) · ×1
  • Triangle.DrawLinesPercentageHelper (cyclomatic 34) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1116 — Triangle.DrawLinesPercentageHelper has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ControlNodeContainer.OnChildNavigated (cyclomatic 34) · ×1
  • ControlNodeContainer.OnChildNavigated (cyclomatic 34) ShapeEngine/UI/ControlNodeContainer.cs:308 — ControlNodeContainer.OnChildNavigated 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.
D1 · Cyclomatic Complexity · InputExtensions.GetButtonName (cyclomatic 32) · ×1
  • InputExtensions.GetButtonName (cyclomatic 32) ShapeEngine/Input/InputExtensions.cs:706 — InputExtensions.GetButtonName has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · EndlessSpaceCollision.OnUpdateExample (cyclomatic 32) · ×1
  • EndlessSpaceCollision.OnUpdateExample (cyclomatic 32) Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:715 — EndlessSpaceCollision.OnUpdateExample 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.
D1 · Cyclomatic Complexity · SavegameExample.OnDrawUIExample (cyclomatic 31) · ×1
  • SavegameExample.OnDrawUIExample (cyclomatic 31) Examples/Scenes/ExampleScenes/SavegameExample.cs:307 — SavegameExample.OnDrawUIExample 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.
D1 · Cyclomatic Complexity · InputSystem.Update (cyclomatic 29) · ×1
  • InputSystem.Update (cyclomatic 29) ShapeEngine/Input/InputSystem.cs:134 — InputSystem.Update has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AsteroidMiningExample.OnHandleInputExample (cyclomatic 29) · ×1
  • AsteroidMiningExample.OnHandleInputExample (cyclomatic 29) Examples/Scenes/ExampleScenes/AsteroidMiningExample.cs:785 — AsteroidMiningExample.OnHandleInputExample has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextPackManager.Unpack (cyclomatic 28) · ×1
  • TextPackManager.Unpack (cyclomatic 28) REDACTED:217 — TextPackManager.Unpack 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.
D1 · Cyclomatic Complexity · TextPackManager.UnpackParallel (cyclomatic 28) · ×1
  • TextPackManager.UnpackParallel (cyclomatic 28) REDACTED:358 — TextPackManager.UnpackParallel has cyclomatic complexity 28 (threshold 15). Of this number, 19 points are the body's own statements and 9 belong 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.
D1 · Cyclomatic Complexity · InputGesture.Update (cyclomatic 27) · ×1
  • InputGesture.Update (cyclomatic 27) ShapeEngine/Input/InputGesture.cs:222 — InputGesture.Update 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.
D1 · Cyclomatic Complexity · GameloopExamples.LoadContent (cyclomatic 27) · ×1
  • GameloopExamples.LoadContent (cyclomatic 27) Examples/GameloopExamples.cs:246 — GameloopExamples.LoadContent 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.
D1 · Cyclomatic Complexity · Autogun.FindNextTarget (cyclomatic 27) · ×1
  • Autogun.FindNextTarget (cyclomatic 27) Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Autogun.cs:179 — Autogun.FindNextTarget 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.
D1 · Cyclomatic Complexity · LaserBeam.Update (cyclomatic 27) · ×1
  • LaserBeam.Update (cyclomatic 27) Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/LaserBeam.cs:57 — LaserBeam.Update 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.
D1 · Cyclomatic Complexity · ShapeIntersectionExample.OnDrawGameExample (cyclomatic 27) · ×1
  • ShapeIntersectionExample.OnDrawGameExample (cyclomatic 27) Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1575 — ShapeIntersectionExample.OnDrawGameExample 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.
D1 · Cyclomatic Complexity · FramerateSettings.FramerateSettings.ctor (cyclomatic 26) · ×1
  • FramerateSettings.FramerateSettings.ctor (cyclomatic 26) ShapeEngine/Core/Structs/FramerateSettings.cs:230 — FramerateSettings.FramerateSettings.ctor 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.
D1 · Cyclomatic Complexity · TextFont.DrawTextWrapWord (cyclomatic 26) · ×1
  • TextFont.DrawTextWrapWord (cyclomatic 26) ShapeEngine/Text/TextFont.cs:782 — TextFont.DrawTextWrapWord 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.
D1 · Cyclomatic Complexity · Quad.DrawChamferedCornersRelative (cyclomatic 25) · ×1
  • Quad.DrawChamferedCornersRelative (cyclomatic 25) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1384 — Quad.DrawChamferedCornersRelative has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GamepadDevice.WasGamepadUsed (cyclomatic 25) · ×1
  • GamepadDevice.WasGamepadUsed (cyclomatic 25) ShapeEngine/Input/GamepadDevice.cs:455 — GamepadDevice.WasGamepadUsed has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InputAction.UpdateAction (cyclomatic 25) · ×1
  • InputAction.UpdateAction (cyclomatic 25) ShapeEngine/Input/InputAction.cs:354 — InputAction.UpdateAction has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IntersectionPoints.Filter (cyclomatic 24) · ×1
  • IntersectionPoints.Filter (cyclomatic 24) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:652 — IntersectionPoints.Filter 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.
D1 · Cyclomatic Complexity · Quad.IntersectShape (cyclomatic 24) · ×1
  • Quad.IntersectShape (cyclomatic 24) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1004 — Quad.IntersectShape 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.
D1 · Cyclomatic Complexity · Rect.IntersectShape (cyclomatic 24) · ×1
  • Rect.IntersectShape (cyclomatic 24) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:323 — Rect.IntersectShape 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.
D1 · Cyclomatic Complexity · KeyboardDevice.WasKeyboardUsed (cyclomatic 24) · ×1
  • KeyboardDevice.WasKeyboardUsed (cyclomatic 24) ShapeEngine/Input/KeyboardDevice.cs:267 — KeyboardDevice.WasKeyboardUsed 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.
D1 · Cyclomatic Complexity · MouseDevice.WasMouseUsed (cyclomatic 24) · ×1
  • MouseDevice.WasMouseUsed (cyclomatic 24) ShapeEngine/Input/MouseDevice.cs:300 — MouseDevice.WasMouseUsed 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.
D1 · Cyclomatic Complexity · MouseDevice.GetValue (cyclomatic 24) · ×1
  • MouseDevice.GetValue (cyclomatic 24) ShapeEngine/Input/MouseDevice.cs:670 — MouseDevice.GetValue 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.
D1 · Cyclomatic Complexity · ContentPack.UnpackTextToMemoryParallel (cyclomatic 23) · ×1
  • ContentPack.UnpackTextToMemoryParallel (cyclomatic 23) ShapeEngine/Content/ContentPack.cs:723 — ContentPack.UnpackTextToMemoryParallel has cyclomatic complexity 23 (threshold 15). Of this number, 22 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.
D1 · Cyclomatic Complexity · CollisionHandler.ProcessCollisionObjectThreadSafe (cyclomatic 23) · ×1
  • CollisionHandler.ProcessCollisionObjectThreadSafe (cyclomatic 23) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandler.cs:378 — CollisionHandler.ProcessCollisionObjectThreadSafe 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. This shape REPEATS in the file: one other method here (CollisionHandler.ProcessCollisionObject) 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.
D1 · Cyclomatic Complexity · CollisionHandler.ProcessCollisionObject (cyclomatic 23) · ×1
  • CollisionHandler.ProcessCollisionObject (cyclomatic 23) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandler.cs:598 — CollisionHandler.ProcessCollisionObject 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. This shape REPEATS in the file: one other method here (CollisionHandler.ProcessCollisionObjectThreadSafe) 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.
D1 · Cyclomatic Complexity · EndlessSpaceCollision.OnHandleInputExample (cyclomatic 23) · ×1
  • EndlessSpaceCollision.OnHandleInputExample (cyclomatic 23) Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:599 — EndlessSpaceCollision.OnHandleInputExample 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.
D1 · Cyclomatic Complexity · TextExampleScene.OnHandleInputExample (cyclomatic 23) · ×1
  • TextExampleScene.OnHandleInputExample (cyclomatic 23) Examples/Scenes/TextExampleScene.cs:149 — TextExampleScene.OnHandleInputExample 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.
D1 · Cyclomatic Complexity · Quad.DrawCorners (cyclomatic 22) · ×1
  • Quad.DrawCorners (cyclomatic 22) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:589 — Quad.DrawCorners 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.
D1 · Cyclomatic Complexity · Triangle.DrawCorners (cyclomatic 22) · ×1
  • Triangle.DrawCorners (cyclomatic 22) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:228 — Triangle.DrawCorners 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. This shape REPEATS in the file: one other method here (Triangle.DrawCornersRelative) 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.
D1 · Cyclomatic Complexity · Triangle.DrawCornersRelative (cyclomatic 22) · ×1
  • Triangle.DrawCornersRelative (cyclomatic 22) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:475 — Triangle.DrawCornersRelative 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. This shape REPEATS in the file: one other method here (Triangle.DrawCorners) 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.
D1 · Cyclomatic Complexity · Program.Main (cyclomatic 22) · ×1
  • Program.Main (cyclomatic 22) ResourcePacker/Program.cs:20 — Program.Main 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.
D1 · Cyclomatic Complexity · GameWindow.CheckForWindowConfigFlagChanges (cyclomatic 21) · ×1
  • GameWindow.CheckForWindowConfigFlagChanges (cyclomatic 21) ShapeEngine/Core/GameWindow.cs:1292 — GameWindow.CheckForWindowConfigFlagChanges 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.
D1 · Cyclomatic Complexity · Quad.DrawChamferedCorners (cyclomatic 21) · ×1
  • Quad.DrawChamferedCorners (cyclomatic 21) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1158 — Quad.DrawChamferedCorners 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.
D1 · Cyclomatic Complexity · Triangle.DrawLinesHelper (cyclomatic 20) · ×1
  • Triangle.DrawLinesHelper (cyclomatic 20) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:940 — Triangle.DrawLinesHelper 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.
D1 · Cyclomatic Complexity · GameWindow.CheckForCursorChanges (cyclomatic 19) · ×1
  • GameWindow.CheckForCursorChanges (cyclomatic 19) ShapeEngine/Core/GameWindow.cs:1395 — GameWindow.CheckForCursorChanges 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.
D1 · Cyclomatic Complexity · Quad.OverlapQuadQuad (cyclomatic 19) · ×1
  • Quad.OverlapQuadQuad (cyclomatic 19) ShapeEngine/Geometry/QuadDef/QuadOverlapStatic.cs:101 — Quad.OverlapQuadQuad 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.
D1 · Cyclomatic Complexity · Segment.DrawSegmentSeparateCaps (cyclomatic 19) · ×1
  • Segment.DrawSegmentSeparateCaps (cyclomatic 19) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:197 — Segment.DrawSegmentSeparateCaps 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.
D1 · Cyclomatic Complexity · Autogun.Update (cyclomatic 19) · ×1
  • Autogun.Update (cyclomatic 19) Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Autogun.cs:60 — Autogun.Update 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.
D1 · Cyclomatic Complexity · Ship.Update (cyclomatic 19) · ×1
  • Ship.Update (cyclomatic 19) Examples/Scenes/ExampleScenes/PhysicsExampleSource/Ship.cs:86 — Ship.Update 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.
D1 · Cyclomatic Complexity · Triangle.IntersectShape (cyclomatic 18) · ×1
  • Triangle.IntersectShape (cyclomatic 18) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:905 — Triangle.IntersectShape 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.
D1 · Cyclomatic Complexity · SimpleStat.ApplyModifierBounds (cyclomatic 18) · ×1
  • SimpleStat.ApplyModifierBounds (cyclomatic 18) ShapeEngine/Stats/SimpleStat.cs:917 — SimpleStat.ApplyModifierBounds 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.
D1 · Cyclomatic Complexity · Stat.Recalculate (cyclomatic 18) · ×1
  • Stat.Recalculate (cyclomatic 18) ShapeEngine/Stats/Stat.cs:118 — Stat.Recalculate 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.
D1 · Cyclomatic Complexity · PathfinderExample.OnHandleInputExample (cyclomatic 18) · ×1
  • PathfinderExample.OnHandleInputExample (cyclomatic 18) Examples/Scenes/ExampleScenes/PathfinderExample.cs:146 — PathfinderExample.OnHandleInputExample 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.
D1 · Cyclomatic Complexity · Program.ProcessArguments (cyclomatic 18) · ×1
  • Program.ProcessArguments (cyclomatic 18) ResourcePacker/Program.cs:712 — Program.ProcessArguments 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.
D1 · Cyclomatic Complexity · TextPackManager.PackParallel (cyclomatic 18) · ×1
  • TextPackManager.PackParallel (cyclomatic 18) REDACTED:110 — TextPackManager.PackParallel has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong 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.
D1 · Cyclomatic Complexity · Polyline.DrawGappedOutline (cyclomatic 17) · ×1
  • Polyline.DrawGappedOutline (cyclomatic 17) ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:268 — Polyline.DrawGappedOutline 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.
D1 · Cyclomatic Complexity · Quad.DrawLinesPercentage (cyclomatic 17) · ×1
  • Quad.DrawLinesPercentage (cyclomatic 17) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:249 — Quad.DrawLinesPercentage 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.
D1 · Cyclomatic Complexity · Segment.DrawMasked (cyclomatic 17) · ×1
  • Segment.DrawMasked (cyclomatic 17) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:547 — Segment.DrawMasked 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.
D1 · Cyclomatic Complexity · AStar.GetPath (cyclomatic 17) · ×1
  • AStar.GetPath (cyclomatic 17) ShapeEngine/Pathfinding/AStar.cs:38 — AStar.GetPath 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. This shape REPEATS in the file: one other method here (AStar.GetPathAsync) 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.
D1 · Cyclomatic Complexity · AStar.GetPathAsync (cyclomatic 17) · ×1
  • AStar.GetPathAsync (cyclomatic 17) ShapeEngine/Pathfinding/AStar.cs:181 — AStar.GetPathAsync has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 183). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest. This shape REPEATS in the file: one other method here (AStar.GetPath) 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.
D1 · Cyclomatic Complexity · ControlNodeNavigator.GetNeighborDistance (cyclomatic 17) · ×1
  • ControlNodeNavigator.GetNeighborDistance (cyclomatic 17) ShapeEngine/UI/ControlNodeNavigator.cs:421 — ControlNodeNavigator.GetNeighborDistance 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.
D1 · Cyclomatic Complexity · ShapeIntersectionExample.OnHandleInputExample (cyclomatic 17) · ×1
  • ShapeIntersectionExample.OnHandleInputExample (cyclomatic 17) Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1476 — ShapeIntersectionExample.OnHandleInputExample 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.
D1 · Cyclomatic Complexity · BinaryPackManager.Unpack (cyclomatic 17) · ×1
  • BinaryPackManager.Unpack (cyclomatic 17) REDACTED:271 — BinaryPackManager.Unpack 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.
D1 · Cyclomatic Complexity · Game.Game.ctor (cyclomatic 16) · ×1
  • Game.Game.ctor (cyclomatic 16) ShapeEngine/Core/GameDef/Game.cs:460 — Game.Game.ctor 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.
D1 · Cyclomatic Complexity · SpawnArea.Update (cyclomatic 16) · ×1
  • SpawnArea.Update (cyclomatic 16) ShapeEngine/Core/SpawnArea.cs:606 — SpawnArea.Update 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.
D1 · Cyclomatic Complexity · Circle.DrawStriped (cyclomatic 16) · ×1
  • Circle.DrawStriped (cyclomatic 16) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1111 — Circle.DrawStriped 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.
D1 · Cyclomatic Complexity · BroadphaseDynamicSpatialHash.AddCollider (cyclomatic 16) · ×1
  • BroadphaseDynamicSpatialHash.AddCollider (cyclomatic 16) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:259 — BroadphaseDynamicSpatialHash.AddCollider 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.
D1 · Cyclomatic Complexity · CollisionHandler.IntersectSpace (cyclomatic 16) · ×1
  • CollisionHandler.IntersectSpace (cyclomatic 16) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:27 — CollisionHandler.IntersectSpace 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.
D1 · Cyclomatic Complexity · Quad.DrawStriped (cyclomatic 16) · ×1
  • Quad.DrawStriped (cyclomatic 16) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1128 — Quad.DrawStriped 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.
D1 · Cyclomatic Complexity · Quad.IntersectShape (cyclomatic 16) · ×1
  • Quad.IntersectShape (cyclomatic 16) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:933 — Quad.IntersectShape 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.
D1 · Cyclomatic Complexity · Rect.DrawStriped (cyclomatic 16) · ×1
  • Rect.DrawStriped (cyclomatic 16) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:1107 — Rect.DrawStriped 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.
D1 · Cyclomatic Complexity · Rect.IntersectShape (cyclomatic 16) · ×1
  • Rect.IntersectShape (cyclomatic 16) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:242 — Rect.IntersectShape 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.
D1 · Cyclomatic Complexity · Triangle.DrawStriped (cyclomatic 16) · ×1
  • Triangle.DrawStriped (cyclomatic 16) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:1113 — Triangle.DrawStriped 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.
D1 · Cyclomatic Complexity · StatSet.Test_DirtyTracking_OnlyRecalculatesAffectedStats (cyclomatic 16) · ×1
  • StatSet.Test_DirtyTracking_OnlyRecalculatesAffectedStats (cyclomatic 16) ShapeEngine/Stats/StatSet.cs:691 — StatSet.Test_DirtyTracking_OnlyRecalculatesAffectedStats has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BitmapFont.DrawWithWrap (cyclomatic 16) · ×1
  • BitmapFont.DrawWithWrap (cyclomatic 16) ShapeEngine/Text/BitmapFont.cs:442 — BitmapFont.DrawWithWrap 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.
D1 · Cyclomatic Complexity · BinaryPackManager.Pack (cyclomatic 16) · ×1
  • BinaryPackManager.Pack (cyclomatic 16) REDACTED:20 — BinaryPackManager.Pack 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.
D1 · Cyclomatic Complexity · TextPackManager.Pack (cyclomatic 16) · ×1
  • TextPackManager.Pack (cyclomatic 16) REDACTED:19 — TextPackManager.Pack 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.
D17 · Explicit Debt · Whole file has no live code · ×1
  • Whole file has no live code — 45 debt markers inside it Examples/Scenes/ExampleScenes/ProjectedShapesExample.cs:31 — Every line in this file is a comment or blank — it declares no type, member, using or attribute, so nothing in it reaches the build. Its 45 debt markers (45 CommentedOutCode) all sit inside that dead text: one decision to leave the whole file switched off, not 45 independent debts. It records no note anywhere: the file is switched off with nothing in it saying why, so a reader cannot tell whether it is waiting on something or was simply abandoned — which is the harder of the two to bring back. Decide the FILE rather than its lines — restore it, or delete it and let version control hold the history. (Every occurrence still counts toward the score and metrics.)
D2 · Cognitive Complexity · TextFont.DrawTextWrapChar (cognitive 324) · ×1
  • TextFont.DrawTextWrapChar (cognitive 324) ShapeEngine/Text/TextFont.cs:476 — TextFont.DrawTextWrapChar has cognitive complexity 324 (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.
D2 · Cognitive Complexity · StripedShapeDrawingExample.OnDrawGameExample (cognitive 302) · ×1
  • StripedShapeDrawingExample.OnDrawGameExample (cognitive 302) Examples/Scenes/ExampleScenes/StripedShapeDrawingExample.cs:434 — StripedShapeDrawingExample.OnDrawGameExample has cognitive complexity 302 (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.
D2 · Cognitive Complexity · Polygon.GenerateStripedSegments (cognitive 186) · ×1
  • Polygon.GenerateStripedSegments (cognitive 186) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:149 — Polygon.GenerateStripedSegments has cognitive complexity 186 (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.
D2 · Cognitive Complexity · Program.ConstructUnpackCommand (cognitive 182) · ×1
  • Program.ConstructUnpackCommand (cognitive 182) ResourcePacker/Program.cs:426 — Program.ConstructUnpackCommand has cognitive complexity 182 (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.
D2 · Cognitive Complexity · Program.ConstructPackCommand (cognitive 148) · ×1
  • Program.ConstructPackCommand (cognitive 148) ResourcePacker/Program.cs:183 — Program.ConstructPackCommand has cognitive complexity 148 (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.
D2 · Cognitive Complexity · Program.Main (cognitive 131) · ×1
  • Program.Main (cognitive 131) ResourcePacker/Program.cs:20 — Program.Main has cognitive complexity 131 (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.
D2 · Cognitive Complexity · Game.RunGameloop (cognitive 112) · ×1
  • Game.RunGameloop (cognitive 112) ShapeEngine/Core/GameDef/GameGameloop.cs:62 — Game.RunGameloop has cognitive complexity 112 (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.
D2 · Cognitive Complexity · AdaptiveFpsLimiter.Update (cognitive 98) · ×1
  • AdaptiveFpsLimiter.Update (cognitive 98) ShapeEngine/Core/AdaptiveFpsLimiter.cs:401 — AdaptiveFpsLimiter.Update has cognitive complexity 98 (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.
D2 · Cognitive Complexity · TextFont.DrawTextWrapWord (cognitive 97) · ×1
  • TextFont.DrawTextWrapWord (cognitive 97) ShapeEngine/Text/TextFont.cs:782 — TextFont.DrawTextWrapWord has cognitive complexity 97 (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.
D2 · Cognitive Complexity · Autogun.FindNextTarget (cognitive 94) · ×1
  • Autogun.FindNextTarget (cognitive 94) Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Autogun.cs:179 — Autogun.FindNextTarget has cognitive complexity 94 (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.
D2 · Cognitive Complexity · Circle.GenerateStripedSegments (cognitive 92) · ×1
  • Circle.GenerateStripedSegments (cognitive 92) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:127 — Circle.GenerateStripedSegments has cognitive complexity 92 (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.
D2 · Cognitive Complexity · Quad.GenerateStripedSegments (cognitive 92) · ×1
  • Quad.GenerateStripedSegments (cognitive 92) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:131 — Quad.GenerateStripedSegments has cognitive complexity 92 (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.
D2 · Cognitive Complexity · Rect.GenerateStripedSegments (cognitive 92) · ×1
  • Rect.GenerateStripedSegments (cognitive 92) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:131 — Rect.GenerateStripedSegments has cognitive complexity 92 (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.
D2 · Cognitive Complexity · Triangle.GenerateStripedSegments (cognitive 92) · ×1
  • Triangle.GenerateStripedSegments (cognitive 92) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:131 — Triangle.GenerateStripedSegments has cognitive complexity 92 (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.
D2 · Cognitive Complexity · ControlNode.InternalUpdate (cognitive 92) · ×1
  • ControlNode.InternalUpdate (cognitive 92) ShapeEngine/UI/ControlNode.cs:926 — ControlNode.InternalUpdate has cognitive complexity 92 (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.
D2 · Cognitive Complexity · PolylineInflationExample.OnDrawGameExample (cognitive 91) · ×1
  • PolylineInflationExample.OnDrawGameExample (cognitive 91) Examples/Scenes/ExampleScenes/PolylineInflationExample.cs:119 — PolylineInflationExample.OnDrawGameExample has cognitive complexity 91 (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.
D2 · Cognitive Complexity · InputExtensions.GetButtonName (cognitive 83) · ×1
  • InputExtensions.GetButtonName (cognitive 83) ShapeEngine/Input/InputExtensions.cs:527 — InputExtensions.GetButtonName has cognitive complexity 83 (threshold 15). 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.
D2 · Cognitive Complexity · CollisionHandler.ProcessCollisionObjectThreadSafe (cognitive 79) · ×1
  • CollisionHandler.ProcessCollisionObjectThreadSafe (cognitive 79) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandler.cs:378 — CollisionHandler.ProcessCollisionObjectThreadSafe has cognitive complexity 79 (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. This shape REPEATS in the file: one other method here (CollisionHandler.ProcessCollisionObject) 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.
D2 · Cognitive Complexity · CollisionHandler.ProcessCollisionObject (cognitive 79) · ×1
  • CollisionHandler.ProcessCollisionObject (cognitive 79) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandler.cs:598 — CollisionHandler.ProcessCollisionObject has cognitive complexity 79 (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. This shape REPEATS in the file: one other method here (CollisionHandler.ProcessCollisionObjectThreadSafe) 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.
D2 · Cognitive Complexity · AsteroidMiningExample.OnHandleInputExample (cognitive 77) · ×1
  • AsteroidMiningExample.OnHandleInputExample (cognitive 77) Examples/Scenes/ExampleScenes/AsteroidMiningExample.cs:785 — AsteroidMiningExample.OnHandleInputExample has cognitive complexity 77 (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.
D2 · Cognitive Complexity · InputGesture.Update (cognitive 68) · ×1
  • InputGesture.Update (cognitive 68) ShapeEngine/Input/InputGesture.cs:222 — InputGesture.Update has cognitive complexity 68 (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.
D2 · Cognitive Complexity · GameloopExamples.Update (cognitive 67) · ×1
  • GameloopExamples.Update (cognitive 67) Examples/GameloopExamples.cs:724 — GameloopExamples.Update has cognitive complexity 67 (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.
D2 · Cognitive Complexity · EndlessSpaceCollision.OnUpdateExample (cognitive 62) · ×1
  • EndlessSpaceCollision.OnUpdateExample (cognitive 62) Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:715 — EndlessSpaceCollision.OnUpdateExample has cognitive complexity 62 (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.
D2 · Cognitive Complexity · InputSystem.Update (cognitive 58) · ×1
  • InputSystem.Update (cognitive 58) ShapeEngine/Input/InputSystem.cs:134 — InputSystem.Update has cognitive complexity 58 (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.
D2 · Cognitive Complexity · LaserBeam.Update (cognitive 57) · ×1
  • LaserBeam.Update (cognitive 57) Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/LaserBeam.cs:57 — LaserBeam.Update has cognitive complexity 57 (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.
D2 · Cognitive Complexity · Triangle.DrawLinesPercentageHelper (cognitive 56) · ×1
  • Triangle.DrawLinesPercentageHelper (cognitive 56) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1116 — Triangle.DrawLinesPercentageHelper has cognitive complexity 56 (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.
D2 · Cognitive Complexity · ControlNodeContainer.OnChildNavigated (cognitive 56) · ×1
  • ControlNodeContainer.OnChildNavigated (cognitive 56) ShapeEngine/UI/ControlNodeContainer.cs:308 — ControlNodeContainer.OnChildNavigated has cognitive complexity 56 (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.
D2 · Cognitive Complexity · TextPackManager.Unpack (cognitive 54) · ×1
  • TextPackManager.Unpack (cognitive 54) REDACTED:217 — TextPackManager.Unpack has cognitive complexity 54 (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.
D2 · Cognitive Complexity · InputExtensions.GetButtonName (cognitive 53) · ×1
  • InputExtensions.GetButtonName (cognitive 53) ShapeEngine/Input/InputExtensions.cs:756 — InputExtensions.GetButtonName has cognitive complexity 53 (threshold 15). 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.
D2 · Cognitive Complexity · ContentPack.UnpackTextToMemoryParallel (cognitive 52) · ×1
  • ContentPack.UnpackTextToMemoryParallel (cognitive 52) ShapeEngine/Content/ContentPack.cs:723 — ContentPack.UnpackTextToMemoryParallel has cognitive complexity 52 (threshold 15). Of this number, 50 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · SavegameExample.OnDrawUIExample (cognitive 52) · ×1
  • SavegameExample.OnDrawUIExample (cognitive 52) Examples/Scenes/ExampleScenes/SavegameExample.cs:307 — SavegameExample.OnDrawUIExample has cognitive complexity 52 (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.
D2 · Cognitive Complexity · ShapeIntersectionExample.OnDrawGameExample (cognitive 52) · ×1
  • ShapeIntersectionExample.OnDrawGameExample (cognitive 52) Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1575 — ShapeIntersectionExample.OnDrawGameExample has cognitive complexity 52 (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.
D2 · Cognitive Complexity · GamepadDevice.WasGamepadUsed (cognitive 51) · ×1
  • GamepadDevice.WasGamepadUsed (cognitive 51) ShapeEngine/Input/GamepadDevice.cs:455 — GamepadDevice.WasGamepadUsed has cognitive complexity 51 (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.
D2 · Cognitive Complexity · KeyboardDevice.WasKeyboardUsed (cognitive 51) · ×1
  • KeyboardDevice.WasKeyboardUsed (cognitive 51) ShapeEngine/Input/KeyboardDevice.cs:267 — KeyboardDevice.WasKeyboardUsed has cognitive complexity 51 (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.
D2 · Cognitive Complexity · MouseDevice.WasMouseUsed (cognitive 51) · ×1
  • MouseDevice.WasMouseUsed (cognitive 51) ShapeEngine/Input/MouseDevice.cs:300 — MouseDevice.WasMouseUsed has cognitive complexity 51 (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.
D2 · Cognitive Complexity · Polyline.DrawGappedOutline (cognitive 50) · ×1
  • Polyline.DrawGappedOutline (cognitive 50) ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:268 — Polyline.DrawGappedOutline has cognitive complexity 50 (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.
D2 · Cognitive Complexity · AStar.GetPath (cognitive 48) · ×1
  • AStar.GetPath (cognitive 48) ShapeEngine/Pathfinding/AStar.cs:38 — AStar.GetPath has cognitive complexity 48 (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. This shape REPEATS in the file: one other method here (AStar.GetPathAsync) 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.
D2 · Cognitive Complexity · AStar.GetPathAsync (cognitive 48) · ×1
  • AStar.GetPathAsync (cognitive 48) ShapeEngine/Pathfinding/AStar.cs:181 — AStar.GetPathAsync has cognitive complexity 48 (threshold 15). None of this is in the body itself: all 48 points belong to one function literal inside it that branches (line 183). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest. This shape REPEATS in the file: one other method here (AStar.GetPath) 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.
D2 · Cognitive Complexity · MouseDevice.GetValue (cognitive 47) · ×1
  • MouseDevice.GetValue (cognitive 47) ShapeEngine/Input/MouseDevice.cs:670 — MouseDevice.GetValue has cognitive complexity 47 (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.
D2 · Cognitive Complexity · TextExampleScene.OnHandleInputExample (cognitive 47) · ×1
  • TextExampleScene.OnHandleInputExample (cognitive 47) Examples/Scenes/TextExampleScene.cs:149 — TextExampleScene.OnHandleInputExample has cognitive complexity 47 (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.
D2 · Cognitive Complexity · TextPackManager.UnpackParallel (cognitive 46) · ×1
  • TextPackManager.UnpackParallel (cognitive 46) REDACTED:358 — TextPackManager.UnpackParallel has cognitive complexity 46 (threshold 15). Of this number, 28 points are the body's own statements and 18 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.
D2 · Cognitive Complexity · InputAction.UpdateAction (cognitive 41) · ×1
  • InputAction.UpdateAction (cognitive 41) ShapeEngine/Input/InputAction.cs:354 — InputAction.UpdateAction has cognitive complexity 41 (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.
D2 · Cognitive Complexity · ControlNodeNavigator.Update (cognitive 41) · ×1
  • ControlNodeNavigator.Update (cognitive 41) ShapeEngine/UI/ControlNodeNavigator.cs:214 — ControlNodeNavigator.Update has cognitive complexity 41 (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.
D2 · Cognitive Complexity · GameloopExamples.LoadContent (cognitive 41) · ×1
  • GameloopExamples.LoadContent (cognitive 41) Examples/GameloopExamples.cs:246 — GameloopExamples.LoadContent has cognitive complexity 41 (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.
D2 · Cognitive Complexity · FramerateSettings.FramerateSettings.ctor (cognitive 39) · ×1
  • FramerateSettings.FramerateSettings.ctor (cognitive 39) ShapeEngine/Core/Structs/FramerateSettings.cs:230 — FramerateSettings.FramerateSettings.ctor has cognitive complexity 39 (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.
D2 · Cognitive Complexity · Triangle.DrawCorners (cognitive 39) · ×1
  • Triangle.DrawCorners (cognitive 39) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:228 — Triangle.DrawCorners has cognitive complexity 39 (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. This shape REPEATS in the file: one other method here (Triangle.DrawCornersRelative) 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.
D2 · Cognitive Complexity · Triangle.DrawCornersRelative (cognitive 39) · ×1
  • Triangle.DrawCornersRelative (cognitive 39) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:475 — Triangle.DrawCornersRelative has cognitive complexity 39 (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. This shape REPEATS in the file: one other method here (Triangle.DrawCorners) 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.
D2 · Cognitive Complexity · Ship.Update (cognitive 39) · ×1
  • Ship.Update (cognitive 39) Examples/Scenes/ExampleScenes/PhysicsExampleSource/Ship.cs:86 — Ship.Update has cognitive complexity 39 (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.
D2 · Cognitive Complexity · Game.Game.ctor (cognitive 37) · ×1
  • Game.Game.ctor (cognitive 37) ShapeEngine/Core/GameDef/Game.cs:460 — Game.Game.ctor has cognitive complexity 37 (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.
D2 · Cognitive Complexity · CollisionHandler.IntersectSpace (cognitive 37) · ×1
  • CollisionHandler.IntersectSpace (cognitive 37) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:27 — CollisionHandler.IntersectSpace has cognitive complexity 37 (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.
D2 · Cognitive Complexity · Triangle.DrawLinesHelper (cognitive 37) · ×1
  • Triangle.DrawLinesHelper (cognitive 37) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:940 — Triangle.DrawLinesHelper has cognitive complexity 37 (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.
D2 · Cognitive Complexity · Quad.DrawLinesPercentage (cognitive 36) · ×1
  • Quad.DrawLinesPercentage (cognitive 36) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:249 — Quad.DrawLinesPercentage has cognitive complexity 36 (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.
D2 · Cognitive Complexity · CellCollisionSystem.ResolveColliderCollisions (cognitive 35) · ×1
  • CellCollisionSystem.ResolveColliderCollisions (cognitive 35) ShapeEngine/Geometry/CellCollision/CellCollisionSystem.cs:341 — CellCollisionSystem.ResolveColliderCollisions has cognitive complexity 35 (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.
D2 · Cognitive Complexity · Segment.DrawMasked (cognitive 35) · ×1
  • Segment.DrawMasked (cognitive 35) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:547 — Segment.DrawMasked has cognitive complexity 35 (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.
D2 · Cognitive Complexity · Quad.DrawChamferedCornersRelative (cognitive 34) · ×1
  • Quad.DrawChamferedCornersRelative (cognitive 34) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1384 — Quad.DrawChamferedCornersRelative has cognitive complexity 34 (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.
D2 · Cognitive Complexity · Quad.IntersectShape (cognitive 34) · ×1
  • Quad.IntersectShape (cognitive 34) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1004 — Quad.IntersectShape has cognitive complexity 34 (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.
D2 · Cognitive Complexity · Rect.IntersectShape (cognitive 34) · ×1
  • Rect.IntersectShape (cognitive 34) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:323 — Rect.IntersectShape has cognitive complexity 34 (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.
D2 · Cognitive Complexity · EndlessSpaceCollision.OnHandleInputExample (cognitive 34) · ×1
  • EndlessSpaceCollision.OnHandleInputExample (cognitive 34) Examples/Scenes/ExampleScenes/EndlessSpaceCollision.cs:599 — EndlessSpaceCollision.OnHandleInputExample has cognitive complexity 34 (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.
D2 · Cognitive Complexity · Circle.DrawStriped (cognitive 33) · ×1
  • Circle.DrawStriped (cognitive 33) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1111 — Circle.DrawStriped has cognitive complexity 33 (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.
D2 · Cognitive Complexity · IntersectionPoints.Filter (cognitive 33) · ×1
  • IntersectionPoints.Filter (cognitive 33) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:652 — IntersectionPoints.Filter has cognitive complexity 33 (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.
D2 · Cognitive Complexity · Quad.DrawStriped (cognitive 33) · ×1
  • Quad.DrawStriped (cognitive 33) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1128 — Quad.DrawStriped has cognitive complexity 33 (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.
D2 · Cognitive Complexity · Rect.DrawStriped (cognitive 33) · ×1
  • Rect.DrawStriped (cognitive 33) ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:1107 — Rect.DrawStriped has cognitive complexity 33 (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.
D2 · Cognitive Complexity · Triangle.DrawStriped (cognitive 33) · ×1
  • Triangle.DrawStriped (cognitive 33) ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:1113 — Triangle.DrawStriped has cognitive complexity 33 (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.
D2 · Cognitive Complexity · Autogun.Update (cognitive 33) · ×1
  • Autogun.Update (cognitive 33) Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Autogun.cs:60 — Autogun.Update has cognitive complexity 33 (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.
D2 · Cognitive Complexity · Points.TriangulatePointCloud (cognitive 32) · ×1
  • Points.TriangulatePointCloud (cognitive 32) ShapeEngine/Geometry/PointsDef/Points.cs:610 — Points.TriangulatePointCloud has cognitive complexity 32 (threshold 15). Of this number, 30 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Polygon.DrawStriped (cognitive 32) · ×1
  • Polygon.DrawStriped (cognitive 32) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1098 — Polygon.DrawStriped has cognitive complexity 32 (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.
D2 · Cognitive Complexity · Polygon.DrawGappedOutline (cognitive 31) · ×1
  • Polygon.DrawGappedOutline (cognitive 31) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:964 — Polygon.DrawGappedOutline has cognitive complexity 31 (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.
D2 · Cognitive Complexity · Quad.DrawGappedOutline (cognitive 31) · ×1
  • Quad.DrawGappedOutline (cognitive 31) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:2070 — Quad.DrawGappedOutline has cognitive complexity 31 (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.
D2 · Cognitive Complexity · Rect.DrawGappedOutline (cognitive 31) · ×1
  • Rect.DrawGappedOutline (cognitive 31) ShapeEngine/Geometry/RectDef/RectDrawing.cs:666 — Rect.DrawGappedOutline has cognitive complexity 31 (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.
D2 · Cognitive Complexity · Triangle.DrawGappedOutline (cognitive 31) · ×1
  • Triangle.DrawGappedOutline (cognitive 31) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:837 — Triangle.DrawGappedOutline has cognitive complexity 31 (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.
D2 · Cognitive Complexity · Quad.DrawChamferedCorners (cognitive 30) · ×1
  • Quad.DrawChamferedCorners (cognitive 30) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1158 — Quad.DrawChamferedCorners has cognitive complexity 30 (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.
D2 · Cognitive Complexity · BitmapFont.DrawWithWrap (cognitive 29) · ×1
  • BitmapFont.DrawWithWrap (cognitive 29) ShapeEngine/Text/BitmapFont.cs:442 — BitmapFont.DrawWithWrap has cognitive complexity 29 (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.
D2 · Cognitive Complexity · Polygon.DrawCornerAbsoluteTransparent (cognitive 28) · ×1
  • Polygon.DrawCornerAbsoluteTransparent (cognitive 28) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:398 — Polygon.DrawCornerAbsoluteTransparent has cognitive complexity 28 (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.
D2 · Cognitive Complexity · Quad.DrawCorners (cognitive 28) · ×1
  • Quad.DrawCorners (cognitive 28) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:807 — Quad.DrawCorners has cognitive complexity 28 (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.
D2 · Cognitive Complexity · OutlineDrawingExample.OnDrawGameExample (cognitive 28) · ×1
  • OutlineDrawingExample.OnDrawGameExample (cognitive 28) Examples/Scenes/ExampleScenes/OutlineDrawingExample.cs:305 — OutlineDrawingExample.OnDrawGameExample has cognitive complexity 28 (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.
D2 · Cognitive Complexity · BroadphaseDynamicSpatialHash.AddColliderToBucket (cognitive 27) · ×1
  • BroadphaseDynamicSpatialHash.AddColliderToBucket (cognitive 27) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:353 — BroadphaseDynamicSpatialHash.AddColliderToBucket has cognitive complexity 27 (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.
D2 · Cognitive Complexity · CollisionHandler.CastSpace (cognitive 27) · ×1
  • CollisionHandler.CastSpace (cognitive 27) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:459 — CollisionHandler.CastSpace has cognitive complexity 27 (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.
D2 · Cognitive Complexity · Quad.DrawCorners (cognitive 27) · ×1
  • Quad.DrawCorners (cognitive 27) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:589 — Quad.DrawCorners has cognitive complexity 27 (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.
D2 · Cognitive Complexity · SpaceShip.Update (cognitive 27) · ×1
  • SpaceShip.Update (cognitive 27) Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:107 — SpaceShip.Update has cognitive complexity 27 (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.
D2 · Cognitive Complexity · GameObjectHandlerExample.OnHandleInputExample (cognitive 27) · ×1
  • GameObjectHandlerExample.OnHandleInputExample (cognitive 27) Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:682 — GameObjectHandlerExample.OnHandleInputExample has cognitive complexity 27 (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.
D2 · Cognitive Complexity · Ship.Update (cognitive 27) · ×1
  • Ship.Update (cognitive 27) Examples/Scenes/ExampleScenes/PathfinderExample2.cs:134 — Ship.Update has cognitive complexity 27 (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.
D2 · Cognitive Complexity · GameWindow.CheckForWindowConfigFlagChanges (cognitive 26) · ×1
  • GameWindow.CheckForWindowConfigFlagChanges (cognitive 26) ShapeEngine/Core/GameWindow.cs:1292 — GameWindow.CheckForWindowConfigFlagChanges has cognitive complexity 26 (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.
D2 · Cognitive Complexity · GameWindow.CheckForCursorChanges (cognitive 26) · ×1
  • GameWindow.CheckForCursorChanges (cognitive 26) ShapeEngine/Core/GameWindow.cs:1395 — GameWindow.CheckForCursorChanges has cognitive complexity 26 (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.
D2 · Cognitive Complexity · CellCollisionSystem.RemoveCollider (cognitive 26) · ×1
  • CellCollisionSystem.RemoveCollider (cognitive 26) ShapeEngine/Geometry/CellCollision/CellCollisionSystem.cs:434 — CellCollisionSystem.RemoveCollider has cognitive complexity 26 (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.
D2 · Cognitive Complexity · Circle.DrawGappedOutline (cognitive 26) · ×1
  • Circle.DrawGappedOutline (cognitive 26) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1420 — Circle.DrawGappedOutline has cognitive complexity 26 (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.
D2 · Cognitive Complexity · BroadphaseDynamicSpatialHash.AddCollider (cognitive 26) · ×1
  • BroadphaseDynamicSpatialHash.AddCollider (cognitive 26) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:259 — BroadphaseDynamicSpatialHash.AddCollider has cognitive complexity 26 (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.
D2 · Cognitive Complexity · Segment.DrawSegmentSeparateCaps (cognitive 26) · ×1
  • Segment.DrawSegmentSeparateCaps (cognitive 26) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:197 — Segment.DrawSegmentSeparateCaps has cognitive complexity 26 (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.
D2 · Cognitive Complexity · BinaryPackManager.Unpack (cognitive 26) · ×1
  • BinaryPackManager.Unpack (cognitive 26) REDACTED:271 — BinaryPackManager.Unpack has cognitive complexity 26 (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.
D2 · Cognitive Complexity · Program.ProcessArguments (cognitive 26) · ×1
  • Program.ProcessArguments (cognitive 26) ResourcePacker/Program.cs:712 — Program.ProcessArguments has cognitive complexity 26 (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.
D2 · Cognitive Complexity · Triangle.IntersectShape (cognitive 25) · ×1
  • Triangle.IntersectShape (cognitive 25) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:905 — Triangle.IntersectShape has cognitive complexity 25 (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.
D2 · Cognitive Complexity · GameloopExamples.OnGameTextureResized (cognitive 25) · ×1
  • GameloopExamples.OnGameTextureResized (cognitive 25) Examples/GameloopExamples.cs:606 — GameloopExamples.OnGameTextureResized has cognitive complexity 25 (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.
D2 · Cognitive Complexity · PathfinderExample2.AddAsteroids (cognitive 25) · ×1
  • PathfinderExample2.AddAsteroids (cognitive 25) Examples/Scenes/ExampleScenes/PathfinderExample2.cs:714 — PathfinderExample2.AddAsteroids has cognitive complexity 25 (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.
D2 · Cognitive Complexity · Game.DrawToScreen (cognitive 24) · ×1
  • Game.DrawToScreen (cognitive 24) ShapeEngine/Core/GameDef/GameGameloop.cs:309 — Game.DrawToScreen has cognitive complexity 24 (threshold 15). Of this number, 16 points are the body's own statements and 8 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.
D2 · Cognitive Complexity · CollisionHandler.IntersectSpace (cognitive 24) · ×1
  • CollisionHandler.IntersectSpace (cognitive 24) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:92 — CollisionHandler.IntersectSpace has cognitive complexity 24 (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.
D2 · Cognitive Complexity · Quad.IntersectShape (cognitive 24) · ×1
  • Quad.IntersectShape (cognitive 24) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:244 — Quad.IntersectShape has cognitive complexity 24 (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.
D2 · Cognitive Complexity · Rect.IntersectShape (cognitive 24) · ×1
  • Rect.IntersectShape (cognitive 24) ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:299 — Rect.IntersectShape has cognitive complexity 24 (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.
D2 · Cognitive Complexity · Segment.DrawGappedSegment (cognitive 24) · ×1
  • Segment.DrawGappedSegment (cognitive 24) ShapeEngine/Geometry/SegmentDef/SegmentDrawing.cs:936 — Segment.DrawGappedSegment has cognitive complexity 24 (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.
D2 · Cognitive Complexity · BitmapFont.DrawWithWrap (cognitive 24) · ×1
  • BitmapFont.DrawWithWrap (cognitive 24) ShapeEngine/Text/BitmapFont.cs:531 — BitmapFont.DrawWithWrap has cognitive complexity 24 (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.
D2 · Cognitive Complexity · ControlNodeNavigator.GetNeighborDistance (cognitive 24) · ×1
  • ControlNodeNavigator.GetNeighborDistance (cognitive 24) ShapeEngine/UI/ControlNodeNavigator.cs:421 — ControlNodeNavigator.GetNeighborDistance has cognitive complexity 24 (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.
D2 · Cognitive Complexity · SpawnArea.Update (cognitive 23) · ×1
  • SpawnArea.Update (cognitive 23) ShapeEngine/Core/SpawnArea.cs:606 — SpawnArea.Update 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.
D2 · Cognitive Complexity · Polygon.GetIncircle (cognitive 23) · ×1
  • Polygon.GetIncircle (cognitive 23) ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:35 — Polygon.GetIncircle 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.
D2 · Cognitive Complexity · PathfinderExample2.OnUpdateExample (cognitive 23) · ×1
  • PathfinderExample2.OnUpdateExample (cognitive 23) Examples/Scenes/ExampleScenes/PathfinderExample2.cs:928 — PathfinderExample2.OnUpdateExample 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.
D2 · Cognitive Complexity · SavegameExample.OnUpdateExample (cognitive 23) · ×1
  • SavegameExample.OnUpdateExample (cognitive 23) Examples/Scenes/ExampleScenes/SavegameExample.cs:180 — SavegameExample.OnUpdateExample 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.
D2 · Cognitive Complexity · TextPackManager.PackParallel (cognitive 23) · ×1
  • TextPackManager.PackParallel (cognitive 23) REDACTED:110 — TextPackManager.PackParallel has cognitive complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 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.
D2 · Cognitive Complexity · Polygon.OverlapShape (cognitive 22) · ×1
  • Polygon.OverlapShape (cognitive 22) ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:224 — Polygon.OverlapShape 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.
D2 · Cognitive Complexity · Polygon.OverlapPolygonPolygon (cognitive 22) · ×1
  • Polygon.OverlapPolygonPolygon (cognitive 22) ShapeEngine/Geometry/PolygonDef/PolygonOverlapStatic.cs:122 — Polygon.OverlapPolygonPolygon 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.
D2 · Cognitive Complexity · ScreenTexture.DrawOnTexture (cognitive 22) · ×1
  • ScreenTexture.DrawOnTexture (cognitive 22) ShapeEngine/Screen/ScreenTexture.cs:411 — ScreenTexture.DrawOnTexture 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.
D2 · Cognitive Complexity · MainScene.HandleInput (cognitive 22) · ×1
  • MainScene.HandleInput (cognitive 22) Examples/Scenes/MainScene.cs:101 — MainScene.HandleInput 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.
D2 · Cognitive Complexity · ContentPack.UnpackTextToMemory (cognitive 21) · ×1
  • ContentPack.UnpackTextToMemory (cognitive 21) ShapeEngine/Content/ContentPack.cs:634 — ContentPack.UnpackTextToMemory has cognitive complexity 21 (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. This shape REPEATS in the file: one other method here (ContentPack.UnpackTextToMemoryAsync) 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.
D2 · Cognitive Complexity · ContentPack.UnpackTextToMemoryAsync (cognitive 21) · ×1
  • ContentPack.UnpackTextToMemoryAsync (cognitive 21) ShapeEngine/Content/ContentPack.cs:1138 — ContentPack.UnpackTextToMemoryAsync has cognitive complexity 21 (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. This shape REPEATS in the file: one other method here (ContentPack.UnpackTextToMemory) 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.
D2 · Cognitive Complexity · Game.UpdateGamepadMappings (cognitive 21) · ×1
  • Game.UpdateGamepadMappings (cognitive 21) ShapeEngine/Core/GameDef/Game.cs:664 — Game.UpdateGamepadMappings has cognitive complexity 21 (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.
D2 · Cognitive Complexity · CollisionHandler.CastSpace (cognitive 21) · ×1
  • CollisionHandler.CastSpace (cognitive 21) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:135 — CollisionHandler.CastSpace has cognitive complexity 21 (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.
D2 · Cognitive Complexity · ModifierKeySet.AppendModifierKeyNames (cognitive 21) · ×1
  • ModifierKeySet.AppendModifierKeyNames (cognitive 21) ShapeEngine/Input/ModifierKeySet.cs:158 — ModifierKeySet.AppendModifierKeyNames has cognitive complexity 21 (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.
D2 · Cognitive Complexity · ControlNodeContainer.UpdateLayoutConstants (cognitive 21) · ×1
  • ControlNodeContainer.UpdateLayoutConstants (cognitive 21) ShapeEngine/UI/ControlNodeContainer.cs:168 — ControlNodeContainer.UpdateLayoutConstants has cognitive complexity 21 (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.
D2 · Cognitive Complexity · Ship.Update (cognitive 21) · ×1
  • Ship.Update (cognitive 21) Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Ship.cs:211 — Ship.Update has cognitive complexity 21 (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.
D2 · Cognitive Complexity · ShapeIntersectionExample.OnHandleInputExample (cognitive 21) · ×1
  • ShapeIntersectionExample.OnHandleInputExample (cognitive 21) Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1476 — ShapeIntersectionExample.OnHandleInputExample has cognitive complexity 21 (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.
D2 · Cognitive Complexity · ShapeIntersectionExample.TestForCrash (cognitive 21) · ×1
  • ShapeIntersectionExample.TestForCrash (cognitive 21) Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:2016 — ShapeIntersectionExample.TestForCrash has cognitive complexity 21 (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.
D2 · Cognitive Complexity · BinaryPackManager.Pack (cognitive 21) · ×1
  • BinaryPackManager.Pack (cognitive 21) REDACTED:20 — BinaryPackManager.Pack has cognitive complexity 21 (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.
D2 · Cognitive Complexity · TextPackManager.Pack (cognitive 21) · ×1
  • TextPackManager.Pack (cognitive 21) REDACTED:19 — TextPackManager.Pack has cognitive complexity 21 (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.
D2 · Cognitive Complexity · Polygon.DrawStriped (cognitive 20) · ×1
  • Polygon.DrawStriped (cognitive 20) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:638 — Polygon.DrawStriped 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.
D2 · Cognitive Complexity · SimpleStat.ApplyModifierBounds (cognitive 20) · ×1
  • SimpleStat.ApplyModifierBounds (cognitive 20) ShapeEngine/Stats/SimpleStat.cs:917 — SimpleStat.ApplyModifierBounds 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.
D2 · Cognitive Complexity · Stat.Recalculate (cognitive 20) · ×1
  • Stat.Recalculate (cognitive 20) ShapeEngine/Stats/Stat.cs:118 — Stat.Recalculate 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.
D2 · Cognitive Complexity · PayloadDeliverySystem.Update (cognitive 20) · ×1
  • PayloadDeliverySystem.Update (cognitive 20) Examples/PayloadSystem/PayloadDeliverySystem.cs:59 — PayloadDeliverySystem.Update 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.
D2 · Cognitive Complexity · SFXLoop.Update (cognitive 19) · ×1
  • SFXLoop.Update (cognitive 19) ShapeEngine/Audio/SFXLoop.cs:100 — SFXLoop.Update has cognitive complexity 19 (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.
D2 · Cognitive Complexity · ContentManager.TryLoadFont (cognitive 19) · ×1
  • ContentManager.TryLoadFont (cognitive 19) ShapeEngine/Content/ContentManager.cs:436 — ContentManager.TryLoadFont has cognitive complexity 19 (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.
D2 · Cognitive Complexity · BroadphaseDynamicSpatialHash.GetCandidateBuckets (cognitive 19) · ×1
  • BroadphaseDynamicSpatialHash.GetCandidateBuckets (cognitive 19) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:548 — BroadphaseDynamicSpatialHash.GetCandidateBuckets has cognitive complexity 19 (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.
D2 · Cognitive Complexity · CollisionInformation.Validate (cognitive 19) · ×1
  • CollisionInformation.Validate (cognitive 19) ShapeEngine/Geometry/CollisionSystem/CollisionInformation.cs:157 — CollisionInformation.Validate has cognitive complexity 19 (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.
D2 · Cognitive Complexity · Polygon.CaluclateDrawCornerAbsoluteParameters (cognitive 19) · ×1
  • Polygon.CaluclateDrawCornerAbsoluteParameters (cognitive 19) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:654 — Polygon.CaluclateDrawCornerAbsoluteParameters has cognitive complexity 19 (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.
D2 · Cognitive Complexity · PathfinderExample.OnHandleInputExample (cognitive 19) · ×1
  • PathfinderExample.OnHandleInputExample (cognitive 19) Examples/Scenes/ExampleScenes/PathfinderExample.cs:146 — PathfinderExample.OnHandleInputExample has cognitive complexity 19 (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.
D2 · Cognitive Complexity · ContentPack.ReadLastLineLargeFile (cognitive 18) · ×1
  • ContentPack.ReadLastLineLargeFile (cognitive 18) ShapeEngine/Content/ContentPack.cs:2299 — ContentPack.ReadLastLineLargeFile 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.
D2 · Cognitive Complexity · Circle.IntersectShape (cognitive 18) · ×1
  • Circle.IntersectShape (cognitive 18) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:178 — Circle.IntersectShape 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.
D2 · Cognitive Complexity · Polygon.DrawStriped (cognitive 18) · ×1
  • Polygon.DrawStriped (cognitive 18) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:693 — Polygon.DrawStriped 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.
D2 · Cognitive Complexity · Quad.OverlapQuadQuad (cognitive 18) · ×1
  • Quad.OverlapQuadQuad (cognitive 18) ShapeEngine/Geometry/QuadDef/QuadOverlapStatic.cs:101 — Quad.OverlapQuadQuad has cognitive complexity 18 (threshold 15). 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.
D2 · Cognitive Complexity · Triangle.IntersectShape (cognitive 18) · ×1
  • Triangle.IntersectShape (cognitive 18) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:244 — Triangle.IntersectShape 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.
D2 · Cognitive Complexity · CameraFollowerSingle.Update (cognitive 18) · ×1
  • CameraFollowerSingle.Update (cognitive 18) ShapeEngine/Screen/CameraFollowerSingle.cs:67 — CameraFollowerSingle.Update 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.
D2 · Cognitive Complexity · TextFont.DrawTextWrapNone (cognitive 18) · ×1
  • TextFont.DrawTextWrapNone (cognitive 18) ShapeEngine/Text/TextFont.cs:382 — TextFont.DrawTextWrapNone 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.
D2 · Cognitive Complexity · ExampleScene.OnDrawUI (cognitive 18) · ×1
  • ExampleScene.OnDrawUI (cognitive 18) Examples/Scenes/ExampleScene.cs:118 — ExampleScene.OnDrawUI 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.
D2 · Cognitive Complexity · Chaser.Update (cognitive 18) · ×1
  • Chaser.Update (cognitive 18) Examples/Scenes/ExampleScenes/PathfinderExample2.cs:338 — Chaser.Update 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.
D2 · Cognitive Complexity · Asteroid.Update (cognitive 18) · ×1
  • Asteroid.Update (cognitive 18) Examples/Scenes/ExampleScenes/PhysicsExampleSource/Asteroid.cs:194 — Asteroid.Update 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.
D2 · Cognitive Complexity · TextPackManager.ReadLastLineLargeFile (cognitive 18) · ×1
  • TextPackManager.ReadLastLineLargeFile (cognitive 18) REDACTED:551 — TextPackManager.ReadLastLineLargeFile 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.
D2 · Cognitive Complexity · ContentPack.UnpackFileToMemory (cognitive 17) · ×1
  • ContentPack.UnpackFileToMemory (cognitive 17) ShapeEngine/Content/ContentPack.cs:429 — ContentPack.UnpackFileToMemory has cognitive complexity 17 (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.
D2 · Cognitive Complexity · Circle.DrawStripedRing (cognitive 17) · ×1
  • Circle.DrawStripedRing (cognitive 17) ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:274 — Circle.DrawStripedRing has cognitive complexity 17 (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.
D2 · Cognitive Complexity · BroadphaseSpatialHash.Add (cognitive 17) · ×1
  • BroadphaseSpatialHash.Add (cognitive 17) ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:851 — BroadphaseSpatialHash.Add has cognitive complexity 17 (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.
D2 · Cognitive Complexity · Line.IntersectLineQuad (cognitive 17) · ×1
  • Line.IntersectLineQuad (cognitive 17) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:581 — Line.IntersectLineQuad has cognitive complexity 17 (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.
D2 · Cognitive Complexity · Polygon.GenerateStripedSegments (cognitive 17) · ×1
  • Polygon.GenerateStripedSegments (cognitive 17) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:83 — Polygon.GenerateStripedSegments has cognitive complexity 17 (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. This shape REPEATS in the file: one other method here (Polygon.DrawStriped) 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.
D2 · Cognitive Complexity · Polygon.DrawStriped (cognitive 17) · ×1
  • Polygon.DrawStriped (cognitive 17) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:585 — Polygon.DrawStriped has cognitive complexity 17 (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. This shape REPEATS in the file: one other method here (Polygon.GenerateStripedSegments) 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.
D2 · Cognitive Complexity · Polygon.IntersectShape (cognitive 17) · ×1
  • Polygon.IntersectShape (cognitive 17) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:196 — Polygon.IntersectShape has cognitive complexity 17 (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.
D2 · Cognitive Complexity · Polygon.CalculatePolygonMaxLineThickness (cognitive 17) · ×1
  • Polygon.CalculatePolygonMaxLineThickness (cognitive 17) ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:362 — Polygon.CalculatePolygonMaxLineThickness has cognitive complexity 17 (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.
D2 · Cognitive Complexity · Polyline.IntersectShape (cognitive 17) · ×1
  • Polyline.IntersectShape (cognitive 17) ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:215 — Polyline.IntersectShape has cognitive complexity 17 (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.
D2 · Cognitive Complexity · Ray.IntersectRayQuad (cognitive 17) · ×1
  • Ray.IntersectRayQuad (cognitive 17) ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:449 — Ray.IntersectRayQuad has cognitive complexity 17 (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.
D2 · Cognitive Complexity · Segment.IntersectSegmentQuad (cognitive 17) · ×1
  • Segment.IntersectSegmentQuad (cognitive 17) ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:521 — Segment.IntersectSegmentQuad has cognitive complexity 17 (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.
D2 · Cognitive Complexity · Triangulation.Subdivide (cognitive 17) · ×1
  • Triangulation.Subdivide (cognitive 17) ShapeEngine/Geometry/TriangulationDef/Triangulation.cs:390 — Triangulation.Subdivide has cognitive complexity 17 (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.
D2 · Cognitive Complexity · Triangulation.GetClosestTriangle (cognitive 17) · ×1
  • Triangulation.GetClosestTriangle (cognitive 17) ShapeEngine/Geometry/TriangulationDef/TriangulationClosestPoint.cs:58 — Triangulation.GetClosestTriangle has cognitive complexity 17 (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.
D2 · Cognitive Complexity · DataObjectDict.PickRandomEntries (cognitive 17) · ×1
  • DataObjectDict.PickRandomEntries (cognitive 17) ShapeEngine/Serialization/DataObjectDict.cs:265 — DataObjectDict.PickRandomEntries has cognitive complexity 17 (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.
D2 · Cognitive Complexity · DataObjectList.PickRandomEntries (cognitive 17) · ×1
  • DataObjectList.PickRandomEntries (cognitive 17) ShapeEngine/Serialization/DataObjectList.cs:267 — DataObjectList.PickRandomEntries has cognitive complexity 17 (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.
D2 · Cognitive Complexity · SimpleStat.AdjustModifierStacks (cognitive 17) · ×1
  • SimpleStat.AdjustModifierStacks (cognitive 17) ShapeEngine/Stats/SimpleStat.cs:793 — SimpleStat.AdjustModifierStacks has cognitive complexity 17 (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.
D2 · Cognitive Complexity · Pds.DrawUI (cognitive 17) · ×1
  • Pds.DrawUI (cognitive 17) Examples/Scenes/ExampleScenes/EndlessSpaceExampleSource/Pds.cs:58 — Pds.DrawUI has cognitive complexity 17 (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.
D2 · Cognitive Complexity · Rock.Collision (cognitive 17) · ×1
  • Rock.Collision (cognitive 17) Examples/Scenes/ExampleScenes/GameObjectHandlerExample.cs:413 — Rock.Collision has cognitive complexity 17 (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.
D2 · Cognitive Complexity · BinaryPackManager.PackParallel (cognitive 17) · ×1
  • BinaryPackManager.PackParallel (cognitive 17) REDACTED:147 — BinaryPackManager.PackParallel has cognitive complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal 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.
D2 · Cognitive Complexity · BinaryPackManager.UnpackParallel (cognitive 17) · ×1
  • BinaryPackManager.UnpackParallel (cognitive 17) REDACTED:377 — BinaryPackManager.UnpackParallel has cognitive complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to one function literal 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.
D2 · Cognitive Complexity · Circle.IntersectShape (cognitive 16) · ×1
  • Circle.IntersectShape (cognitive 16) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:622 — Circle.IntersectShape 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.
D2 · Cognitive Complexity · IntersectionPoints.Filter (cognitive 16) · ×1
  • IntersectionPoints.Filter (cognitive 16) ShapeEngine/Geometry/CollisionSystem/IntersectionPoints.cs:738 — IntersectionPoints.Filter 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.
D2 · Cognitive Complexity · Quad.DrawVignette (cognitive 16) · ×1
  • Quad.DrawVignette (cognitive 16) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:461 — Quad.DrawVignette has cognitive complexity 16 (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.
D2 · Cognitive Complexity · Triangle.IntersectShape (cognitive 16) · ×1
  • Triangle.IntersectShape (cognitive 16) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:845 — Triangle.IntersectShape 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.
D2 · Cognitive Complexity · Node.GetClosestTraversableCell (cognitive 16) · ×1
  • Node.GetClosestTraversableCell (cognitive 16) ShapeEngine/Pathfinding/Node.cs:233 — Node.GetClosestTraversableCell 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.
D2 · Cognitive Complexity · ShapeClipper2D.ToPolylinePerimeter (cognitive 16) · ×1
  • ShapeClipper2D.ToPolylinePerimeter (cognitive 16) ShapeEngine/ShapeClipper/ShapeClipper2D.cs:162 — ShapeClipper2D.ToPolylinePerimeter 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.
D2 · Cognitive Complexity · BitmapFont.Draw (cognitive 16) · ×1
  • BitmapFont.Draw (cognitive 16) ShapeEngine/Text/BitmapFont.cs:207 — BitmapFont.Draw 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. This shape REPEATS in the file: one other method here (BitmapFont.DrawUniform) 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.
D2 · Cognitive Complexity · BitmapFont.DrawUniform (cognitive 16) · ×1
  • BitmapFont.DrawUniform (cognitive 16) ShapeEngine/Text/BitmapFont.cs:311 — BitmapFont.DrawUniform 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. This shape REPEATS in the file: one other method here (BitmapFont.Draw) 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.
D2 · Cognitive Complexity · BitmapFontAtlas.DrawWithLineWrapNoWordSplit (cognitive 16) · ×1
  • BitmapFontAtlas.DrawWithLineWrapNoWordSplit (cognitive 16) ShapeEngine/Text/BitmapFontAtlas.cs:392 — BitmapFontAtlas.DrawWithLineWrapNoWordSplit 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.
D2 · Cognitive Complexity · DelaunayExample.OnHandleInputExample (cognitive 16) · ×1
  • DelaunayExample.OnHandleInputExample (cognitive 16) Examples/Scenes/ExampleScenes/DelaunayExample.cs:78 — DelaunayExample.OnHandleInputExample 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.
D2 · Cognitive Complexity · ShapeIntersectionExample.NextAutomatedTest (cognitive 16) · ×1
  • ShapeIntersectionExample.NextAutomatedTest (cognitive 16) Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:1850 — ShapeIntersectionExample.NextAutomatedTest 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change coupling clique · ×1
  • Change coupling clique: InputTypeGamepadButton.cs, InputTypeGamepadButtonAxis.cs, InputTypeKeyboardButton.cs, InputTypeKeyboardButtonAxis.cs, InputTypeMouseAxis.cs, InputTypeMouseButton.cs, InputTypeMouseButtonAxis.cs, InputTypeMouseWheelAxis.cs ShapeEngine/Input/InputTypeGamepadButton.cs — 8 files — `ShapeEngine/Input/InputTypeGamepadButton.cs`, `ShapeEngine/Input/InputTypeGamepadButtonAxis.cs`, `ShapeEngine/Input/InputTypeKeyboardButton.cs`, `ShapeEngine/Input/InputTypeKeyboardButtonAxis.cs`, `ShapeEngine/Input/InputTypeMouseAxis.cs`, `ShapeEngine/Input/InputTypeMouseButton.cs`, `ShapeEngine/Input/InputTypeMouseButtonAxis.cs`, `ShapeEngine/Input/InputTypeMouseWheelAxis.cs` — all change together with no explicit dependency: a fully-connected co-change clique, not 28 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (17 members, 13 shared lines) · ×1
  • Near-duplicate member family (17 members, 13 shared lines) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:600 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:600-727 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:740-852 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:864-976 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:988-1100 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:615-743 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:755-867 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:879-992 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1004-1117 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:611-724 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:736-848 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:860-972 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:984-1096 | ShapeEngine/Geometry/SegmentsDef/Segments.cs:385-459 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:614-728 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:740-852 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:864-977 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:989-1102 — These 17 members are variants of one another: a block of 13 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 17 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 17 times.
D4 · Code Duplication · Near-duplicate member family (16 members, 35 shared lines) · ×1
  • Near-duplicate member family (16 members, 35 shared lines) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:600 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:600-727 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:740-852 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:864-976 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:988-1100 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:615-743 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:755-867 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:879-992 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1004-1117 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:611-724 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:736-848 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:860-972 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:984-1096 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:614-728 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:740-852 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:864-977 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:989-1102 — These 16 members are variants of one another: a block of 35 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 16 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 16 times.
D4 · Code Duplication · Near-duplicate member family (10 members, 29 shared lines) · ×1
  • Near-duplicate member family (10 members, 29 shared lines) ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:44 — ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:44-79 | ShapeEngine/Geometry/LineDef/LineOverlap.cs:136-171 | ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:141-176 | ShapeEngine/Geometry/PolylineDef/PolylineOverlap.cs:154-189 | ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:124-159 | ShapeEngine/Geometry/RayDef/RayOverlap.cs:127-162 | ShapeEngine/Geometry/RectDef/RectOverlap.cs:146-181 | ShapeEngine/Geometry/SegmentDef/SegmentOverlap.cs:121-156 | ShapeEngine/Geometry/SegmentsDef/SegmentsOverlap.cs:114-149 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:183-218 — These 10 members are variants of one another: a block of 29 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 10 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 10 times.
D4 · Code Duplication · Near-duplicate member family (9 members, 33 shared lines) · ×1
  • Near-duplicate member family (9 members, 33 shared lines) ShapeEngine/Geometry/CollisionSystem/Collider.cs:934 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:934-969 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:976-1011 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1018-1053 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1060-1095 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1102-1137 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1144-1179 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1186-1221 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1228-1263 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1270-1305 — These 9 members are variants of one another: a block of 33 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 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication · Near-duplicate member family (9 members, 28 shared lines) · ×1
  • Near-duplicate member family (9 members, 28 shared lines) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:416 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:416-451 | ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:372-407 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:48-83 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:31-66 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:748-783 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:312-347 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:27-62 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:395-430 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:675-710 — These 9 members are variants of one another: a block of 28 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 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication · Near-duplicate member family (9 members, 16 shared lines) · ×1
  • Near-duplicate member family (9 members, 16 shared lines) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:151 — ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:151-195 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:208-252 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:265-309 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:322-366 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:379-423 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:436-480 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:493-537 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:550-594 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:607-651 — These 9 members are variants of one another: a block of 16 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 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication · Near-duplicate member family (6 members, 57 shared lines) · ×1
  • Near-duplicate member family (6 members, 57 shared lines) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:128 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:128-315 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1113-1192 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:132-318 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1129-1209 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:132-319 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:1108-1187 — These 6 members are variants of one another: a block of 57 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 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 · Near-duplicate member family (6 members, 8 shared lines) · ×1
  • Near-duplicate member family (6 members, 8 shared lines) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:741 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:741-754 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:768-781 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:795-808 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:822-835 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:849-862 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:877-890 — These 6 members are variants of one another: a block of 8 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 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 · Near-duplicate member family (5 members, 54 shared lines) · ×1
  • Near-duplicate member family (5 members, 54 shared lines) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:965 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:965-1057 | ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:269-388 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:2071-2168 | ShapeEngine/Geometry/RectDef/RectDrawing.cs:667-762 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:838-934 — These 5 members are variants of one another: a block of 54 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 35 shared lines) · ×1
  • Near-duplicate member family (5 members, 35 shared lines) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:783 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:783-849 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:862-928 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:941-1007 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1020-1086 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1099-1170 — These 5 members are variants of one another: a block of 35 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 34 shared lines) · ×1
  • Near-duplicate member family (5 members, 34 shared lines) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:150 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:150-429 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:783-849 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:862-928 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:941-1007 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1020-1086 — These 5 members are variants of one another: a block of 34 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 114 shared lines) · ×1
  • Near-duplicate member family (4 members, 114 shared lines) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:128 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:128-315 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:132-318 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:132-319 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:132-318 — These 4 members are variants of one another: a block of 114 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 36 shared lines) · ×1
  • Near-duplicate member family (4 members, 36 shared lines) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1005 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1005-1104 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1113-1245 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:906-981 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:994-1094 — These 4 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 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 32 shared lines) · ×1
  • Near-duplicate member family (4 members, 32 shared lines) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:287 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:287-375 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:511-628 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:284-351 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:466-555 — These 4 members are variants of one another: a block of 32 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member pair (154 shared lines) · ×1
  • Near-duplicate member pair (154 shared lines) ResourcePacker/Program.cs:184 — ResourcePacker/Program.cs:184-425 | ResourcePacker/Program.cs:427-681 — These two members are variants of one another: 154 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 · Near-duplicate member pair (104 shared lines) · ×1
  • Near-duplicate member pair (104 shared lines) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1159 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1159-1324 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1385-1554 — These two members are variants of one another: 104 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 · Near-duplicate member pair (83 shared lines) · ×1
  • Near-duplicate member pair (83 shared lines) ShapeEngine/Input/KeyboardDevice.cs:268 — ShapeEngine/Input/KeyboardDevice.cs:268-378 | ShapeEngine/Input/MouseDevice.cs:301-406 — These two members are variants of one another: 83 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 · Near-duplicate member pair (77 shared lines) · ×1
  • Near-duplicate member pair (77 shared lines) ShapeEngine/Text/TextFont.cs:477 — ShapeEngine/Text/TextFont.cs:477-751 | ShapeEngine/Text/TextFont.cs:783-931 — These two members are variants of one another: 77 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 · Near-duplicate member pair (65 shared lines) · ×1
  • Near-duplicate member pair (65 shared lines) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:941 — ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:941-1114 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1117-1394 — 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 · Near-duplicate member pair (51 shared lines) · ×1
  • Near-duplicate member pair (51 shared lines) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:324 — ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:324-430 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:443-579 — These two members are variants of one another: 51 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 · Near-duplicate member pair (39 shared lines) · ×1
  • Near-duplicate member pair (39 shared lines) REDACTED:218 — REDACTED:218-345 | REDACTED:359-484 — These two members are variants of one another: 39 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:302 — ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:302-342 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:353-393 — 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 (199 corresponding lines) · ×1
  • Edited copy of a member (199 corresponding lines) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:590 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:590-799 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:808-1006 — These two members are one piece of code written twice and then edited apart: 199 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (217 corresponding lines) · ×1
  • Edited copy of a member (217 corresponding lines) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:229 — ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:229-461 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:476-692 — These two members are one piece of code written twice and then edited apart: 217 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (112 corresponding lines) · ×1
  • Edited copy of a member (112 corresponding lines) REDACTED:21 — REDACTED:21-135 | REDACTED:148-259 — These two members are one piece of code written twice and then edited apart: 112 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (138 corresponding lines) · ×1
  • Edited copy of a member (138 corresponding lines) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1255 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1255-1392 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:592-737 — These two members are one piece of code written twice and then edited apart: 138 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (123 corresponding lines) · ×1
  • Edited copy of a member (123 corresponding lines) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:382 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:382-504 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:462-592 — These two members are one piece of code written twice and then edited apart: 123 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (74 corresponding lines) · ×1
  • Edited copy of a member (74 corresponding lines) ShapeEngine/Text/BitmapFont.cs:443 — ShapeEngine/Text/BitmapFont.cs:443-518 | ShapeEngine/Text/BitmapFont.cs:532-605 — These two members are one piece of code written twice and then edited apart: 74 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (96 corresponding lines) · ×1
  • Edited copy of a member (96 corresponding lines) ShapeEngine/Pathfinding/AStar.cs:39 — ShapeEngine/Pathfinding/AStar.cs:39-137 | ShapeEngine/Pathfinding/AStar.cs:182-277 — These two members are one piece of code written twice and then edited apart: 96 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (79 corresponding lines) · ×1
  • Edited copy of a member (79 corresponding lines) REDACTED:20 — REDACTED:20-98 | REDACTED:111-204 — These two members are one piece of code written twice and then edited apart: 79 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (87 corresponding lines) · ×1
  • Edited copy of a member (87 corresponding lines) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandler.cs:388 — ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandler.cs:388-478 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandler.cs:599-685 — These two members are one piece of code written twice and then edited apart: 87 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (71 corresponding lines) · ×1
  • Edited copy of a member (71 corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:731 — ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:731-801 | ShapeEngine/Geometry/PolygonDef/PolygonMath.cs:833-909 — These two members are one piece of code written twice and then edited apart: 71 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (68 corresponding lines) · ×1
  • Edited copy of a member (68 corresponding lines) ShapeEngine/Content/ContentPack.cs:635 — ShapeEngine/Content/ContentPack.cs:635-704 | ShapeEngine/Content/ContentPack.cs:1140-1207 — These two members are one piece of code written twice and then edited apart: 68 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (94 corresponding lines) · ×1
  • Edited copy of a member (94 corresponding lines) ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:362 — ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:362-455 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1107-1211 — These two members are one piece of code written twice and then edited apart: 94 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (70 corresponding lines) · ×1
  • Edited copy of a member (70 corresponding lines) ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:138 — ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:138-213 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPointStatic.cs:52-121 — These two members are one piece of code written twice and then edited apart: 70 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (50 corresponding lines) · ×1
  • Edited copy of a member (50 corresponding lines) ShapeEngine/Text/BitmapFont.cs:312 — ShapeEngine/Text/BitmapFont.cs:312-363 | ShapeEngine/Text/BitmapFont.cs:377-426 — 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 copy of a member (58 corresponding lines) · ×1
  • Edited copy of a member (58 corresponding lines) ShapeEngine/Geometry/SegmentDef/SegmentClosestPointStatic.cs:143 — ShapeEngine/Geometry/SegmentDef/SegmentClosestPointStatic.cs:143-200 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPointStatic.cs:223-293 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 64+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 64+ corresponding lines) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:682 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:682-745 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:757-824 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:243-311 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 64 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) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:934 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:934-996 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:846-893 — 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 copies of one member (3 members, 43+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 43+ corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:235 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:235-277 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:287-333 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:320-364 — 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 (8 members, 44+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 44+ corresponding lines) ShapeEngine/Content/ContentManager.cs:217 — ShapeEngine/Content/ContentManager.cs:217-264 | ShapeEngine/Content/ContentManager.cs:274-318 | ShapeEngine/Content/ContentManager.cs:328-371 | ShapeEngine/Content/ContentManager.cs:381-425 | ShapeEngine/Content/ContentManager.cs:500-544 | ShapeEngine/Content/ContentManager.cs:554-598 | ShapeEngine/Content/ContentManager.cs:608-652 | ShapeEngine/Content/ContentManager.cs:662-707 — These 8 members are one piece of code written 8 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 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 38+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 38+ corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:539 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:539-577 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:584-622 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:624-662 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:676-714 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:577-614 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:624-661 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 34+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 34+ corresponding lines) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:497 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:497-531 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:495-528 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:495-529 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 34 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 55+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 55+ corresponding lines) ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:979 — ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:979-1033 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1069-1140 | ShapeEngine/Geometry/CircleDef/CircleDrawing.cs:1342-1400 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 55 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 32+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 32+ corresponding lines) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:455 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:455-487 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:454-485 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:453-485 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 32 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 39+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 39+ corresponding lines) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:793 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:793-831 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:840-878 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:75-118 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:131-174 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 39 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 (59 corresponding lines) · ×1
  • Edited copy of a member (59 corresponding lines) ShapeEngine/Geometry/TriangleDef/Triangle.cs:706 — ShapeEngine/Geometry/TriangleDef/Triangle.cs:706-764 | ShapeEngine/Geometry/TriangleDef/Triangle.cs:782-840 — 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 copies of one member (3 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 21+ corresponding lines) ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:45 — ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:45-66 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:207-228 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:288-308 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×1
  • Edited copy of a member (32 corresponding lines) ShapeEngine/Geometry/RectDef/Rect.cs:1302 — ShapeEngine/Geometry/RectDef/Rect.cs:1302-1336 | ShapeEngine/Geometry/TriangleDef/Triangle.cs:1322-1353 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 18+ corresponding lines) ShapeEngine/Geometry/CollisionSystem/Collider.cs:1334 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:1334-1351 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1358-1375 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1789-1806 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:1819-1836 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 28+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 28+ corresponding lines) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:84 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:84-111 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:118-145 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:73-106 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:113-146 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 28 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, 29+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 29+ corresponding lines) ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:149 — ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:149-180 | ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:191-222 | ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:233-264 | ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:275-303 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 25+ corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:57 — ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:57-81 | ShapeEngine/Geometry/PolygonDef/PolygonClosestPoint.cs:91-118 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:69-93 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:110-137 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:308-337 | ShapeEngine/Geometry/PolylineDef/PolylineClosestPoint.cs:351-381 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×1
  • Edited copy of a member (34 corresponding lines) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1067 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1067-1100 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:1052-1085 — 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 copies of one member (4 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 20+ corresponding lines) ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:21 — ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:21-43 | ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:118-137 | ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:148-169 | ShapeEngine/Geometry/CircleDef/RingDrawingStriped.cs:179-203 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) REDACTED:64 — REDACTED:64-89 | REDACTED:99-124 — 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 copies of one member (4 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 15+ corresponding lines) ShapeEngine/Geometry/CollisionSystem/Collider.cs:885 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:885-902 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:909-926 | ShapeEngine/Geometry/PolygonDef/PolygonContains.cs:41-61 | ShapeEngine/Geometry/QuadDef/QuadContains.cs:74-88 — 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 (7 members, 22+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 22+ corresponding lines) ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:314 — ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:314-343 | ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:354-383 | ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:394-423 | ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:434-463 | ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:474-503 | ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:514-543 | ShapeEngine/Geometry/TriangulationDef/TriangulationClosestPoint.cs:27-48 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 19+ corresponding lines) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:156 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:156-174 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:182-200 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:706-729 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:748-771 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 18+ corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:327 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:327-344 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:351-368 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:342-360 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:369-387 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:360-377 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:381-399 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:416-434 — These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (46 corresponding lines) · ×1
  • Edited copy of a member (46 corresponding lines) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:28 — ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:28-81 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:93-138 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 26+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 26+ corresponding lines) ShapeEngine/Random/Rng.cs:287 — ShapeEngine/Random/Rng.cs:287-312 | ShapeEngine/Random/Rng.cs:325-350 | ShapeEngine/Random/Rng.cs:362-388 | ShapeEngine/Random/Rng.cs:401-426 | ShapeEngine/Random/Rng.cs:439-464 | ShapeEngine/Random/Rng.cs:476-501 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 19+ corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:284 — ShapeEngine/Geometry/PolygonDef/PolygonContainsStatic.cs:284-304 | ShapeEngine/Geometry/PolylineDef/PolylineOverlap.cs:262-280 | ShapeEngine/Geometry/PolylineDef/PolylineOverlapStatic.cs:150-168 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 12+ corresponding lines) ShapeEngine/Geometry/QuadDef/QuadOverlapStatic.cs:182 — ShapeEngine/Geometry/QuadDef/QuadOverlapStatic.cs:182-195 | ShapeEngine/Geometry/QuadDef/QuadOverlapStatic.cs:207-219 | ShapeEngine/Geometry/TriangleDef/TriangleOverlapStatic.cs:186-198 | ShapeEngine/Geometry/TriangleDef/TriangleOverlapStatic.cs:209-220 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 17+ corresponding lines) ShapeEngine/Audio/AudioDevice.cs:442 — ShapeEngine/Audio/AudioDevice.cs:442-460 | ShapeEngine/Audio/AudioDevice.cs:516-533 | ShapeEngine/Audio/AudioDevice.cs:546-563 | ShapeEngine/Audio/AudioDevice.cs:723-739 | ShapeEngine/Audio/AudioDevice.cs:751-770 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 33+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 33+ corresponding lines) ShapeEngine/Core/GameWindow.cs:869 — ShapeEngine/Core/GameWindow.cs:869-903 | ShapeEngine/Core/GameWindow.cs:915-948 | ShapeEngine/Core/GameWindow.cs:955-987 | ShapeEngine/Core/GameWindow.cs:994-1028 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 19+ corresponding lines) ShapeEngine/Geometry/CollisionSystem/CollisionInformation.cs:345 — ShapeEngine/Geometry/CollisionSystem/CollisionInformation.cs:345-363 | ShapeEngine/Geometry/CollisionSystem/CollisionInformation.cs:370-388 | ShapeEngine/Geometry/CollisionSystem/CollisionInformation.cs:415-433 | ShapeEngine/Geometry/CollisionSystem/CollisionInformation.cs:440-458 | ShapeEngine/Geometry/CollisionSystem/CollisionInformation.cs:468-486 | ShapeEngine/Geometry/CollisionSystem/CollisionInformation.cs:528-546 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 14+ corresponding lines) ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:145 — ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:145-158 | ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:171-187 | ShapeEngine/Geometry/RayDef/RayOverlapStatic.cs:162-175 | ShapeEngine/Geometry/RayDef/RayOverlapStatic.cs:190-206 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 19+ corresponding lines) ShapeEngine/Content/ContentPack.cs:1629 — ShapeEngine/Content/ContentPack.cs:1629-1648 | ShapeEngine/Content/ContentPack.cs:1661-1680 | ShapeEngine/Content/ContentPack.cs:1695-1713 | ShapeEngine/Content/ContentPack.cs:1726-1745 | ShapeEngine/Content/ContentPack.cs:1758-1778 | ShapeEngine/Content/ContentPack.cs:1791-1810 | ShapeEngine/Content/ContentPack.cs:1823-1841 | ShapeEngine/Content/ContentPack.cs:1854-1872 — These 8 members are one piece of code written 8 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 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 15+ corresponding lines) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:112 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:112-126 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:133-147 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:92-107 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:116-131 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:101-116 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:130-145 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:80-96 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:112-128 — These 8 members are one piece of code written 8 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 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 14+ corresponding lines) ShapeEngine/Serialization/DataBase.cs:218 — ShapeEngine/Serialization/DataBase.cs:218-233 | ShapeEngine/Serialization/DataBase.cs:243-256 | ShapeEngine/Serialization/DataBase.cs:339-353 | ShapeEngine/Serialization/DataBase.cs:426-440 | ShapeEngine/Serialization/DataBase.cs:451-465 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 9+ corresponding lines) ShapeEngine/Geometry/CircleDef/CircleOverlapStatic.cs:183 — ShapeEngine/Geometry/CircleDef/CircleOverlapStatic.cs:183-191 | ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:232-241 | ShapeEngine/Geometry/RayDef/RayOverlapStatic.cs:257-266 | ShapeEngine/Geometry/SegmentDef/SegmentOverlapStatic.cs:215-223 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (1 corresponding lines) · ×1
  • Edited copy of a member (1 corresponding lines) ShapeEngine/Geometry/PointsDef/Points.cs:705 — ShapeEngine/Geometry/PointsDef/Points.cs:705-708 | ShapeEngine/Geometry/TriangleDef/Triangle.cs:1205-1205 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 9+ corresponding lines) ShapeEngine/Geometry/CircleDef/CircleContains.cs:116 — ShapeEngine/Geometry/CircleDef/CircleContains.cs:116-124 | ShapeEngine/Geometry/PolygonDef/PolygonContains.cs:22-30 | ShapeEngine/Geometry/QuadDef/QuadContains.cs:59-67 | ShapeEngine/Geometry/RectDef/RectContains.cs:80-88 | ShapeEngine/Geometry/TriangleDef/TriangleContains.cs:80-88 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 6+ corresponding lines) ShapeEngine/Input/InputTypeGamepadButton.cs:36 — ShapeEngine/Input/InputTypeGamepadButton.cs:36-41 | ShapeEngine/Input/InputTypeGamepadJoyAxis.cs:78-83 | ShapeEngine/Input/InputTypeGamepadTriggerAxis.cs:55-60 | ShapeEngine/Input/InputTypeKeyboardButton.cs:51-56 | ShapeEngine/Input/InputTypeMouseAxis.cs:42-47 | ShapeEngine/Input/InputTypeMouseButton.cs:42-47 | ShapeEngine/Input/InputTypeMousePositionDelta.cs:90-96 | ShapeEngine/Input/InputTypeMouseWheelAxis.cs:41-46 — These 8 members are one piece of code written 8 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 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 5+ corresponding lines) ShapeEngine/Geometry/PointsDef/Points.cs:145 — ShapeEngine/Geometry/PointsDef/Points.cs:145-149 | ShapeEngine/Geometry/PolygonDef/Polygon.cs:188-192 | ShapeEngine/Geometry/PolylineDef/Polyline.cs:105-109 | ShapeEngine/Geometry/TriangulationDef/Triangulation.cs:181-185 | ShapeEngine/ShapeClipper/TriMesh.cs:761-765 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (180–194 lines × 2) · ×1
  • Duplicated block (180–194 lines × 2) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:257 — ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:257-450 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:502-681 — both copies are in the same file, so extract the 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.
D4 · Code Duplication · Duplicated block (118 lines × 2) · ×1
  • Duplicated block (118 lines × 2) ResourcePacker/Program.cs:308 — ResourcePacker/Program.cs:308-425 | ResourcePacker/Program.cs:564-681 — both copies are in the same file, so extract the 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 `ResourcePacker/Program.cs:308` 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 · Duplicated block (103–117 lines × 4) · ×1
  • Duplicated block (103–117 lines × 4) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:611 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:611-727 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:627-743 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:622-724 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:626-728 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:611` 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.
D4 · Code Duplication · Duplicated block (99 lines × 4) · ×1
  • Duplicated block (99 lines × 4) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:153 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:153-251 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:157-255 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:157-255 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:157-255 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:153` 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.
D4 · Code Duplication · Duplicated block (84 lines × 2) · ×1
  • Duplicated block (84 lines × 2) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:433 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:433-516 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:430-513 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:433` 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. 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 · Duplicated block (57–78 lines × 2) · ×1
  • Duplicated block (57–78 lines × 2) ShapeEngine/Core/GameDef/GameVirtual.cs:163 — ShapeEngine/Core/GameDef/GameVirtual.cs:163-240 | ShapeEngine/Core/Scene.cs:492-548 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Core/Scene.cs:486` calls `OnInputDeviceChanged`, `OnPausedChanged` and `ShapeEngine/Core/GameDef/GameVirtual.cs:163` 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.
D4 · Code Duplication · Duplicated block (65 lines × 2) · ×1
  • Duplicated block (65 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1114 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1114-1178 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:995-1059 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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.
D4 · Code Duplication · Duplicated block (60 lines × 3) · ×1
  • Duplicated block (60 lines × 3) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1133 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1133-1192 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1150-1209 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:1128-1187 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1133` 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.
D4 · Code Duplication · Duplicated block (57 lines × 2) · ×1
  • Duplicated block (57 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:512 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:512-568 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:467-523 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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.
D4 · Code Duplication · Duplicated block (56 lines × 3) · ×1
  • Duplicated block (56 lines × 3) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:387 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:387-442 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:384-439 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:344-399 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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.
D4 · Code Duplication · Duplicated block (49 lines × 2) · ×1
  • Duplicated block (49 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1006 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1006-1054 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:907-955 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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.
D4 · Code Duplication · Duplicated block (45–47 lines × 5) · ×1
  • Duplicated block (45–47 lines × 5) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:997 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:997-1041 | ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:295-341 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:2108-2152 | ShapeEngine/Geometry/RectDef/RectDrawing.cs:702-746 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:874-918 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:997` it does not close everything it opens, so those 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 · Duplicated block (43 lines × 2) · ×1
  • Duplicated block (43 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:288 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:288-330 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:285-327 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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.
D4 · Code Duplication · Duplicated block (58 lines × 2) · ×1
  • Duplicated block (58 lines × 2) ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:693 — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:693-750 | ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs:445-502 — before extracting anything, compare `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs` and `ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 299 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (40–41 lines × 2) · ×1
  • Duplicated block (40–41 lines × 2) ShapeEngine/Input/GamepadDevice.cs:518 — ShapeEngine/Input/GamepadDevice.cs:518-558 | ShapeEngine/Input/MouseDevice.cs:367-406 — 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 `ShapeEngine/Input/GamepadDevice.cs:518` 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.
D4 · Code Duplication · Duplicated block (38 lines × 4) · ×1
  • Duplicated block (38 lines × 4) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:184 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:184-221 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:234-271 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:284-321 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:334-371 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:184` 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.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×1
  • Duplicated block (39 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:383 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:383-421 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:363-401 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:383` it does not close everything it opens, so those 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 · Duplicated block (37 lines × 6) · ×1
  • Duplicated block (37 lines × 6) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:253 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:253-289 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1133-1169 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:257-293 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1150-1186 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:257-293 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:1128-1164 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:253` it does not close everything it opens, so those 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 · Duplicated block (37–38 lines × 2) · ×1
  • Duplicated block (37–38 lines × 2) ShapeEngine/Input/KeyboardDevice.cs:268 — ShapeEngine/Input/KeyboardDevice.cs:268-305 | ShapeEngine/Input/MouseDevice.cs:301-337 — 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 `ShapeEngine/Input/KeyboardDevice.cs:268` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:242 — ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:242-278 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:268-304 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 279 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 `ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:242` 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. 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 · Duplicated block (19–37 lines × 2) · ×1
  • Duplicated block (19–37 lines × 2) ShapeEngine/Geometry/RayDef/RayOverlapStatic.cs:24 — ShapeEngine/Geometry/RayDef/RayOverlapStatic.cs:24-42 | ShapeEngine/Geometry/SegmentDef/SegmentOverlapStatic.cs:65-101 — 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.
D4 · Code Duplication · Duplicated block (36–37 lines × 2) · ×1
  • Duplicated block (36–37 lines × 2) ShapeEngine/Text/BitmapFontAtlas.cs:86 — ShapeEngine/Text/BitmapFontAtlas.cs:86-122 | ShapeEngine/Text/BitmapFontAtlas.cs:139-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (35 lines × 10) · ×1
  • Duplicated block (35 lines × 10) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:50 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:50-84 | ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:51-85 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:71-105 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:53-87 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:46-80 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:49-83 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:51-85 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:48-82 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:49-83 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:49-83 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:95` calls `ArgumentNullException`, `nameof` and `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:88` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (33–34 lines × 2) · ×1
  • Duplicated block (33–34 lines × 2) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:107 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:107-139 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:163-196 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:249 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:249-282 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:252-285 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:249` 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. 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 · Duplicated block (31 lines × 3) · ×1
  • Duplicated block (31 lines × 3) ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:367 — ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:367-397 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:431-461 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:506-536 — 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 `ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:367` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `Triangle` in one and `Quad` 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.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:935 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:935-964 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:847-876 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) REDACTED:21 — REDACTED:21-51 | REDACTED:112-142 — both copies are in the same file, so extract the 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 · Duplicated block (30–31 lines × 2) · ×1
  • Duplicated block (30–31 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:536 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:536-565 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:730-760 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:730` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:728` calls `Clamp` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:535` 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.
D4 · Code Duplication · Duplicated block (30 lines × 4) · ×1
  • Duplicated block (30 lines × 4) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:531 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:531-560 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:547-576 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:544-573 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:546-575 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:531` 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. 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 · Duplicated block (23 lines × 3) · ×1
  • Duplicated block (23 lines × 3) ShapeEngine/Input/GamepadDevice.cs:510 — ShapeEngine/Input/GamepadDevice.cs:510-532 | ShapeEngine/Input/KeyboardDevice.cs:327-349 | ShapeEngine/Input/MouseDevice.cs:359-381 — 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 `ShapeEngine/Input/GamepadDevice.cs:510` 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 · Duplicated block (29–30 lines × 2) · ×1
  • Duplicated block (29–30 lines × 2) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:600 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:600-628 | ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:797-826 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:600` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:797` calls `Clamp` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:600` 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.
D4 · Code Duplication · Duplicated block (27–30 lines × 2) · ×1
  • Duplicated block (27–30 lines × 2) ShapeEngine/Pathfinding/AStar.cs:73 — ShapeEngine/Pathfinding/AStar.cs:73-99 | ShapeEngine/Pathfinding/AStar.cs:103-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (49–50 lines × 2) · ×1
  • Duplicated block (49–50 lines × 2) ShapeEngine/Pathfinding/AStar.cs:55 — ShapeEngine/Pathfinding/AStar.cs:55-104 | ShapeEngine/Pathfinding/AStar.cs:200-248 — both copies are in the same file, so extract the 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 `ShapeEngine/Pathfinding/AStar.cs:55` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Pathfinding/AStar.cs:198` calls `ThrowIfCancellationRequested` and `ShapeEngine/Pathfinding/AStar.cs:54` 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.
D4 · Code Duplication · Duplicated block (16–29 lines × 2) · ×1
  • Duplicated block (16–29 lines × 2) ShapeEngine/Text/TextFont.cs:477 — ShapeEngine/Text/TextFont.cs:477-492 | ShapeEngine/Text/TextFont.cs:783-811 — both copies are in the same file, so extract the 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 `ShapeEngine/Text/TextFont.cs:477` it does not close everything it opens, so those 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 · Duplicated block (28 lines × 4) · ×1
  • Duplicated block (28 lines × 4) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:488 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:488-515 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:504-531 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:501-528 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:502-529 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:488` 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. 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 · Duplicated block (26 lines × 5) · ×1
  • Duplicated block (26 lines × 5) ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:319 — ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:319-344 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:612-637 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:641-666 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:670-695 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:698-723 — before extracting anything, compare `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs` and `ShapeEngine/Geometry/RectDef/RectIntersectShape.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 133 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.
D4 · Code Duplication · Duplicated block (23–27 lines × 4) · ×1
  • Duplicated block (23–27 lines × 4) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:301 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:301-326 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:339-364 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:378-404 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:421-443 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:301` 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.
D4 · Code Duplication · Duplicated block (26 lines × 4) · ×1
  • Duplicated block (26 lines × 4) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:447 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:447-472 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:462-487 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:460-485 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:460-485 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:447` 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. 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 · Duplicated block (23 lines × 7) · ×1
  • Duplicated block (23 lines × 7) ShapeEngine/Content/ContentLoader.cs:553 — ShapeEngine/Content/ContentLoader.cs:553-575 | ShapeEngine/Content/ContentLoader.cs:596-618 | ShapeEngine/Content/ContentLoader.cs:639-661 | ShapeEngine/Content/ContentLoader.cs:682-704 | ShapeEngine/Content/ContentLoader.cs:725-747 | ShapeEngine/Content/ContentLoader.cs:768-790 | ShapeEngine/Content/ContentLoader.cs:811-833 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Content/ContentLoader.cs:553` it does not close everything it opens, so those 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 · Duplicated block (24–25 lines × 3) · ×1
  • Duplicated block (24–25 lines × 3) ShapeEngine/Text/TextFont.cs:617 — ShapeEngine/Text/TextFont.cs:617-640 | ShapeEngine/Text/TextFont.cs:645-669 | ShapeEngine/Text/TextFont.cs:843-867 — 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 `ShapeEngine/Text/TextFont.cs:617` it does not close everything it opens, so those 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 · Duplicated block (24 lines × 8) · ×1
  • Duplicated block (24 lines × 8) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:417 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:417-440 | ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:373-396 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:49-72 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:32-55 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:749-772 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:313-336 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:396-419 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:676-699 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:417` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (23 lines × 8) · ×1
  • Duplicated block (23 lines × 8) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:541 — ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:541-563 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:576-598 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:611-633 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:646-668 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:681-703 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:716-738 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:751-773 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:786-808 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `shape` to `Segment` in one and `Triangle` 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.
D4 · Code Duplication · Duplicated block (24 lines × 6) · ×1
  • Duplicated block (24 lines × 6) ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:45 — ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:45-68 | ShapeEngine/Geometry/LineDef/LineOverlap.cs:137-160 | ShapeEngine/Geometry/PolylineDef/PolylineOverlap.cs:155-178 | ShapeEngine/Geometry/RayDef/RayOverlap.cs:128-151 | ShapeEngine/Geometry/SegmentDef/SegmentOverlap.cs:122-145 | ShapeEngine/Geometry/SegmentsDef/SegmentsOverlap.cs:115-138 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:45` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (22–24 lines × 4) · ×1
  • Duplicated block (22–24 lines × 4) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:152 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:152-175 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:134-155 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:134-155 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:134-155 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 314 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:152` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (24 lines × 4) · ×1
  • Duplicated block (24 lines × 4) ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:142 — ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:142-165 | ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:125-148 | ShapeEngine/Geometry/RectDef/RectOverlap.cs:147-170 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:184-207 — 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 `ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:142` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (23–24 lines × 3) · ×1
  • Duplicated block (23–24 lines × 3) ShapeEngine/Input/GamepadDevice.cs:534 — ShapeEngine/Input/GamepadDevice.cs:534-557 | ShapeEngine/Input/KeyboardDevice.cs:351-374 | ShapeEngine/Input/MouseDevice.cs:383-405 — 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 `ShapeEngine/Input/GamepadDevice.cs:534` 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.
D4 · Code Duplication · Duplicated block (23 lines × 5) · ×1
  • Duplicated block (23 lines × 5) ShapeEngine/Text/TextFont.cs:522 — ShapeEngine/Text/TextFont.cs:522-544 | ShapeEngine/Text/TextFont.cs:575-597 | ShapeEngine/Text/TextFont.cs:683-705 | ShapeEngine/Text/TextFont.cs:711-733 | ShapeEngine/Text/TextFont.cs:888-910 — 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 `ShapeEngine/Text/TextFont.cs: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Text/TextFont.cs:710` calls `GetEmphasis` and `ShapeEngine/Text/TextFont.cs:573` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (22–23 lines × 3) · ×1
  • Duplicated block (22–23 lines × 3) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:54 — ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:54-76 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:99-120 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:138-159 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:138` calls `Clear` and `ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:54` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–23 lines × 2) · ×1
  • Duplicated block (12–23 lines × 2) ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:119 — ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:119-130 | ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:173-195 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:119` it does not close everything it opens, so those 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 `circleCenter` to `IntersectionPoint b) IntersectCircleRay(Vector2` in one and `IntersectionPoint b) IntersectCircleLine(Vector2` 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, `ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:170` calls `Normalize` and `ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:118` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (21 lines × 8) · ×1
  • Duplicated block (21 lines × 8) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:176 — ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:176-196 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:212-232 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:248-268 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:284-304 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:320-340 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:356-376 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:392-412 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerCastSpace.cs:428-448 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `shape` to `Segment` in one and `Triangle` 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.
D4 · Code Duplication · Duplicated block (21–22 lines × 3) · ×1
  • Duplicated block (21–22 lines × 3) ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:370 — ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:370-391 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:392-413 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:414-434 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (19–22 lines × 2) · ×1
  • Duplicated block (19–22 lines × 2) ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:257 — ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:257-275 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:303-324 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadOverlap.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 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 `ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:257` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (19 lines × 10) · ×1
  • Duplicated block (19 lines × 10) ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:61 — ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:61-79 | ShapeEngine/Geometry/LineDef/LineOverlap.cs:153-171 | ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:158-176 | ShapeEngine/Geometry/PolylineDef/PolylineOverlap.cs:171-189 | ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:141-159 | ShapeEngine/Geometry/RayDef/RayOverlap.cs:144-162 | ShapeEngine/Geometry/RectDef/RectOverlap.cs:163-181 | ShapeEngine/Geometry/SegmentDef/SegmentOverlap.cs:138-156 | ShapeEngine/Geometry/SegmentsDef/SegmentsOverlap.cs:131-149 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:200-218 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:61` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, `ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:167` calls `OverlapShape`, `OverlapQuadLine`, `OverlapQuadRay` and `ShapeEngine/Geometry/CircleDef/CircleOverlap.cs: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.
D4 · Code Duplication · Duplicated block (18 lines × 8) · ×1
  • Duplicated block (18 lines × 8) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:195 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:195-212 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:245-262 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:295-312 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:345-362 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:823-840 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:902-919 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:981-998 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1060-1077 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:195` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `insideShape` to `Circle` in one and `Triangle` 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.
D4 · Code Duplication · Duplicated block (20 lines × 4) · ×1
  • Duplicated block (20 lines × 4) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1024 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1024-1043 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1140-1159 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:925-944 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1021-1040 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1024` it does not close everything it opens, so those 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 · Duplicated block (19–21 lines × 3) · ×1
  • Duplicated block (19–21 lines × 3) ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:335 — ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:335-353 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:316-336 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:324-342 — before extracting anything, compare `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs` and `ShapeEngine/Geometry/RayDef/RayClosestPoint.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 224 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 `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:335` 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. 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 · Duplicated block (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) ResourcePacker/Program.cs:81 — ResourcePacker/Program.cs:81-101 | ResourcePacker/Program.cs:110-130 | ResourcePacker/Program.cs:139-159 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (19 lines × 5) · ×1
  • Duplicated block (19 lines × 5) ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:222 — ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:222-240 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:363-381 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:385-403 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:407-425 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:428-446 — before extracting anything, compare `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs` and `ShapeEngine/Geometry/RectDef/RectIntersectShape.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 133 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.
D4 · Code Duplication · Duplicated block (19 lines × 4) · ×1
  • Duplicated block (19 lines × 4) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:404 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:404-422 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:495-513 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:485-503 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:485-503 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs` and `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (47 lines × 2) · ×1
  • Duplicated block (47 lines × 2) REDACTED:553 — REDACTED:553-599 | ShapeEngine/Content/ContentPack.cs:2301-2347 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10–20 lines × 2) · ×1
  • Duplicated block (10–20 lines × 2) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:484 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:484-503 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:364-373 — 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 `ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:484` it does not close everything it opens, so those 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 · Duplicated block (19–20 lines × 3) · ×1
  • Duplicated block (19–20 lines × 3) ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1296 — ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1296-1315 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1321-1340 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1341-1359 — 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 `ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1296` 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, `ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1293` calls `Lerp`, `DrawQuad` and `ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:1341` 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.
D4 · Code Duplication · Duplicated block (17 lines × 9) · ×1
  • Duplicated block (17 lines × 9) ShapeEngine/Geometry/CollisionSystem/Collider.cs:402 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:402-418 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:427-443 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:452-468 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:477-493 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:502-518 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:527-543 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:552-568 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:577-593 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:602-618 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `shape` to `Segment` in one and `Circle` 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.
D4 · Code Duplication · Duplicated block (18 lines × 4) · ×1
  • Duplicated block (18 lines × 4) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:304 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:304-321 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:535-552 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:301-318 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:490-507 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 788 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 `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:304` it does not close everything it opens, so those 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 · Duplicated block (16 lines × 6) · ×1
  • Duplicated block (16 lines × 6) ShapeEngine/Pathfinding/Pathfinder.cs:1100 — ShapeEngine/Pathfinding/Pathfinder.cs:1100-1115 | ShapeEngine/Pathfinding/Pathfinder.cs:1119-1134 | ShapeEngine/Pathfinding/Pathfinder.cs:1138-1153 | ShapeEngine/Pathfinding/Pathfinder.cs:1157-1172 | ShapeEngine/Pathfinding/Pathfinder.cs:1192-1207 | ShapeEngine/Pathfinding/Pathfinder.cs:1211-1226 — 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 `ShapeEngine/Pathfinding/Pathfinder.cs:1100` 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. 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, `ShapeEngine/Pathfinding/Pathfinder.cs:1118` calls `GetBoundingBox` and `ShapeEngine/Pathfinding/Pathfinder.cs:1175` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16 lines × 9) · ×1
  • Duplicated block (16 lines × 9) ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:51 — ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs:51-66 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:51-66 | ShapeEngine/Geometry/PointsDef/PointsClosestPoint.cs:122-137 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:174-189 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:52-67 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:51-66 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:51-66 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:194-209 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:51-66 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleClosestPoint.cs` and `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:80` calls `Normalize` and `ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:80` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16–17 lines × 9) · ×1
  • Duplicated block (16–17 lines × 9) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:386 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:386-402 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:526-542 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:708-724 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:383-399 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:521-537 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:701-717 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:343-359 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:452-467 | ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.cs:591-606 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:386` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `Triangle` in one and `Quad` 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.
D4 · Code Duplication · Duplicated block (17 lines × 8) · ×1
  • Duplicated block (17 lines × 8) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:731 — ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:731-747 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:787-803 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:843-859 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:899-915 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:955-971 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:1011-1027 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:1067-1083 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:1123-1139 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:731` 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.
D4 · Code Duplication · Duplicated block (16–17 lines × 6) · ×1
  • Duplicated block (16–17 lines × 6) ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:1021 — ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs:1021-1037 | ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:321-337 | ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs:347-362 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:2132-2148 | ShapeEngine/Geometry/RectDef/RectDrawing.cs:726-742 | ShapeEngine/Geometry/TriangleDef/TriangleDrawing.cs:898-914 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawing.cs` and `ShapeEngine/Geometry/PolylineDef/PolylineDrawing.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12–17 lines × 3) · ×1
  • Duplicated block (12–17 lines × 3) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:409 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:409-425 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:310-321 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:331-344 — 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 that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12–17 lines × 2) · ×1
  • Duplicated block (12–17 lines × 2) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:193 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:193-209 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:156-167 — 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.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:324 — ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:324-340 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:443-457 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:324` it does not close everything it opens, so those 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 · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) ShapeEngine/Input/KeyboardDevice.cs:389 — ShapeEngine/Input/KeyboardDevice.cs:389-405 | ShapeEngine/Input/MouseDevice.cs:417-432 — 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 `ShapeEngine/Input/KeyboardDevice.cs:389` 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.
D4 · Code Duplication · Duplicated block (15 lines × 16) · ×1
  • Duplicated block (15 lines × 16) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:627 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:627-641 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:767-781 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:891-905 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1015-1029 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:643-657 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:782-796 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:907-921 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1032-1046 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:638-652 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:763-777 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:887-901 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:1011-1025 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:642-656 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:767-781 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:892-906 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:1017-1031 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:627` it does not close everything it opens, so those 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 · Duplicated block (15–16 lines × 6) · ×1
  • Duplicated block (15–16 lines × 6) ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:335 — ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:335-349 | ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:387-401 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:316-331 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:376-390 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:324-338 | ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:375-389 — before extracting anything, compare `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs` and `ShapeEngine/Geometry/RayDef/RayClosestPoint.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 224 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 `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:335` it does not close everything it opens, so those 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: the declarations holding them bind `other` to `Quad` in one and `Rect` 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.
D4 · Code Duplication · Duplicated block (15–16 lines × 5) · ×1
  • Duplicated block (15–16 lines × 5) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:131 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:131-145 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:155-170 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:136-150 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:136-150 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:136-150 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 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.
D4 · Code Duplication · Duplicated block (10–16 lines × 6) · ×1
  • Duplicated block (10–16 lines × 6) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:936 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:936-951 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:966-981 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:251-266 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:267-276 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:281-296 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:848-863 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 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 `ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:267` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note 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, `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:951` calls `IntersectSegmentCircle` and `ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:276` 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.
D4 · Code Duplication · Duplicated block (12–16 lines × 3) · ×1
  • Duplicated block (12–16 lines × 3) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1093 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1093-1104 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1108-1119 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:1127-1142 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:982 — ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:982-996 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:297-311 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:879-893 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs` and `ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 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 `ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:982` 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. 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 · Duplicated block (14 lines × 10) · ×1
  • Duplicated block (14 lines × 10) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:391 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:391-404 | ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:778-791 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:407-420 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:446-459 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:725-738 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:691-704 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:846-859 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:784-797 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:312-325 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:648-661 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10–15 lines × 8) · ×1
  • Duplicated block (10–15 lines × 8) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:626 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:626-640 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:641-655 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:656-665 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:686-700 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:701-715 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:716-730 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:731-740 | ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:795-809 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:656` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15 lines × 6) · ×1
  • Duplicated block (15 lines × 6) ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:268 — ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:268-282 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:474-490 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:497-512 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:519-534 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:541-555 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:563-577 — before extracting anything, compare `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs` and `ShapeEngine/Geometry/RectDef/RectIntersectShape.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 133 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.
D4 · Code Duplication · Duplicated block (14 lines × 6) · ×1
  • Duplicated block (14 lines × 6) ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:223 — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:223-236 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:269-282 | ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:316-329 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:228-241 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:272-285 | ShapeEngine/Geometry/RectDef/RectClosestPoint.cs:317-330 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs` and `ShapeEngine/Geometry/RectDef/RectClosestPoint.cs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 1030 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 `ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:223` 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. 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 `other` to `Line` in one and `Ray` 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.
D4 · Code Duplication · Duplicated block (8–15 lines × 4) · ×1
  • Duplicated block (8–15 lines × 4) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:465 — ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:465-479 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:498-512 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:531-545 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:567-574 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:567` 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. 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, `ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:465` calls `IntersectSegmentSegment` and `ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:567` 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.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) ShapeEngine/Geometry/CustomDrawing.cs:234 — ShapeEngine/Geometry/CustomDrawing.cs:234-247 | ShapeEngine/Geometry/CustomDrawing.cs:269-283 — both copies are in the same file, so extract the 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 `ShapeEngine/Geometry/CustomDrawing.cs:234` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (14 lines × 5) · ×1
  • Duplicated block (14 lines × 5) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:208 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:208-221 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:258-271 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:308-321 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:358-371 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:413-426 — 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:208` 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.
D4 · Code Duplication · Duplicated block (13 lines × 17) · ×1
  • Duplicated block (13 lines × 17) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:653 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:653-665 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:793-805 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:917-929 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1041-1053 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:669-681 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:808-820 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:933-945 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1058-1070 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:664-676 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:789-801 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:913-925 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:1037-1049 | ShapeEngine/Geometry/SegmentsDef/Segments.cs:405-417 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:668-680 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:793-805 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:918-930 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:1043-1055 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:653` 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.
D4 · Code Duplication · Duplicated block (11 lines × 7) · ×1
  • Duplicated block (11 lines × 7) ShapeEngine/Geometry/CollisionSystem/Collider.cs:682 — ShapeEngine/Geometry/CollisionSystem/Collider.cs:682-692 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:709-719 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:736-746 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:763-773 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:790-800 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:817-827 | ShapeEngine/Geometry/CollisionSystem/Collider.cs:844-854 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CollisionSystem/Collider.cs:682` it does not close everything it opens, so those 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: the declarations holding them bind `shape` to `Segment` in one and `Circle` 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.
D4 · Code Duplication · Duplicated block (13 lines × 6) · ×1
  • Duplicated block (13 lines × 6) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:291 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:291-303 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1171-1183 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:295-307 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1188-1200 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:295-307 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:1166-1178 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 980 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 `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:291` 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.
D4 · Code Duplication · Duplicated block (12 lines × 6) · ×1
  • Duplicated block (12 lines × 6) ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:557 — ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:557-568 | ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:576-587 | ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:595-606 | ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:614-625 | ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:633-644 | ShapeEngine/Geometry/CollisionSystem/CollisionObject.cs:652-663 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (12–13 lines × 5) · ×1
  • Duplicated block (12–13 lines × 5) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:34 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:34-46 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:33-44 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:35-47 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:35-47 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:35-47 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 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.
D4 · Code Duplication · Duplicated block (10–12 lines × 18) · ×1
  • Duplicated block (10–12 lines × 18) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:445 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:445-455 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:785-796 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:864-875 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:943-954 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1022-1033 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1101-1112 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:334-344 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:617-627 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:757-766 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:881-891 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1006-1016 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1131-1141 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:334-344 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:616-626 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:742-751 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:866-876 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:991-1001 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:1116-1126 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 314 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.
D4 · Code Duplication · Duplicated block (12 lines × 10) · ×1
  • Duplicated block (12 lines × 10) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:26 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:26-37 | ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:26-37 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape.cs:52-63 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:27-38 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:26-37 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:26-37 | ShapeEngine/Geometry/RectDef/RectIntersectShape.cs:26-37 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:26-37 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:26-37 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:26-37 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape.cs:27` 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. 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 · Duplicated block (7 lines × 9) · ×1
  • Duplicated block (7 lines × 9) ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:555 — ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:555-561 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:714-720 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:770-776 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:826-832 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:882-888 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:938-944 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:994-1000 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:1050-1056 | ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:1106-1112 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CollisionSystem/BroadphaseDynamicSpatialHash.cs:555` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (10–12 lines × 8) · ×1
  • Duplicated block (10–12 lines × 8) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:30 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:30-40 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:152-163 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:33-43 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:134-143 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:33-43 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:134-143 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:33-43 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:134-143 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 314 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.
D4 · Code Duplication · Duplicated block (11 lines × 8) · ×1
  • Duplicated block (11 lines × 8) ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:333 — ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:333-343 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:358-368 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:383-393 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:407-417 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:450-460 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:483-493 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:516-526 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:548-558 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:333` it does not close everything it opens, so those 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 · Duplicated block (11 lines × 5) · ×1
  • Duplicated block (11 lines × 5) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:330 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:330-340 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:601-611 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:741-751 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:865-875 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:989-999 — 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.
D4 · Code Duplication · Duplicated block (11–12 lines × 3) · ×1
  • Duplicated block (11–12 lines × 3) ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:62 — ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:62-73 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:95-105 | ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:722-733 — 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 `ShapeEngine/Geometry/SegmentsDef/SegmentsClosestPoint.cs:62` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `p` to `Vector2` in one and `IntersectionPoint segmentPoint) GetClosestSegment(Vector2` 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.
D4 · Code Duplication · Duplicated block (9–12 lines × 2) · ×1
  • Duplicated block (9–12 lines × 2) ShapeEngine/Content/ContentPack.cs:682 — ShapeEngine/Content/ContentPack.cs:682-693 | ShapeEngine/Content/ContentPack.cs:834-842 — both copies are in the same file, so extract the 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 · Duplicated block (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) ShapeEngine/Content/ContentPack.cs:1185 — ShapeEngine/Content/ContentPack.cs:1185-1196 | ShapeEngine/Content/ContentPack.cs:1288-1297 — both copies are in the same file, so extract the 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.
D4 · Code Duplication · Duplicated block (11 lines × 10) · ×1
  • Duplicated block (11 lines × 10) ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:71 — ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:71-81 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:91-101 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:111-121 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:131-141 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:151-161 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:171-181 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:191-201 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:213-224 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:236-247 | ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:257-268 — all 10 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 `ShapeEngine/Geometry/TriangulationDef/TriangulationIntersectShape.cs:213` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `shape` to `Line` in one and `Ray` 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.
D4 · Code Duplication · Duplicated block (9 lines × 9) · ×1
  • Duplicated block (9 lines × 9) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:417 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:417-425 | ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:373-381 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:49-57 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:32-40 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:749-757 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:313-321 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:28-36 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:396-404 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:676-684 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:417` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (11 lines × 9) · ×1
  • Duplicated block (11 lines × 9) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:185 — ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:185-195 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:242-252 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:299-309 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:356-366 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:413-423 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:470-480 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:527-537 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:584-594 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:641-651 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.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. 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 · Duplicated block (10 lines × 7) · ×1
  • Duplicated block (10 lines × 7) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:942 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:942-951 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:430-439 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:482-491 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1555-1564 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:926-935 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:666-675 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1363-1372 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:942` it does not close everything it opens, so those 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 · Duplicated block (10–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:341 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:341-350 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:341-350 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:341-351 — before extracting anything, compare `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` and `ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 1185 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–11 lines × 2) · ×1
  • Duplicated block (8–11 lines × 2) REDACTED:440 — REDACTED:440-450 | ShapeEngine/Content/ContentPack.cs:586-593 — 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 19) · ×1
  • Duplicated block (9–10 lines × 19) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1116 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1116-1125 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:448-456 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:788-797 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:867-876 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:946-955 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1025-1034 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1104-1113 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:336-345 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:619-628 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:759-767 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:883-892 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1008-1017 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1133-1142 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:336-345 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:618-627 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:744-752 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:868-877 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:993-1002 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:1118-1127 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 10) · ×1
  • Duplicated block (9–10 lines × 10) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:34 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:34-43 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:131-139 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:33-41 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:155-164 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:35-44 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:136-144 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:35-44 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:136-144 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:35-44 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:136-144 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 9) · ×1
  • Duplicated block (9–10 lines × 9) ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:941 — ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:941-950 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:978-986 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:1014-1022 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:1051-1059 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:1088-1096 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:1125-1133 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:1160-1168 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:1189-1197 | ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:1225-1233 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CollisionSystem/BroadphaseSpatialHash.cs:941` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (10 lines × 9) · ×1
  • Duplicated block (10 lines × 9) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:589 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:589-598 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:642-651 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:698-707 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:458-467 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:500-509 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:543-552 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:456-465 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:498-507 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:542-551 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 314 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.
D4 · Code Duplication · Duplicated block (10 lines × 8) · ×1
  • Duplicated block (10 lines × 8) ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:193 — ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:193-206 | ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:156-165 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:24-34 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:66-76 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:100-109 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:131-140 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:165-174 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:197-206 — there are 8 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 8 sites; resolving a subset leaves the remainder to drift apart. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `linePoint` to `float t) IntersectLineRayInfo(Vector2` in one and `Vector2` 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.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×1
  • Duplicated block (5 lines × 5) REDACTED:301 — REDACTED:301-305 | REDACTED:403-407 | ShapeEngine/Content/ContentPack.cs:455-459 | ShapeEngine/Content/ContentPack.cs:549-553 | ShapeEngine/Content/ContentPack.cs:1343-1347 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (9 lines × 14) · ×1
  • Duplicated block (9 lines × 14) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:443 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:443-452 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:492-501 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:783-793 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:862-872 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:941-951 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1020-1030 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1099-1109 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:332-341 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:373-382 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:614-623 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:740-748 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:864-873 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:989-998 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:1114-1123 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 340 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:443` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (8 lines × 10) · ×1
  • Duplicated block (8 lines × 10) ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:948 — ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:948-955 | ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:810-817 | ShapeEngine/Geometry/PolygonDef/PolygonIntersectShape2.cs:436-443 | ShapeEngine/Geometry/PolylineDef/PolylineIntersectShape2.cs:488-495 | ShapeEngine/Geometry/QuadDef/QuadIntersectShape.cs:1561-1568 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:723-730 | ShapeEngine/Geometry/RectDef/RectIntersectShape2.cs:932-939 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:816-823 | ShapeEngine/Geometry/SegmentsDef/SegmentsIntersectShape.cs:672-679 | ShapeEngine/Geometry/TriangleDef/TriangleIntersectShape.cs:1369-1376 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/CircleDef/CircleIntersectShape.cs:948` 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.
D4 · Code Duplication · Duplicated block (9 lines × 10) · ×1
  • Duplicated block (9 lines × 10) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:186 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:186-194 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:207-215 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:236-244 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:257-265 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:286-294 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:307-315 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:336-344 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:357-365 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:387-395 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:412-420 — all 10 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:207` 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.
D4 · Code Duplication · Duplicated block (9 lines × 8) · ×1
  • Duplicated block (9 lines × 8) ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:332 — ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:332-341 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:374-383 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:414-423 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:615-624 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:755-763 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:879-888 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1004-1013 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1129-1138 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:332` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×1
  • Duplicated block (9 lines × 6) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:470 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:470-478 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:518-526 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:566-574 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:613-621 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:667-675 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:725-733 — 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:470` 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 5) · ×1
  • Duplicated block (8–9 lines × 5) ShapeEngine/Geometry/CircleDef/CircleContains.cs:132 — ShapeEngine/Geometry/CircleDef/CircleContains.cs:132-139 | ShapeEngine/Geometry/PolygonDef/PolygonContains.cs:41-48 | ShapeEngine/Geometry/QuadDef/QuadContains.cs:74-81 | ShapeEngine/Geometry/RectDef/RectContains.cs:98-106 | ShapeEngine/Geometry/TriangleDef/TriangleContains.cs:100-107 — 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 `ShapeEngine/Geometry/CircleDef/CircleContains.cs:132` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:89 — ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:89-96 | ShapeEngine/Geometry/RayDef/RayClosestPoint.cs:90-98 — before extracting anything, compare `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs` and `ShapeEngine/Geometry/RayDef/RayClosestPoint.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 224 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 `ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:89` 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. 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 · Duplicated block (8 lines × 16) · ×1
  • Duplicated block (8 lines × 16) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:444 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:444-452 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:493-501 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:540-548 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:784-793 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:863-872 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:942-951 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1021-1030 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1100-1109 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:333-341 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:374-382 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:414-422 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:615-623 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:741-748 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:865-873 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:990-998 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:1115-1123 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 340 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.
D4 · Code Duplication · Duplicated block (5 lines × 8) · ×1
  • Duplicated block (5 lines × 8) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:86 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:86-90 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:588-592 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:641-645 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:697-701 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:80-84 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:455-459 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:497-501 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:541-545 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 340 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.
D4 · Code Duplication · Duplicated block (8 lines × 7) · ×1
  • Duplicated block (8 lines × 7) ShapeEngine/Pathfinding/Pathfinder.cs:1100 — ShapeEngine/Pathfinding/Pathfinder.cs:1100-1107 | ShapeEngine/Pathfinding/Pathfinder.cs:1119-1126 | ShapeEngine/Pathfinding/Pathfinder.cs:1138-1145 | ShapeEngine/Pathfinding/Pathfinder.cs:1157-1164 | ShapeEngine/Pathfinding/Pathfinder.cs:1175-1182 | ShapeEngine/Pathfinding/Pathfinder.cs:1192-1199 | ShapeEngine/Pathfinding/Pathfinder.cs:1211-1218 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ShapeEngine/Pathfinding/Pathfinder.cs:1100` it does not close everything it opens, so those 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, `ShapeEngine/Pathfinding/Pathfinder.cs:1099` calls `GetBoundingBox` and `ShapeEngine/Pathfinding/Pathfinder.cs:1174` 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) ShapeEngine/Geometry/CustomDrawing.cs:212 — ShapeEngine/Geometry/CustomDrawing.cs:212-219 | ShapeEngine/Geometry/CustomDrawing.cs:247-254 | ShapeEngine/Geometry/CustomDrawing.cs:285-291 — 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 `ShapeEngine/Geometry/CustomDrawing.cs:212` 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.
D4 · Code Duplication · Duplicated block (7 lines × 40) · ×1
  • Duplicated block (7 lines × 40) ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:36 — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:36-43 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:132-139 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:335-341 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:606-612 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:746-752 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:870-876 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:994-1000 | ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:1118-1125 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:34-41 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:157-164 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:449-456 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:790-797 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:869-876 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:948-955 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1027-1034 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1106-1113 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:37-44 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:137-144 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:338-345 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:621-628 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:760-767 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:885-892 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1010-1017 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:1135-1142 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:37-44 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:137-144 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:339-345 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:617-623 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:742-748 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:866-872 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:990-996 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:1114-1120 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:37-44 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:137-144 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:338-345 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:620-627 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:745-752 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:870-877 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:995-1002 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:1120-1127 — before extracting anything, compare `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs` and `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 181 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:45` calls `Clear`, `EnsureCapacity` and `ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:343` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 13) · ×1
  • Duplicated block (7 lines × 13) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:86 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:86-92 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:588-594 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:641-647 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:697-703 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:80-86 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:457-463 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:499-505 | ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs:542-548 | ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs:80-86 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:80-86 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:455-461 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:497-503 | ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.cs:541-547 — before extracting anything, compare `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs` and `ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 314 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 that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 10) · ×1
  • Duplicated block (7 lines × 10) ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:814 — ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:814-820 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:835-841 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:893-899 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:914-920 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:972-978 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:993-999 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1051-1057 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1072-1078 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1131-1137 | ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:1156-1162 — all 10 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 `ShapeEngine/Geometry/PolygonDef/PolygonDrawingStriped.cs:814` it does not close everything it opens, so those 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 · Duplicated block (5 lines × 9) · ×1
  • Duplicated block (5 lines × 9) ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:152 — ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:152-156 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:209-213 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:266-270 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:323-327 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:380-384 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:437-441 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:494-498 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:551-555 | ShapeEngine/Geometry/CollisionSystem/CollisionHandlerDef/CollisionHandlerIntersectSpace.cs:608-612 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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 · Duplicated block (6 lines × 8) · ×1
  • Duplicated block (6 lines × 8) ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:633 — ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:633-638 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:648-654 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:679-684 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:694-700 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:725-730 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:740-746 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:772-777 | ShapeEngine/Geometry/QuadDef/QuadDrawing.cs:787-793 — 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.
D4 · Code Duplication · Duplicated block (45 lines × 3) · ×1
  • Duplicated block (45 lines × 3) ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:631 — ShapeEngine/Geometry/LineDef/LineIntersectShape.cs:631-675 | ShapeEngine/Geometry/RayDef/RayIntersectShape.cs:554-598 | ShapeEngine/Geometry/SegmentDef/SegmentIntersectShape.cs:644-688 — before extracting anything, compare `ShapeEngine/Geometry/LineDef/LineIntersectShape.cs` and `ShapeEngine/Geometry/RayDef/RayIntersectShape.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 203 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (8 lines × 11) · ×1
  • Duplicated block (8 lines × 11) ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:23 — ShapeEngine/Geometry/CircleDef/CircleOverlap.cs:23-31 | ShapeEngine/Geometry/LineDef/LineOverlap.cs:120-128 | ShapeEngine/Geometry/PolygonDef/PolygonOverlap.cs:124-132 | ShapeEngine/Geometry/PolylineDef/PolylineOverlap.cs:139-146 | ShapeEngine/Geometry/QuadDef/QuadOverlap.cs:106-114 | ShapeEngine/Geometry/RayDef/RayOverlap.cs:109-117 | ShapeEngine/Geometry/RectDef/RectOverlap.cs:127-135 | ShapeEngine/Geometry/SegmentDef/SegmentOverlap.cs:103-111 | ShapeEngine/Geometry/SegmentsDef/SegmentsOverlap.cs:96-104 | ShapeEngine/Geometry/TriangleDef/TriangleOverlap.cs:164-172 | ShapeEngine/Geometry/TriangulationDef/TriangulationOverlap.cs:23-31 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 11 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 11 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.
D4 · Code Duplication · Duplicated block (33 lines × 4) · ×1
  • Duplicated block (33 lines × 4) ShapeEngine/Geometry/QuadDef/QuadMath.cs:99 — ShapeEngine/Geometry/QuadDef/QuadMath.cs:99-138 | ShapeEngine/Geometry/RectDef/RectMath.cs:199-238 | ShapeEngine/Geometry/SegmentDef/SegmentMath.cs:105-137 | ShapeEngine/Geometry/TriangleDef/TriangleMath.cs:501-536 — 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.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 4+ corresponding lines) Examples/Scenes/ExampleScenes/DataExample.cs:158 — Examples/Scenes/ExampleScenes/DataExample.cs:158-161 | Examples/Scenes/ExampleScenes/JsonDataExample.cs:165-168 | Examples/Scenes/ExampleScenes/XmlDataExample.cs:188-191 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (26–29 lines × 2) · ×1
  • Duplicated block (26–29 lines × 2) Examples/Scenes/ExampleScenes/InputExample.cs:501 — Examples/Scenes/ExampleScenes/InputExample.cs:501-526 | Examples/Scenes/ExampleScenes/InputExample.cs:608-636 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/InputExample.cs:501` 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.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:66 — Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:66-83 | Examples/Scenes/ExampleScenes/PathfinderExample2.cs:58-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs:66` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5–11 lines × 3) · ×1
  • Duplicated block (5–11 lines × 3) Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:2162 — Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:2162-2172 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:2175-2185 | Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:2186-2190 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs:2162` 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.
D4 · Code Duplication · Duplicated block (8–10 lines × 4) · ×1
  • Duplicated block (8–10 lines × 4) Examples/Scenes/ExampleScenes/InputExample.cs:112 — Examples/Scenes/ExampleScenes/InputExample.cs:112-121 | Examples/Scenes/ExampleScenes/InputExample.cs:386-393 | Examples/Scenes/ExampleScenes/InputExample.cs:517-524 | Examples/Scenes/ExampleScenes/InputExample.cs:626-633 — 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) Examples/Scenes/ExampleScenes/PathfinderExample.cs:260 — Examples/Scenes/ExampleScenes/PathfinderExample.cs:260-266 | Examples/Scenes/ExampleScenes/PathfinderExample2.cs:1007-1014 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Scenes/ExampleScenes/PathfinderExample.cs:260` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: CustomEvent (LCOM4 6) ShapeEngine/Core/GameDef/GameCustomEvent.cs:16 — CustomEvent's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
SC1 · Supply-chain hygiene · NuGet dependencies are not locked · ×1
  • NuGet dependencies are not locked ShapeEngine/ShapeEngine.csproj:201 — ShapeEngine/ShapeEngine.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
X1 · Async correctness · Sync-over-async (deadlock risk) · ×1
  • Sync-over-async (deadlock risk) REDACTED:231 — Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
X18 · Disposal-pattern correctness · Disposable created and abandoned in the method that made it · ×1
  • Disposable created and abandoned in the method that made it REDACTED:185 — `queue` is a `BlockingCollection`, which implements `IDisposable`, and it is created here (line 185). Every use of it in `PackParallel` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var queue = …;`), which releases it at the end of the scope on every path including a throw.
Minor — 121 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate ShapeEngine/Geometry/LineDef/LineDrawing.cs:28 — `!IsValid || length <= 0f || lineInfo.Thickness <= 0f` appears character-identically in 2 files — ShapeEngine/Geometry/LineDef/LineDrawing.cs, ShapeEngine/Geometry/RayDef/RayDrawing.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 ShapeEngine/Geometry/LineDef/LineDrawing.cs:157 — `!IsValid || length <= 0f || thickness <= 0f` appears character-identically in 2 files — ShapeEngine/Geometry/LineDef/LineDrawing.cs, ShapeEngine/Geometry/RayDef/RayDrawing.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 ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs:1050 — `!closestResult.Valid || result.IsCloser(closestResult)` appears character-identically in 3 files — ShapeEngine/Geometry/QuadDef/QuadClosestPoint.cs, ShapeEngine/Geometry/RectDef/RectClosestPoint.cs, ShapeEngine/Geometry/TriangleDef/TriangleClosestPoint.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 ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:160 — `!insideShapePoints.a.Valid && !insideShapePoints.b.Valid` appears character-identically in 4 files — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs, ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs, ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs, ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.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 ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs:153 — `!outsideShapePoints.a.Valid || !outsideShapePoints.b.Valid` appears character-identically in 4 files — ShapeEngine/Geometry/CircleDef/CircleDrawingStriped.cs, ShapeEngine/Geometry/QuadDef/QuadDrawingStriped.cs, ShapeEngine/Geometry/RectDef/RectDrawingStriped.cs, ShapeEngine/Geometry/TriangleDef/TriangleDrawingStriped.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 ShapeEngine/Input/InputActionTree.cs:202 — `!updated || deviceType == InputDeviceType.None || usedDeviceType != InputDeviceType.None` appears character-identically in 2 files — ShapeEngine/Input/InputActionTree.cs, ShapeEngine/Input/InputActionTreeGroup.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 ShapeEngine/Input/GamepadDevice.cs:543 — `!used && pressCountEnabled && PressedButtons.Any(b => !Settings.ExceptionButtons.Contains(b))` appears character-identically in 3 files — ShapeEngine/Input/GamepadDevice.cs, ShapeEngine/Input/KeyboardDevice.cs, ShapeEngine/Input/MouseDevice.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 ShapeEngine/Geometry/LineDef/Line.cs:133 — `(Direction.X!= 0 || Direction.Y!= 0) && (Normal.X != 0 || Normal.Y != 0)` appears character-identically in 2 files — ShapeEngine/Geometry/LineDef/Line.cs, ShapeEngine/Geometry/RayDef/Ray.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 ShapeEngine/Geometry/LineDef/Line.cs:145 — `Math.Abs(Normal.X - Direction.Y) < 0.0000001f && Math.Abs(Normal.Y - (-Direction.X)) < 0.0000001f` appears character-identically in 2 files — ShapeEngine/Geometry/LineDef/Line.cs, ShapeEngine/Geometry/RayDef/Ray.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 ShapeEngine/Core/Structs/ValueRange.cs:157 — `Min >= 0.0f && Max >= 0.0f && HasRange()` appears character-identically in 2 files — ShapeEngine/Core/Structs/ValueRange.cs, ShapeEngine/Core/Structs/ValueRangeInt.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 ShapeEngine/Core/Structs/ValueRange.cs:506 — `Min.Equals(other.Min) && Max.Equals(other.Max)` appears character-identically in 3 files — ShapeEngine/Core/Structs/ValueRange.cs, ShapeEngine/Core/Structs/ValueRangeColor.cs, ShapeEngine/Core/Structs/ValueRangeInt.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 ShapeEngine/Input/InputSettingsGamepad.cs:221 — `MinPressCount > 1 && MinPressInterval > 0f` appears character-identically in 3 files — ShapeEngine/Input/InputSettingsGamepad.cs, ShapeEngine/Input/InputSettingsKeyboard.cs, ShapeEngine/Input/InputSettingsMouse.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 ShapeEngine/Core/Logging/Logger.cs:137 — `OutputType == LogOutputType.Console || !LogFilePathValid` appears character-identically in 2 files — ShapeEngine/Core/Logging/Logger.cs, ShapeEngine/StaticLib/ShapeLogger.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 ShapeEngine/Core/Logging/Logger.cs:139 — `OutputType is LogOutputType.File or LogOutputType.Both && LogFilePathValid` appears character-identically in 2 files — ShapeEngine/Core/Logging/Logger.cs, ShapeEngine/StaticLib/ShapeLogger.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 ShapeEngine/Geometry/PolygonDef/PolygonCollider.cs:65 — `RelativeShape.Count <= 0 && shape.Count > 0` appears character-identically in 2 files — ShapeEngine/Geometry/PolygonDef/PolygonCollider.cs, ShapeEngine/Geometry/PolygonDef/PolygonShape.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 ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs:148 — `a <= ShapeMath.EpsilonF && e <= ShapeMath.EpsilonF` appears character-identically in 2 files — ShapeEngine/Geometry/SegmentDef/SegmentClosestPoint.cs, ShapeEngine/Geometry/SegmentDef/SegmentClosestPointStatic.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 Examples/Scenes/ExampleScenes/DataExample.cs:260 — `asteroid.IsDead || asteroid.DistanceToTargetSq > (AsteroidSpawnRadius * AsteroidSpawnRadius) * 1.25f` appears character-identically in 3 files — Examples/Scenes/ExampleScenes/DataExample.cs, Examples/Scenes/ExampleScenes/JsonDataExample.cs, Examples/Scenes/ExampleScenes/XmlDataExample.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 ShapeEngine/Input/InputTypeMouseAxis.cs:73 — `axis == other.axis && (modifierKeySet == null && other.modifierKeySet == null || modifierKeySet != null && modifierKeySet.Equals(other.modif…` appears character-identically in 2 files — ShapeEngine/Input/InputTypeMouseAxis.cs, ShapeEngine/Input/InputTypeMouseWheelAxis.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 ShapeEngine/Input/InputTypeGamepadJoyAxis.cs:108 — `axis == other.axis && inverted == other.inverted && (modifierKeySet == null && other.modifierKeySet == null || modifierKeySet != null && mod…` appears character-identically in 2 files — ShapeEngine/Input/InputTypeGamepadJoyAxis.cs, ShapeEngine/Input/InputTypeGamepadTriggerAxis.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 ShapeEngine/Input/InputTypeGamepadButton.cs:66 — `button == other.button && (modifierKeySet == null && other.modifierKeySet == null || modifierKeySet != null && modifierKeySet.Equals(other.m…` appears character-identically in 3 files — ShapeEngine/Input/InputTypeGamepadButton.cs, ShapeEngine/Input/InputTypeKeyboardButton.cs, ShapeEngine/Input/InputTypeMouseButton.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 ShapeEngine/UI/ControlNode.cs:549 — `child.Parent == null || child.Parent != this` appears character-identically in 2 files — ShapeEngine/UI/ControlNode.cs, ShapeEngine/UI/RectNode.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 ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs:533 — `closestDistanceSquared < 0 || distanceSquared < closestDistanceSquared` appears character-identically in 2 files — ShapeEngine/Geometry/CollisionSystem/IntersectSpaceRegister.cs, ShapeEngine/Geometry/CollisionSystem/IntersectSpaceResult.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 REDACTED:350 — `dirPath != null && !Directory.Exists(dirPath)` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:73 — `extensionExceptions != null && IsExtensionException(Path.GetExtension(file), extensionExceptions)` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:313 — `extensionExceptions != null && IsExtensionException(Path.GetExtension(relativePath), extensionExceptions)` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
IC1 · Incompleteness & stubs · Commented-out code · ×32
  • Commented-out code REDACTED:441 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code REDACTED:442 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code REDACTED:445 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code REDACTED:543 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Achievements/Achievement.cs:172 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Achievements/Achievement.cs:173 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Audio/SFX.cs:33 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Color/ColorHsl.cs:413 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Color/ColorHsl.cs:414 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Color/ColorHsl.cs:415 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Color/ColorHsl.cs:416 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Color/ColorHsl.cs:417 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Color/ColorHsl.cs:418 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Color/ColorHsl.cs:419 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Color/ColorHsl.cs:420 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Color/ColorHsl.cs:421 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Color/ColorHsl.cs:422 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Color/ColorHsl.cs:423 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Color/ColorHsl.cs:424 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Content/ContentPack.cs:684 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Content/ContentPack.cs:831 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Content/ContentPack.cs:1389 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Content/ContentPack.cs:1901 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Content/ContentPack.cs:2291 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code ShapeEngine/Core/AdaptiveFpsLimiter.cs:209 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • + 7 more in this group — see findings.md.
D24 · Comment Value · redundant comment · ×23
  • redundant comment ShapeEngine/Core/GameDef/GameGameloop.cs:344 — "draw screen textures to screen before the game texture" repeats the code it sits on: 4 of its 5 words (draw, screen, textures, texture) are already in `if (customScreenTexturesDrawBefore is { Count: > 0 })`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Core/GameDef/GameGameloop.cs:360 — "draw game texture to screen" repeats the code it sits on: 4 of its 4 words (draw, game, texture, screen) are already in `gameTexture.DrawToScreen();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Core/GameDef/GameGameloop.cs:363 — "draw screen textures to screen after the game texture" repeats the code it sits on: 4 of its 5 words (draw, screen, textures, texture) are already in `if (customScreenTexturesDrawAfter is { Count: > 0 })`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Core/GameWindow.cs:711 — "Apply initial cursor state to Raylib" repeats the code it sits on: 4 of its 5 words (apply, cursor, state, raylib) are already in `ApplyMouseVisibilityToRaylib(cursorState.DesiredVisible);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:172 — "Vector from the line point to the circle center" repeats the code it sits on: 4 of its 5 words (line, point, circle, center) are already in `var toCircle = circleCenter - linePoint;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:181 — "Distance from the closest point to the circle center" repeats the code it sits on: 5 of its 5 words (distance, closest, point, circle, center) are already in `float distanceToCenter = Vector2.Distance(closestPoint, circleCenter);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/CircleDef/CircleIntersectionStatic.cs:194 — "Normals at the intersection points" repeats the code it sits on: 3 of its 3 words (normals, intersection, points) are already in `var p1 = new IntersectionPoint(intersection1, lineNormal);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/LineDef/LineClosestPoint.cs:85 — "Project the vector to the point onto the line direction" repeats the code it sits on: 4 of its 5 words (vector, point, line, direction) are already in `float projectionLength = Vector2.Dot(toPoint, normalizedLineDirection);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/LineDef/LineClosestPointStatic.cs:28 — "Project the vector to the point onto the line direction" repeats the code it sits on: 4 of its 5 words (vector, point, line, direction) are already in `float projectionLength = Vector2.Dot(toPoint, normalizedLineDirection);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:71 — "Check if the intersection point is within the segment" repeats the code it sits on: 4 of its 4 words (check, intersection, point, segment) are already in `if (Segment.IsPointOnSegment(intersection, segmentStart, segmentEnd))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:483 — "Vector from the line point to the circle center" repeats the code it sits on: 4 of its 5 words (line, point, circle, center) are already in `var toCircle = circleCenter - linePoint;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/LineDef/LineIntersectionStatic.cs:492 — "Distance from the closest point to the circle center" repeats the code it sits on: 5 of its 5 words (distance, closest, point, circle, center) are already in `float distanceToCenter = Vector2.Distance(closestPoint, circleCenter);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:115 — "Vector from the line point to the circle center" repeats the code it sits on: 4 of its 5 words (line, point, circle, center) are already in `var toCircle = circleCenter - linePoint;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/LineDef/LineOverlapStatic.cs:124 — "Distance from the closest point to the circle center" repeats the code it sits on: 5 of its 5 words (distance, closest, point, circle, center) are already in `float distanceToCenter = Vector2.Distance(closestPoint, circleCenter);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/RayDef/RayClosestPointStatic.cs:29 — "Project the vector to the point onto the ray direction" repeats the code it sits on: 4 of its 5 words (vector, point, ray, direction) are already in `float projectionLength = Vector2.Dot(toPoint, normalizedRayDirection);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:26 — "Calculate the dot product of the direction vector and the vector to the point" repeats the code it sits on: 5 of its 6 words (dot, product, direction, vector, point) are already in `float dotProduct = Vector2.Dot(toPoint, rayDirection);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/RayDef/RayIntersectionStatic.cs:29 — "Check if the point is in the same direction as the ray and on the line" repeats the code it sits on: 5 of its 5 words (check, point, direction, ray, line) are already in `return dotProduct >= 0 && Line.IsPointOnLine(point, rayPoint, rayDirection);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:439 — "Distance from the closest point to the circle center" repeats the code it sits on: 5 of its 5 words (distance, closest, point, circle, center) are already in `float distanceToCenter = Vector2.Distance(closestPoint, circleCenter);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/SegmentDef/SegmentIntersectionStatic.cs:449 — "Check if the intersection points are within the segment" repeats the code it sits on: 4 of its 4 words (check, intersection, points, segment) are already in `if (IsPointOnSegment(intersection1, segmentStart, segmentEnd))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Geometry/ShapeContainer.cs:61 — "remove child from that parent" repeats the code it sits on: 3 of its 3 words (remove, child, parent) are already in `child.Parent.RemoveChild(child);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Input/InputAction.cs:406 — "Axis Sensitivity & Gravity" repeats the code it sits on: 3 of its 3 words (axis, sensitivity, gravity) are already in `if (Settings.AxisSensitivity > 0 || Settings.AxisGravity > 0)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Stats/SimpleStat.cs:679 — "apply multiplicative percentage modifiers" repeats the code it sits on: 4 of its 4 words (apply, multiplicative, percentage, modifiers) are already in `value = ApplyMultiplicativePercentageModifiers(multiplicativePercentageModifiers, multiplicativePercentageModifierCount, …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ShapeEngine/Stats/StatSet.cs:165 — 7 comments in this file only repeat the code they sit on (lines 165, 183, 428, 446, 471, 508, 538), for example "Mark stats affected by expired source as dirty". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
P10 · Library API & versioning · Public type used only inside its own library · ×9
  • Public type used only inside its own library ShapeEngine/Core/SceneEmpty.cs:7 — `ShapeEngine.Core.SceneEmpty` (ShapeEngine/Core/SceneEmpty.cs:7) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
  • Public type used only inside its own library ShapeEngine/Core/Shake.cs:10 — `ShapeEngine.Core.Shake` (ShapeEngine/Core/Shake.cs:10) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
  • Public type used only inside its own library ShapeEngine/Core/SlowMotion.cs:12 — `ShapeEngine.Core.SlowMotion` (ShapeEngine/Core/SlowMotion.cs:12) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
  • Public type used only inside its own library ShapeEngine/Geometry/CollisionSystem/BroadphaseColliderRegister.cs:6 — `ShapeEngine.Geometry.CollisionSystem.BroadphaseColliderRegister` (ShapeEngine/Geometry/CollisionSystem/BroadphaseColliderRegister.cs:6) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
  • Public type used only inside its own library ShapeEngine/Geometry/CollisionSystem/BroadphaseStaticColliderRegister.cs:8 — `ShapeEngine.Geometry.CollisionSystem.BroadphaseStaticColliderRegister` (ShapeEngine/Geometry/CollisionSystem/BroadphaseStaticColliderRegister.cs:8) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
  • Public type used only inside its own library ShapeEngine/Input/InputTypeMouseAxis.cs:10 — `ShapeEngine.Input.InputTypeMouseAxis` (ShapeEngine/Input/InputTypeMouseAxis.cs:10) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
  • Public type used only inside its own library ShapeEngine/Pool/ObjectPool.cs:15 — `ShapeEngine.Pool.ObjectPool` (ShapeEngine/Pool/ObjectPool.cs:15) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
  • Public type used only inside its own library ShapeEngine/ShapeClipper/Paths64PooledBuffer.cs:12 — `ShapeEngine.ShapeClipper.Paths64PooledBuffer` (ShapeEngine/ShapeClipper/Paths64PooledBuffer.cs:12) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
  • Public type used only inside its own library ShapeEngine/ShapeClipper/ShapeClipperDrawing2D.cs:14 — `ShapeEngine.ShapeClipper.ShapeClipperDrawing2D` (ShapeEngine/ShapeClipper/ShapeClipperDrawing2D.cs:14) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Examples`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
AX6 · Interface segregation · Fat interface · ×1
  • Fat interface: IBroadphase (17 members) ShapeEngine/Geometry/CollisionSystem/IBroadphase.cs:22 — `IBroadphase` declares 17 members under just 5 distinct name(s): `Fill`, `Close`, `DebugDraw`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBuckets`, `GetCandidateBucketsThreadSafe`, `GetCandidateBucketsThreadSafe`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 17 separate responsibilities: a caller binds to 5 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 17 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found ResourcePacker/ResourcePacker.csproj:4 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `ResourcePacker/ResourcePacker.csproj` makes this repository a deployable product (line 4).
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion ShapeEngine/ShapeEngine.csproj:1 — `ShapeEngine` overshoots its size bounds (140143 LoC, 339 public types across 38 namespaces). 1 of 3 project(s) overshoot their size bounds, lowering Project Cohesion to 3.3/10. Size alone is no reason to split a project: where its type references show a separable part, a Split row names it.
D26 · Project Cohesion · Split ShapeEngine · ×1
  • Split ShapeEngine ShapeEngine/ShapeEngine.csproj:1 — `ShapeEngine` overshoots its size bounds (140143 LoC, 339 public types across 38 namespaces). These parts reach the rest of the project only through its shared core (`Color`, `Core`, `StaticLib`), so they are the cleanest seams: `ShapeEngine.Stats` (13 types in 11 files): 0 of 331 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 0 times; `ShapeEngine.UI` (8 types in 8 files): 59 of 521 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 248 times; `ShapeEngine.Content` (5 types in 3 files): 0 of 602 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 444 times. Extract each into its own project.
D27 · Navigability · Pass-through layer · ×1
  • Pass-through layer ShapeEngine/Core/GameDef/GameCustomEvent.cs:6 — Game: all 4 public methods forward their arguments unchanged to customEvents and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call customEvents directly, or give the layer a job.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:8 — No static application security testing detected. For this repository's stack, add CodeQL's csharp pack, or a .NET security analyzer package (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 5 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.
P3 · Security & performance tooling · Dependabot does not watch github-actions · ×1
  • Dependabot does not watch github-actions REDACTED:2 — `REDACTED` schedules updates, but no `package-ecosystem` entry covers `github-actions`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
X2 · Cancellation propagation · Not all async methods take a CancellationToken · ×1
  • Not all async methods take a CancellationToken — Only 3/7 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
X7 · Silent fallback defaults · Silent fallback default in catch · ×1
  • Silent fallback default in catch ResourcePacker/Program.cs:782 — `ProcessArguments` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Minor — 1 finding(s)
D24 · Comment Value · doc comments repeat the names · ×1
  • doc comments repeat the names ShapeEngine/Achievements/Achievement.cs:68 — 278 of 11236 documented parameters and 146 of 8556 summaries in `ShapeEngine` only repeat the member or parameter name (e.g. "The increment value for notifications." for `notificationIncrement`). 85 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-8ae51fdcc605415db33fdf56911e648f/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-8ae51fdcc605415db33fdf56911e648f/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=1606" --report-format json --report-path /tmp/watchdog-gitleaks-8ae51fdcc605415db33fdf56911e648f/history-2.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-8ae51fdcc605415db33fdf56911e648f/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .23artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesdotnet—dotnet list ShapeEngine.sln package --vulnerable --include-transitive --format json0artifacts/raw/dotnet-vulnerable.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 19 file(s) — `Examples/Scenes/ExampleScenes/PathfinderExample.cs`, `Examples/Scenes/ExampleScenes/PhysicsExampleSource/Asteroid.cs`, `Examples/Scenes/ExampleScenes/ShapeIntersectionExample.cs`, `ShapeEngine/Core/Curve.cs`, `ShapeEngine/Core/CurveColor.cs`, … (+14 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—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.0—
D41 · Kernel & Syscall Confinementruntime-hardening—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.0—
D42 · Runtime Threat Enforcementruntime-hardening—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.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm . /tmp/codehealth-osv-sbom-9e8836f7cda6408ebef0d57fc17208130artifacts/raw/osv-scanner.json

Run 01a1e6da-aff0-7d47-af64-d81391f2df78 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

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.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md