Public report of miragedmuk/ASV, published 16 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive 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, 16 November 2026, 20:26 UTC · Survey ID cd_322194b8ef2349619e561e4cf2e7c677

miragedmuk/ASV

Measured 16 November 2026, 20:25 UTC, at code version beb4bbb

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 37.3out 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 medium codebase: 37,145 lines of product code in 8 projects, tests not counted · Estimated rebuild effort: about 2.6 person-years · Weakest lens: Production Readiness, 24.0

Findings by how serious they are

65 critical 912 serious 196 minor

3 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
16 November 2026, 20:25 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 ▸

52of 52 dimensions measured by tools.
1154of 1173 findings point to an exact file and line, so you can open each one in the code. The other 19 concern the repository as a whole, such as missing documentation.
52dimensions across 6 lenses, read from 37,145 lines of product code in 8 projects.
Chapters

Executive summary

miragedmuk/ASV falls short of our standard for production because the project has no automated tests and we found no working pipeline that builds or tests changes to the code. It scores 37.3 out of 100 and is rated Weak, and none of its 65 critical findings concern security.

Production Readiness, at 24.0, is the weakest lens and counts most in the score. The best first step for the work it takes is recording design decisions, worth about 6.8 points. Adding automated tests would lift Production Readiness itself, worth about 12.6 points. Raising Production Readiness to 70 would lift the score to about 48.4.

The project has no automated tests, so a change can break it without warning. Forty-one errors are caught and ignored, so failures can go unnoticed. Adding automated tests and handling or logging the ignored errors would close both risks. The 17 data fields that are written but never read need removing.

The product code is 37,145 lines, about €370,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.
Production Readiness 24.0 · counts for 46%Maturity 35.2 · counts for 25%Code Health 44.3 · counts for 14%Architecture 70.1 · counts for 8%Security and Compliance 77.2 · counts for 4%Performance 100.0 · counts for 2%

If Production Readiness rose from 24.0 to 70, the lowest score rated Strong, the score would rise from 37.3 to about 48.4.

Code composition: what the lines of code are
Business logic 46%Supporting code 19%Generated by tools 35%
Rebuild cost: about €370,000 · Estimate
Cost to rebuild€120,000 to €630,000, for 2,007 to 6,619 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 37. 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.
SizeMedium: 37,145 lines of product code, of which 15% is declarations and boilerplate, 14% straight logic and 71% logic with branches
Comment linesThe estimate prices 35,360 lines. Comment lines count towards the size of 37,145 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
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with ASVBot - Backup.csproj.
Raises the score by about 6.8 points · Low effort · ADR Quality
2
Resolve the 81 Orphaned file finding(s) in Knowledge Freshness — start with Program.cs (3), ASVDataManager.cs, frmSettings.cs.
Raises the score by about 6.7 points · Medium effort · Knowledge Freshness
3
Resolve the 3 Outdated finding(s) in Dependency Hygiene — start with ArkViewer.csproj, ASVBot.csproj, AsaSavegameToolkit.csproj.
Raises the score by about 3.2 points · Low effort · Dependency Hygiene

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 €370,000 to build again, about 2.6 person-years of work. Its weakest lens is Production Readiness, at 24.0 (Critical). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
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 3.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 11% to 26% on every change. The history of the code shows how much it changes: about 21 lines over the last 90 days, which is about 85 lines a year. At that pace, the extra work comes to an estimated 0 to 0.1 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.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 6.8 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

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 ASVBot ASVBot ASVPack ASVPack ASVBot->ASVPack ASVBot - Backup ASVBot - Backup ASVBot - Backup->ASVPack ASVExport ASVExport ASVExport->ASVPack AsaSavegameToolkit AsaSavegameToolkit ASVPack->AsaSavegameToolkit SavegameToolkit SavegameToolkit ASVPack->SavegameToolkit SavegameToolkitAdditions SavegameToolkitAdditions ASVPack->SavegameToolkitAdditions ArkViewer ArkViewer ArkViewer->ASVPack SavegameToolkitAdditions->SavegameToolkit

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.

29 modules, with 54 dependencies between them. 3 loops run through 11 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 ARKViewer.Models.NameMap2 ASVBot.Config3 ASVBot.Data4 ASVExport5 ArkViewer.Configuration6 ArkViewer.Models7 ArkViewer.UI8 AsaSavegameToolkit.Extensions9 AsaSavegameToolkit.Propertys10 SavegameToolkitAdditions.IndexMappings11 ASVPack12 AsaSavegameToolkit.Structs13 AsaSavegameToolkit.Types14 SavegameToolkit.Types15 AsaSavegameToolkit16 SavegameToolkit.Structs17 SavegameToolkit.Data18 SavegameToolkit.Propertys19 SavegameToolkit.Arrays20 SavegameToolkit21 ASVPack.Models22 SavegameToolkitAdditions23 ARKViewer.Models24 ASVBot25 ASVBot.Commands26 ASVPack.Extensions27 ArkViewer28 ARKViewer.Configuration29 ARKViewer
1 ARKViewer.Models.NameMap
2 ASVBot.Config
3 ASVBot.Data
4 ASVExport
5 ArkViewer.Configuration
6 ArkViewer.Models
7 ArkViewer.UI
8 AsaSavegameToolkit.Extensions
9 AsaSavegameToolkit.Propertys
10 SavegameToolkitAdditions.IndexMappings
11 ASVPack1
12 AsaSavegameToolkit.Structs6
13 AsaSavegameToolkit.Types1
14 SavegameToolkit.Types13
15 AsaSavegameToolkit633
16 SavegameToolkit.Structs2128
17 SavegameToolkit.Data1119
18 SavegameToolkit.Propertys221141
19 SavegameToolkit.Arrays211939
20 SavegameToolkit9192
21 ASVPack.Models210110
22 SavegameToolkitAdditions25
23 ARKViewer.Models14
24 ASVBot112
25 ASVBot.Commands174
26 ASVPack.Extensions2214
27 ArkViewer13
28 ARKViewer.Configuration6113
29 ARKViewer322119714
Uses a module listed above itPart of a loopThe module itself
1 ARKViewer.Models.NameMap2 ASVBot.Config3 ASVBot.Data4 ASVExport5 ArkViewer.Configuration6 ArkViewer.Models7 ArkViewer.UI8 AsaSavegameToolkit.Extensions9 AsaSavegameToolkit.Propertys10 SavegameToolkitAdditions.IndexMappings11 ASVPack12 AsaSavegameToolkit.Structs13 AsaSavegameToolkit.Types14 SavegameToolkit.Types15 AsaSavegameToolkit16 SavegameToolkit.Structs17 SavegameToolkit.Data18 SavegameToolkit.Propertys19 SavegameToolkit.Arrays20 SavegameToolkit21 ASVPack.Models22 SavegameToolkitAdditions23 ARKViewer.Models24 ASVBot25 ASVBot.Commands26 ASVPack.Extensions27 ArkViewer28 ARKViewer.Configuration29 ARKViewerARKViewer.Models.NameMap1ASVBot.Config2ASVBot.Data3ASVExport4ArkViewer.Configuration5ArkViewer.Models6ArkViewer.UI7AsaSavegameToolkit.Extensions8AsaSavegameToolkit.Propertys9SavegameToolkitAdditions.IndexMappings10ASVPack11AsaSavegameToolkit.Structs12AsaSavegameToolkit.Types13SavegameToolkit.Types14AsaSavegameToolkit15SavegameToolkit.Structs16SavegameToolkit.Data17SavegameToolkit.Propertys18SavegameToolkit.Arrays19SavegameToolkit20ASVPack.Models21SavegameToolkitAdditions22ARKViewer.Models23ASVBot24ASVBot.Commands25ASVPack.Extensions26ArkViewer27ARKViewer.Configuration28ARKViewer291611363321281119221141211939919221011025141121742214136113322119714

At a glance — Code Health · 44.3 · Weak · gated by D1, D2, D4, X1, X3 ·

At a glance — Architecture · 70.1 · Adequate · gated by AX2 ·

At a glance — Maturity · 35.2 · Weak · gated by D34, M2 ·

At a glance — Readiness · 24.0 · Critical · gated by D8, P1, P3 ·

At a glance — Security · 77.2 · Strong ·

At a glance — Performance · 100.0 · Exemplary ·

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

Roadmap

Top priorities: Resolve the 1 No automated tests finding(s) in Code Coverage; Resolve the 1 No ADRs found finding(s) in ADR Quality — start with ASVBot - Backup.csproj; Resolve the 81 Orphaned file finding(s) in Knowledge Freshness — start with Program.cs (3), ASVDataManager.cs, frmSettings.cs.

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

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with ASVBot - Backup.csproj.+6.8 ptsLowADR Quality
Resolve the 81 Orphaned file finding(s) in Knowledge Freshness — start with Program.cs (3), ASVDataManager.cs, frmSettings.cs.+6.7 ptsMediumKnowledge Freshness
Resolve the 3 Outdated finding(s) in Dependency Hygiene — start with ArkViewer.csproj, ASVBot.csproj, AsaSavegameToolkit.csproj.+3.2 ptsLowDependency Hygiene
Resolve the 1 No automated tests finding(s) in Code Coverage.+12.6 ptsHighCode Coverage
Add a CI workflow that builds and runs the test suite on every push/PR.+5.7 ptsMediumCI/CD gates
Run 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 — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.+5.7 ptsMediumSecurity & performance tooling
Resolve the 1 DeadLoopAccumulator finding(s) in Explicit Debt — start with frmViewer.cs.+2.8 ptsLowExplicit Debt
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.+4.8 ptsMediumArchitecture documentation

File quality

Per-file score 0–10 — a quality signature. Of 118 files carrying findings, judged against the Production bar: 9% slop · 52% mixed · 39% near-clean.

FileScoreBandWorst signal
ASVPack/Models/ContentContainer.cs1.0SlopExplicit Debt: EmptyCatchBlock
ASVPack/Models/ContentPack.cs1.0SlopExplicit Debt: EmptyCatchBlock
ArkViewer/UI/frmViewer.cs1.0SlopExplicit Debt: EmptyCatchBlock
ASVExport/Program.cs1.0SlopExplicit Debt: EmptyCatchBlock
REDACTED1.0SlopExplicit Debt: EmptyCatchBlock
AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegame.cs1.0SlopExplicit Debt: EmptyCatchBlock
ASVPack/Models/ContentPlayer.cs1.1SlopExplicit Debt: EmptyCatchBlock
ArkSavegameToolkit/SavegameToolkit/GameObject.cs2.2SlopExplicit Debt: EmptyCatchBlock
ArkViewer/Program.cs2.9SlopExplicit Debt: EmptyCatchBlock
ArkSavegameToolkit/SavegameToolkit/ArkArchive.cs3.2SlopExplicit Debt: WriteOnlyPrivateField
AsaSavegameToolkit/AsaSavegameToolkit/AsaPropertyRegistry.cs3.6SlopExplicit Debt: EmptyCatchBlock
ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs4.2MixedExplicit Debt: EmptyCatchBlock
ArkViewer/UI/frmMapView.cs4.3MixedExplicit Debt: EmptyCatchBlock
ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs4.6MixedExplicit Debt: WriteOnlyPrivateField
ArkSavegameToolkit/SavegameToolkitAdditions/ObjectCollector.cs4.6MixedExplicit Debt: EmptyCatchBlock
ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs4.7MixedExplicit Debt: WriteOnlyPrivateField
ASVPack/Models/DrawingContainer.cs4.7MixedExplicit Debt: EmptyCatchBlock
ArkViewer/UI/frmAddLocalARK.cs4.7MixedExplicit Debt: EmptyCatchBlock
ArkViewer/UI/ChartControl.cs4.8MixedExplicit Debt: EmptyCatchBlock
AsaSavegameToolkit/AsaSavegameToolkit/AsaTribeStore.cs4.9MixedExplicit Debt: EmptyCatchBlock

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

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

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

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

Could not be resolved — 3

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 52 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 — 52 dimensions across the health lenses
D1D2D3D4D5D6D8D12D13D14D15D17D18D20D24D26D27D29D34D35D43D44AX1AX10AX2AX3AX4AX5AX6GD1IC1M1M2M3P1P2P3P6PF3S1X1X12X13X16X18X21X23X27X29X3X30X5

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, 1154 of 1173 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 01a1e609-2159-7db2-bae0-fc2d63778898.

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-contributor repository — bus factor is not applicable (1 contributor(s) across 155 commit(s) sampled, automation and bot accounts excluded). Concentration needs a team to concentrate: with one contributor there is nobody to spread the knowledge to, so there is nothing here for the owner to act on.
  • D19 Documentation Quality — 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 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.
  • D22 Internal API Consistency — 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. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
  • 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 (37,145 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"]`.
  • D28 Secrets (history) — 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. `gitleaks` TIMED OUT after 75.1s against a 75s budget, so we killed its process tree. The budget is ours; the work may simply be larger than it allows. Nothing about this repository is asserted by the absence of a result; the budget is ours to raise, and raising it is our backlog item, not an action for this repository's owner.
  • 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. `ArkViewer/UI/frmSettings.Designer.cs`, `ArkViewer/UI/frmViewer.Designer.cs`, `ArkViewer/UI/frmViewer.cs` 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.
  • 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. 142 further occurrence(s) are not listed individually; the score already reflects all 182.
  • X18 Disposal-pattern correctness — 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. 3 further occurrence(s) are not listed individually; the score already reflects all 43.
  • X3 Exception handling — 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. 6 further occurrence(s) are not listed individually; the score already reflects all 46.
  • X5 Nullable reference types — 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. 1 further occurrence(s) are not listed individually; the score already reflects all 41.

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.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • 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.
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • 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.
  • 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 Complexity2.7 / 10Weak✓ 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 2.7 / 10 · rule-coverage 100% · ceiling Prevented

87 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ContentContainer.LoadArkAscendedData at 162. A further 4 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 ASVDataManager.GetPlayerStructures at 19 — they are counted neither in the figure above nor in this dimension's score.

Program.ExportCommandLinePack (cyclomatic 22) · ×2ASVExport/Program.cs:222
ContentContainer.LoadArkAscendedData (cyclomatic 162)ASVPack/Models/ContentContainer.cs:1849
ContentContainer.LoadArkEvolvedData (cyclomatic 159)ASVPack/Models/ContentContainer.cs:472
ContentPack.LoadGameData (cyclomatic 110)ASVPack/Models/ContentPack.cs:2074
frmViewer.mnuContext_ExportData_Click (cyclomatic 92)ArkViewer/UI/frmViewer.cs:2871

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

What to do

  1. Bring the 6 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with ContentContainer.LoadArkAscendedData (cyclomatic 162), ContentContainer.LoadArkEvolvedData (cyclomatic 159), ContentPack.LoadGameData (cyclomatic 110). — 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 Cyclomatic Complexity from 2.7 to about 4.9/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 Complexity2.0 / 10Critical✓ 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 2.0 / 10 · rule-coverage 100% · ceiling Prevented

131 method(s) exceeded the cognitive complexity threshold of 15; the worst was frmViewer.mnuContext_ExportData_Click at 471.

Program.ExportCommandLinePack (cognitive 37) · ×2ASVExport/Program.cs:222
ContentTamedCreature.ContentTamedCreature.ctor (cognitive 17) · ×2ASVPack/Models/ContentTamedCreature.cs:63
frmViewer.mnuContext_ExportData_Click (cognitive 471)ArkViewer/UI/frmViewer.cs:2871
ContentContainer.LoadArkAscendedData (cognitive 458)ASVPack/Models/ContentContainer.cs:1849
ContentContainer.LoadArkEvolvedData (cognitive 408)ASVPack/Models/ContentContainer.cs:472

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

What to do

  1. Bring the 131 bodies over 15 down to 15 or less in Cognitive Complexity — start with frmViewer.mnuContext_ExportData_Click (cognitive 471), ContentContainer.LoadArkAscendedData (cognitive 458), ContentContainer.LoadArkEvolvedData (cognitive 408). — 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 131 together lifts Cognitive Complexity from 2.0 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.

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

D3 · God Classes8.2 / 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 8.2 / 10 · rule-coverage 100% · ceiling Prevented

40 god class(es) detected.

MethodTooLong: ContentContainer.LoadArkEvolvedData · ×23ASVPack/Models/ContentContainer.cs:472
ClassTooLong: ContentPack · ×8ASVPack/Models/ContentPack.cs
FileTooLong: UI/frmViewer.cs · ×7ArkViewer/UI/frmViewer.cs
TooManyMethods: frmViewer · ×2ArkViewer/UI/frmViewer.cs

What to do

  1. Resolve the 23 MethodTooLong finding(s) in God Classes — start with frmViewer.cs (6), ContentContainer.cs (3), ContentPack.cs (3). — One of this dimension's main actionable groups (23 warning-level).
  2. Resolve the 8 ClassTooLong finding(s) in God Classes — start with ContentPack.cs, ContentContainer.cs, frmBreedingLines.cs. — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 7 FileTooLong finding(s) in God Classes — start with frmViewer.cs, ContentPack.cs, ContentContainer.cs. — One of this dimension's main actionable groups (7 warning-level).

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

D4 · Code Duplication0.0 / 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.0 / 10 · rule-coverage 100% · ceiling Verified

244 duplicated block group(s) detected. 28.2 % of the production lines (10,488 of 37,145) are in a reported copy. A further 86 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (7 lines × 2) · ×12REDACTED:499
Duplicated block (8 lines × 2) · ×11REDACTED:191
Duplicated block (12 lines × 2) · ×6ArkViewer/UI/frmBreedingLines.cs:618
Duplicated block (9 lines × 2) · ×6ASVPack/Models/ContentContainer.cs:2413
Duplicated block (11 lines × 2) · ×6ASVExport/Program.cs:279

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

What to do

  1. Resolve the 12 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with frmViewer.cs (2), Program.cs (2), PlayerCommands.cs (2). — One of this dimension's main actionable groups (12 warning-level).
  2. Resolve the 11 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with frmBreedingLines.cs (3), ContentContainer.cs (2), frmSettings.cs (2). — One of this dimension's main actionable groups (11 warning-level).
  3. Resolve the 6 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with frmBreedingLines.cs, frmViewer.cs, ContentContainer.cs. — One of this dimension's main actionable groups (6 warning-level).

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

D5 · Coupling9.0 / 10Stronggated by 1 serious finding✓ 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 9.0 / 10 · rule-coverage 100% · ceiling Prevented

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

Off the main sequence: SavegameToolkitArkSavegameToolkit/SavegameToolkit/SavegameToolkit.csproj:1

What to do

  1. Resolve the 1 Off the main sequence finding(s) in Coupling — start with SavegameToolkit.csproj. — One of this dimension's main actionable groups (1 warning-level).

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

D6 · Cohesion (LCOM4)8.9 / 10Strong✓ 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 8.9 / 10 · rule-coverage 100% · ceiling Verified

6 of 67 classes have LCOM4 above 3.

Low cohesion: frmViewer (LCOM4 47) · ×6ArkViewer/UI/frmViewer.cs:40

What to do

  1. Resolve the 6 Low cohesion finding(s) in Cohesion (LCOM4) — start with frmViewer.cs, frmSettings.cs, frmBreedingLines.cs. — One of this dimension's main actionable groups (6 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 Hygiene9.3 / 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 9.3 / 10 · rule-coverage 100% · ceiling Verified

14 outdated, 1 vulnerable, 0 deprecated packages.

Outdated: FluentFTP · ×3ArkViewer/ArkViewer.csproj:4329
Outdated: Microsoft.IO.RecyclableMemoryStream · ×11

✓ On the Gold path — maintain.

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.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 168 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 16 direct `PackageReference`(s), and 144 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution.

✓ 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 Debt5.3 / 10Adequate✓ 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 5.3 / 10 · rule-coverage 100% · ceiling Prevented

86 deducted debt markers + 108 dead symbols across 37145 LoC in the .NET projects (2.3/KLoC) → score 5.3.

EmptyCatchBlock · ×41ASVBot/Data/DiscordPlayerManager.cs:108
WriteOnlyPrivateField · ×17ASVPack/Models/ContentPack.cs:74
DeadLoopAccumulatorArkViewer/UI/frmViewer.cs:3880
Dead code: TRIBE_START · ×108ASVPack/Extensions/AsaExtensions.cs:18
CommentedOutCode · ×17ASVExport/Program.cs:474

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

What to do

  1. Resolve the 41 EmptyCatchBlock finding(s) in Explicit Debt — start with AsaSavegame.cs (5), Program.cs (4), ContentContainer.cs (4). — One of this dimension's main actionable groups (41 issue-level).
  2. Resolve the 17 WriteOnlyPrivateField finding(s) in Explicit Debt — start with REDACTED (4), ArkLocalProfile.cs (2), ContentPack.cs. — One of this dimension's main actionable groups (17 issue-level).
  3. Resolve the 1 DeadLoopAccumulator finding(s) in Explicit Debt — start with frmViewer.cs. — One of this dimension's main actionable groups (1 issue-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

7 projects, 241 source files, 37145 hand-written lines of code (37145 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), plus 18979 generated (machine-written code — designer, scaffolded and tool-emitted files — excluded from quality), 7 inter-project edges.

Duplicate project file: ASVBot - BackupASVBot/ASVBot - Backup.csproj

✓ On the Gold path — maintain.

Detailed fixes: d18_recommendation.md · top locations in Appendix A, every location in findings.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 foundASVBot/ASVBot - Backup.csproj:4

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with ASVBot - Backup.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.

D24 · Comment Value5.2 5.1 / 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 5.1 / 10 · rule-coverage 98% · ceiling Documented

31 of 644 judged comments only repeat the code they sit on (4.8 %). 22 comment(s) in another language or script were not judged.

redundant comment · ×21ASVBot/Commands/AdminCommands.cs:243
doc comments repeat the names · ×3AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:61

What to do

  1. Resolve the 21 redundant comment finding(s) in Comment Value — start with AssemblyInfo.cs (4), Program.cs (3), ASVDataManager.cs (3). — One of this dimension's main actionable groups (21 recommendation-level).

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

D26 · Project Cohesion10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 of 8 projects flagged as possibly oversized/incoherent.

✓ On the Gold path — maintain.

Detailed fixes: d26_recommendation.md.

D27 · Navigability4.8 / 10Weak✓ 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 4.8 / 10 · rule-coverage 100% · ceiling Documented

87 % of calls cross a namespace and 3 % go through an interface, but 44 % of collaborators are co-located — so following a call takes several hops. Baseline: medium — clean/modular boundaries expected.

Scattered collaborators

What to do

  1. Resolve the 1 Scattered collaborators finding(s) in Navigability. — 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.

D29 · Static Analysis (SAST)9.0 / 10Stronggated by 2 serious findings✓ 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 9.0 / 10 · rule-coverage 100% · ceiling Documented

2 finding(s): 0 critical, 0 high, 2 medium, 0 low. semgrep hit a parse error in 6 file(s) — `ASVPack/Models/ContentContainer.cs`, `ASVPack/Models/ContentPack.cs`, `ArkViewer/Models/ASVDataManager.cs`, `ArkViewer/UI/frmSettings.Designer.cs`, `ArkViewer/UI/frmViewer.Designer.cs`, … (+1 more) — so no absence of findings in them is evidence of anything, and nothing in them was analysed. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).

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

D34 · Knowledge Freshness0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

84 of 84 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is ArkViewer/UI/frmViewer.cs. Counted over 84 of the 241 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×81ArkViewer/Models/ASVDataManager.cs:1
Most significant orphaned file · ×3ArkViewer/UI/frmViewer.cs:1
Dormant codebase

What to do

  1. Resolve the 81 Orphaned file finding(s) in Knowledge Freshness — start with Program.cs (3), ASVDataManager.cs, frmSettings.cs. — One of this dimension's main actionable groups (81 recommendation-level).
  2. Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with frmViewer.cs, ContentContainer.cs, ContentPack.cs. — One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling9.9 / 10Adequategated by 1 critical finding✓ 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.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: AdminCommands.cs↔PlayerCommands.cs 75%; frmViewer.cs↔AsaSavegame.cs 58%

Boundary-crossing change coupling: frmViewer.cs ↔ AsaSavegame.csArkViewer/UI/frmViewer.cs:1
Change coupling: AdminCommands.cs ↔ PlayerCommands.csASVBot/Commands/AdminCommands.cs:1

What to do

  1. Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with frmViewer.cs. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Change coupling finding(s) in Change Coupling — start with AdminCommands.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.

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-Life6.0 / 10Adequate✓ 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 6.0 / 10 · rule-coverage 100% · ceiling Documented

1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 8 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.

End-of-life runtime: .NET net6.0 · ×8ASVBot/ASVBot - Backup.csproj:5

What to do

  1. Resolve the 8 End-of-life runtime finding(s) in Platform End-of-Life — start with ASVBot - Backup.csproj, ASVBot.csproj, ASVExport.csproj. — One of this dimension's main actionable groups (8 warning-level).

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

Frontend & cross-cutting dimensions

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

AX1 · Captive dependencies10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.

Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.

AX10 · Code composition9.6 / 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.

  • `BotConfig` is a singleton (one shared instance) but mutates instance state outside any lock (ArkSaveFile, ArkClusterFolder, AutoReloadTimeMinutes, DiscordBotToken, DiscordServerId; e.g. `ArkSaveFile` at line 44). — ASVBot/Config/BotConfig.cs:13
  • `ViewerConfiguration` is not registered, but `Program` creates it and keeps it in the static `ProgramConfig`, 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 (EncryptionPassword, Mode, SelectedFile, SelectedServer, ClusterFolder, ColourMap; e.g. `EncryptionPassword` at line 137). — ArkViewer/Configuration/ViewerConfiguration.cs:33
  • `frmMapToolboxMarkers` keeps one instance of itself in the static `inst`, 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 (isLoading, SortingColumn_Markers; e.g. `isLoading` at line 134). — ArkViewer/UI/frmMapToolboxMarkers.cs:14
  • `frmMapToolboxStructures` keeps one instance of itself in the static `inst`, 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 (SortingColumn_Structures; e.g. `SortingColumn_Structures` at line 698). — ArkViewer/UI/frmMapToolboxStructures.cs:18
  • `frmMapView` keeps one instance of itself in the static `inst`, 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 (currentMapImage, mapMouseDownX, mapMouseDownY, mapMouseDownZoom; e.g. `currentMapImage` at line 288). — ArkViewer/UI/frmMapView.cs:13
  • `ContentContainer` is not registered, but `Program` creates it and keeps it in the static `arkPack`, 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 (logWriter, GameSaveTime, GameSeconds, MapStructures, WildCreatures, Tribes; e.g. `logWriter` at line 74). — ASVPack/Models/ContentContainer.cs:22
  • `GameObject` 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 (uuidCache; e.g. `uuidCache` at line 242). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ArkSavegameToolkit/SavegameToolkit/GameObject.cs:15
  • `ArkName` 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 (constantNameCache, _nameCache; e.g. `constantNameCache` at line 104). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:9
  • `AsaName` 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 (constantNameCache, _nameCache; e.g. `constantNameCache` at line 111). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:5

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 AsaSavegameToolkit ↔ AsaSavegameToolkit.Structs ↔ AsaSavegameToolkit.Types depend on each other. The lightest dependency in the cycle is AsaSavegameToolkit.Types → AsaSavegameToolkit (AsaSavegameToolkit.Types.AsaObjectReference → AsaSavegameToolkit.AsaArchive, 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. — AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaObjectReference.cs:10
  • The namespaces SavegameToolkit ↔ SavegameToolkit.Arrays ↔ SavegameToolkit.Data ↔ SavegameToolkit.Propertys ↔ SavegameToolkit.Structs ↔ SavegameToolkit.Types depend on each other. The lightest dependency in the cycle is SavegameToolkit → SavegameToolkit.Data (SavegameToolkit.GameObject → SavegameToolkit.Data.IExtraData, 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. — ArkSavegameToolkit/SavegameToolkit/GameObject.cs:9
  • The namespaces ASVPack ↔ ASVPack.Models depend on each other. The lightest dependency in the cycle is ASVPack → ASVPack.Models (ASVPack.ContentMapPack → ASVPack.Models.ContentMap, 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. — ASVPack/ContentMapPack.cs:2

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 & structure10.0 / 10Exemplary✓ 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.

AX6 · Interface segregation10.0 / 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.

GD1 · Unfinished & placeholder code9.9 / 10Exemplary✓ Tool-verified

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.

  • A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface. (×4) — ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayUnknown.cs:22, ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayUnknown.cs:26, ArkSavegameToolkit/SavegameToolkit/Structs/StructUnknown.cs:22, …

What to do

  • Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
IC1 · Incompleteness & stubs7.3 / 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.

  • `FtpClient_ValidateCertificate1` is a shipped member whose body only throws — and it is REACHED: ArkViewer/UI/frmViewer.cs:4547 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — ArkViewer/UI/frmViewer.cs:4591
  • `ArkArrayUnknown` has 2 unfinished members out of 4 declared members (methods, properties, indexers and events, whether or not each carries a body) — a scaffolded type that was never implemented. — ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayUnknown.cs:8
  • `Init` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. (×3) — ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayUnknown.cs:22, ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayUnknown.cs:26, ArkSavegameToolkit/SavegameToolkit/Structs/StructUnknown.cs:22
  • `CalculateSize` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. (×2) — ArkSavegameToolkit/SavegameToolkit/Data/ExtraDataCharacter.cs:5, ArkSavegameToolkit/SavegameToolkit/Data/ExtraDataZero.cs:7
  • 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. — ArkViewer/UI/frmFtpFileBrowser.cs:354
  • A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers). (×32) — ASVBot/Commands/PlayerCommands.cs:153, ASVExport/Program.cs:51, ASVExport/Program.cs:62, …

What to do

  • Finish or delete the unfinished stubs (NotImplementedException / empty / constant-returning bodies) — they are dead surface that looks live.
  • 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)4.6 / 10Weak✓ 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.

  • The root README is 25 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, in the README and in the repository documents it links, it found no a build/run or getting-started section, no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers. — README.md:1

What to do

  • Expand the README with getting-started, architecture overview and a project map.
  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • 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.

P1 · CI/CD gates0.0 / 10Critical✓ 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.

  • No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.

What to do

  • Add a CI workflow that builds and runs the test suite on every push/PR.
P2 · Observability7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

P3 · Security & performance tooling0.0 / 10Critical✓ 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) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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.
  • `ASVBot/ASVBot - Backup.csproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — ASVBot/ASVBot - Backup.csproj:21

What to do

  • Run 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 — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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 hygiene10.0 / 10Exemplary✓ 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.

S1 · Cryptographic Hygiene8.0 / 10Strong✓ Tool-verified

Other · Security — Cryptographic hygiene (weak hash/cipher, password key-derivation). This codebase has no web surface, so transport/header/cookie/CSRF controls are N/A and only crypto is scored.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • This type encrypts through `SymmetricAlgorithm`, whose every cipher mode (CBC/ECB/OFB/CFB/CTS) is unauthenticated, and no keyed MAC or AEAD cipher appears anywhere in it — so nothing establishes that the ciphertext it produced is the ciphertext it later reads back. Encryption alone provides confidentiality, not integrity: unauthenticated CBC is MALLEABLE, and an attacker who can modify stored or transmitted ciphertext can flip chosen plaintext bits in the following block by flipping ciphertext bits in the preceding one, without ever knowing the key. Where the decrypt path reports failure differently for a padding error than for a downstream one — a broad `catch` that returns null is the usual spelling — the same construction also answers the attacker's questions, which is the padding-oracle shape that recovers plaintext outright. Prefer an AEAD cipher: `AesGcm` or `ChaCha20Poly1305` authenticate the ciphertext as part of encrypting it, and give you an associated-data slot for the surrounding context. Where the format cannot change, MAC it with encrypt-then-MAC — HMAC-SHA256 over the IV and the ciphertext together, with a key derived separately from the encryption key — and verify that tag with `CryptographicOperations.FixedTimeEquals` BEFORE decrypting anything. — ArkViewer/Models/ViewerEncryption.cs:30

What to do

  • Authenticate ciphertext, do not just encrypt it: move to an AEAD cipher (`AesGcm`, `ChaCha20Poly1305`), or where the wire format is fixed, add encrypt-then-MAC with HMAC-SHA256 over IV+ciphertext under a separately derived key and verify the tag with `CryptographicOperations.FixedTimeEquals` before decrypting. Unauthenticated CBC is malleable, and a decrypt path that distinguishes padding failures from other failures is a padding oracle.
X1 · Async correctness3.3 / 10Weak✓ 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.

  • `Task.WaitAll` blocks this thread until the tasks complete — sync-over-async: it can deadlock under a synchronization context and it parks a thread for as long as the work runs. `await Task.WhenAll(…)` instead. (×2) — ASVPack/Models/ContentPack.cs:207, ArkViewer/Models/ASVDataManager.cs:779
  • `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained. (×8) — ArkViewer/UI/frmAddLocalARK.cs:153, ArkViewer/UI/frmFtpFileBrowser.cs:524, ArkViewer/UI/frmViewer.cs:245, …
  • `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin. (×13) — ASVBot/Commands/AdminCommands.cs:65, ASVBot/Commands/AdminCommands.cs:292, ASVBot/Commands/AdminCommands.cs:347, …

What to do

  • Sync-over-async (deadlock risk) through `Task.WaitAll`
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.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. 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 `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. 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.7 / 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.

  • `blankCanvas` is a `SKCanvas`, which implements `IDisposable`, and it is created here (line 59). Every use of it in `GenerateBitmap` 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 blankCanvas = …;`), which releases it at the end of the scope on every path including a throw. — ASVPack/Models/ContentPainting.cs:59
  • `canvas` is a `SKCanvas`, which implements `IDisposable`, and it is created here (line 55). Every use of it in `SaveMapImageTamed` 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 canvas = …;`), which releases it at the end of the scope on every path including a throw. — ASVPack/Models/DrawingContainer.cs:55
  • `canvas` is a `SKCanvas`, which implements `IDisposable`, and it is created here (line 109). Every use of it in `SaveMapImageItems` 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 canvas = …;`), which releases it at the end of the scope on every path including a throw. — ASVPack/Models/DrawingContainer.cs:109
  • `canvas` is a `SKCanvas`, which implements `IDisposable`, and it is created here (line 221). Every use of it in `SaveMapImageStructures` 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 canvas = …;`), which releases it at the end of the scope on every path including a throw. — ASVPack/Models/DrawingContainer.cs:221
  • `canvas` is a `SKCanvas`, which implements `IDisposable`, and it is created here (line 275). Every use of it in `SaveMapImageWild` 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 canvas = …;`), which releases it at the end of the scope on every path including a throw. — ASVPack/Models/DrawingContainer.cs:275
  • `aes` is a `Aes`, which implements `IDisposable`, and it is created here (line 507). Every use of it in `Load` 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 aes = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/Configuration/ViewerConfiguration.cs:507
  • `aes` is a `Aes`, which implements `IDisposable`, and it is created here (line 546). Every use of it in `configFromJson` 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 aes = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/Configuration/ViewerConfiguration.cs:546
  • `cipher` is a `Aes`, which implements `IDisposable`, and it is created here (line 27). Every use of it in `Encrypt` 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 cipher = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/Models/ViewerEncryption.cs:27
  • `cryptTransform` is a `ICryptoTransform`, which implements `IDisposable`, and it is created here (line 30). Every use of it in `Encrypt` 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 cryptTransform = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/Models/ViewerEncryption.cs:30
  • `cipher` is a `Aes`, which implements `IDisposable`, and it is created here (line 39). Every use of it in `Decrypt` 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 cipher = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/Models/ViewerEncryption.cs:39
  • `cryptTransform` is a `ICryptoTransform`, which implements `IDisposable`, and it is created here (line 42). Every use of it in `Decrypt` 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 cryptTransform = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/Models/ViewerEncryption.cs:42
  • `report` is a `frmErrorReport`, which implements `IDisposable`, and it is created here (line 195). Every use of it in `CurrentDomain_UnhandledException` 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 report = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/Program.cs:195
  • `report` is a `frmErrorReport`, which implements `IDisposable`, and it is created here (line 208). Every use of it in `Application_ThreadException` 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 report = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/Program.cs:208
  • `punchOutPath` is a `GraphicsPath` this type creates itself, and here (line 233) a new instance is written over it — but `ChartControl` creates `punchOutPath` when it is constructed, so every later call finds an instance there, and nothing earlier in `DrawChart` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`punchOutPath?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back. — ArkViewer/UI/ChartControl.cs:233
  • `markerEditor` is a `frmMarkerEditor`, which implements `IDisposable`, and it is created here (line 315). Every use of it in `btnAddMarker_Click` 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 markerEditor = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmMapToolboxMarkers.cs:315
  • `markerEditor` is a `frmMarkerEditor`, which implements `IDisposable`, and it is created here (line 372). Every use of it in `btnEditMarker_Click` 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 markerEditor = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmMapToolboxMarkers.cs:372
  • `saveDialog` is a `SaveFileDialog`, which implements `IDisposable`, and it is created here (line 727). Every use of it in `mnuContextExport_Click` 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 saveDialog = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmMapToolboxStructures.cs:727
  • `colorDialog1` (line 395) is a component the designer creates for `frmMarkerEditor` with no container: it is not built with `new T(components)`, not added to `components`, and not added to a parent control's `Controls` or to a component's own child collection — the only routes by which the framework would release it for you. And the type's disposal never names it: searched `Dispose` (frmMarkerEditor.Designer.cs line 14), plus every method those call by name. So `frmMarkerEditor` owns it and never releases it; whatever it holds (a dialog's window handle, a file-system watch, a process handle) stays until finalization, once per instance. Release it in `Dispose(bool)` (`colorDialog1?.Dispose();` under `disposing`) — that method may be edited, or moved to the hand-written partial; only `InitializeComponent` belongs to the designer — or register it with the container so `components.Dispose()` releases it. — ArkViewer/UI/frmMarkerEditor.Designer.cs:395
  • `mapEditor` is a `frmGenericClassMap`, which implements `IDisposable`, and it is created here (line 954). Every use of it in `btnAddDinoClass_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmSettings.cs:954
  • `mapEditor` is a `frmGenericClassMap`, which implements `IDisposable`, and it is created here (line 980). Every use of it in `btnEditDinoClass_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmSettings.cs:980
  • `mapEditor` is a `frmItemClassMap`, which implements `IDisposable`, and it is created here (line 1225). Every use of it in `btnAddItem_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmSettings.cs:1225
  • `mapEditor` is a `frmItemClassMap`, which implements `IDisposable`, and it is created here (line 1256). Every use of it in `btnEditItem_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmSettings.cs:1256
  • `mapEditor` is a `frmGenericClassMap`, which implements `IDisposable`, and it is created here (line 1474). Every use of it in `btnEditStructure_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmSettings.cs:1474
  • `mapEditor` is a `frmGenericClassMap`, which implements `IDisposable`, and it is created here (line 1529). Every use of it in `btnAddStructure_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmSettings.cs:1529
  • `mapEditor` is a `frmGenericClassMap`, which implements `IDisposable`, and it is created here (line 1994). Every use of it in `btnCreaturesNotMappedAdd_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmSettings.cs:1994
  • `mapEditor` is a `frmItemClassMap`, which implements `IDisposable`, and it is created here (line 2026). Every use of it in `btnItemsNotMatchedAdd_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmSettings.cs:2026
  • `mapEditor` is a `frmGenericClassMap`, which implements `IDisposable`, and it is created here (line 2054). Every use of it in `btnStructuresNotMappedAdd_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmSettings.cs:2054
  • `picker` is a `frmColourEditor`, which implements `IDisposable`, and it is created here (line 2256). Every use of it in `lblVivariumHighlight_Click` 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 picker = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmSettings.cs:2256
  • `picker` is a `frmColourEditor`, which implements `IDisposable`, and it is created here (line 2275). Every use of it in `lblCryopodHighlight_Click` 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 picker = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmSettings.cs:2275
  • `picker` is a `frmColourEditor`, which implements `IDisposable`, and it is created here (line 2291). Every use of it in `lblUploadedHighlight_Click` 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 picker = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmSettings.cs:2291
  • `openFileDialog1` (line 3206) is a component the designer creates for `frmSettings` with no container: it is not built with `new T(components)`, not added to `components`, and not added to a parent control's `Controls` or to a component's own child collection — the only routes by which the framework would release it for you. And the type's disposal never names it: searched `Dispose` (frmSettings.Designer.cs line 14), plus every method those call by name. So `frmSettings` owns it and never releases it; whatever it holds (a dialog's window handle, a file-system watch, a process handle) stays until finalization, once per instance. Release it in `Dispose(bool)` (`openFileDialog1?.Dispose();` under `disposing`) — that method may be edited, or moved to the hand-written partial; only `InitializeComponent` belongs to the designer — or register it with the container so `components.Dispose()` releases it. — ArkViewer/UI/frmSettings.Designer.cs:3206
  • `errorReport` is a `frmErrorReport`, which implements `IDisposable`, and it is created here (line 504). Every use of it in `LoadContent` 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 errorReport = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmViewer.cs:504
  • `settings` is a `frmSettings`, which implements `IDisposable`, and it is created here (line 812). Every use of it in `btnSettings_Click` 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 settings = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmViewer.cs:812
  • `playerViewer` is a `frmPlayerInventoryViewer`, which implements `IDisposable`, and it is created here (line 1067). Every use of it in `btnPlayerInventory_Click` 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 playerViewer = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmViewer.cs:1067
  • `inventoryViewer` is a `frmDinoInventoryViewer`, which implements `IDisposable`, and it is created here (line 1093). Every use of it in `btnDinoInventory_Click` 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 inventoryViewer = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmViewer.cs:1093
  • `logViewer` is a `frmTribeLog`, which implements `IDisposable`, and it is created here (line 1105). Every use of it in `btnPlayerTribeLog_Click` 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 logViewer = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmViewer.cs:1105
  • `exclusionEditor` is a `frmStructureExclusionFilter`, which implements `IDisposable`, and it is created here (line 1272). Every use of it in `btnStructureExclusionFilter_Click` 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 exclusionEditor = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmViewer.cs:1272
  • `logViewer` is a `frmTribeLog`, which implements `IDisposable`, and it is created here (line 2596). Every use of it in `btnTribeLog_Click` 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 logViewer = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmViewer.cs:2596
  • `inventoryViewer` is a `frmStructureInventoryViewer`, which implements `IDisposable`, and it is created here (line 2866). Every use of it in `btnStructureInventory_Click` 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 inventoryViewer = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmViewer.cs:2866
  • `saveDialog` is a `SaveFileDialog`, which implements `IDisposable`, and it is created here (line 2874). Every use of it in `mnuContext_ExportData_Click` 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 saveDialog = …;`), which releases it at the end of the scope on every path including a throw. — ArkViewer/UI/frmViewer.cs:2874

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.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation7.5 / 10Strong✓ Tool-verified

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

  • `Debug` at line 4168 is called with an argument built by `files.ToList()` (line 4168), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because Debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — ArkViewer/UI/frmViewer.cs:4168

What to do

  • Each finding names the diagnostic call and the expression inside its argument whose cost scales with a collection. Confirm from the two that the argument is built before the call — that is C#'s evaluation order, not a guess — then put the construction behind the same level check the sink applies: `if (logger.IsEnabled(LogLevel.Trace))` for Microsoft.Extensions.Logging, the repository's own debug flag where it has one, or a message template whose ARGUMENTS the logging framework only formats when the level is on. Moving the call is not the fix: it is the join/projection in the argument that is paid, wherever the call sits.
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 handling3.8 / 10Weak✓ Tool-verified

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.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×36) — ASVPack/Models/ContentContainer.cs:76, ASVPack/Models/ContentContainer.cs:194, ASVPack/Models/ContentContainer.cs:329, …
  • `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×4) — REDACTED:1019, ArkSavegameToolkit/SavegameToolkit/Structs/StructPropertyList.cs:32, ArkViewer/UI/frmTribeLog.cs:176, …

What to do

  • Swallowed exception (empty catch)
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 types6.0 / 10Adequate✓ 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.

  • This method contradicts itself about `foliageInfo`: line 2639 assigns it with `as List<AsaProperty<dynamic>>`, which hands back null rather than throwing when the value is not a `List<AsaProperty<dynamic>>`, but line 2642 then dereferences it directly as `foliageInfo.Count` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `foliageInfo` once before the first use and handle the null case, or cast with `(List<AsaProperty<dynamic>>)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ASVPack/Models/ContentContainer.cs:2642
  • This method contradicts itself about `foliageCountInfo`: line 2640 assigns it with `as List<dynamic>`, which hands back null rather than throwing when the value is not a `List<dynamic>`, but line 2645 then dereferences it directly with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `foliageCountInfo` once before the first use and handle the null case, or cast with `(List<dynamic>)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ASVPack/Models/ContentContainer.cs:2645
  • This method contradicts itself about `ancestorData`: line 391 assigns it with `as List<dynamic>`, which hands back null rather than throwing when the value is not a `List<dynamic>`, but line 393 then dereferences it directly as `ancestorData.Cast` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `ancestorData` once before the first use and handle the null case, or cast with `(List<dynamic>)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ASVPack/Models/ContentTamedCreature.cs:393
  • This method contradicts itself about `objectList`: line 29 assigns it with `as List<object>`, which hands back null rather than throwing when the value is not a `List<object>`, but line 30 then dereferences it directly as `objectList.Cast` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `objectList` once before the first use and handle the null case, or cast with `(List<object>)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ASVPack/Models/ContentTamedEmbryo.cs:30
  • This method contradicts itself about `item_x`: line 26 assigns it with `as ListViewItem`, which hands back null rather than throwing when the value is not a `ListViewItem`, but line 31 then dereferences it directly as `item_x.SubItems` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `item_x` once before the first use and handle the null case, or cast with `(ListViewItem)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/Models/ListViewComparer.cs:31
  • This method contradicts itself about `item_y`: line 27 assigns it with `as ListViewItem`, which hands back null rather than throwing when the value is not a `ListViewItem`, but line 41 then dereferences it directly as `item_y.SubItems` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `item_y` once before the first use and handle the null case, or cast with `(ListViewItem)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/Models/ListViewComparer.cs:41
  • This method contradicts itself about `comboBox`: line 40 assigns it with `as System.Windows.Forms.ComboBox`, which hands back null rather than throwing when the value is not a `System.Windows.Forms.ComboBox`, but line 47 then dereferences it directly as `comboBox.ForeColor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `comboBox` once before the first use and handle the null case, or cast with `(System.Windows.Forms.ComboBox)` so the failure is reported where it happens — rather than leaving the two readings side by side. (×2) — ArkViewer/UI/BorderlessComboBox.cs:47, ArkViewer/UI/frmPlayerInventoryViewer.cs:47
  • This method contradicts itself about `comboBox`: line 22 assigns it with `as System.Windows.Forms.ComboBox`, which hands back null rather than throwing when the value is not a `System.Windows.Forms.ComboBox`, but line 29 then dereferences it directly as `comboBox.ForeColor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `comboBox` once before the first use and handle the null case, or cast with `(System.Windows.Forms.ComboBox)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmBreedingFindOptions.cs:29
  • This method contradicts itself about `comboBox`: line 32 assigns it with `as System.Windows.Forms.ComboBox`, which hands back null rather than throwing when the value is not a `System.Windows.Forms.ComboBox`, but line 39 then dereferences it directly as `comboBox.ForeColor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `comboBox` once before the first use and handle the null case, or cast with `(System.Windows.Forms.ComboBox)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmBreedingLines.cs:39
  • This method contradicts itself about `comboBox`: line 30 assigns it with `as System.Windows.Forms.ComboBox`, which hands back null rather than throwing when the value is not a `System.Windows.Forms.ComboBox`, but line 37 then dereferences it directly as `comboBox.ForeColor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `comboBox` once before the first use and handle the null case, or cast with `(System.Windows.Forms.ComboBox)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmFtpFileBrowser.cs:37
  • This method contradicts itself about `comboBox`: line 38 assigns it with `as System.Windows.Forms.ComboBox`, which hands back null rather than throwing when the value is not a `System.Windows.Forms.ComboBox`, but line 45 then dereferences it directly as `comboBox.ForeColor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `comboBox` once before the first use and handle the null case, or cast with `(System.Windows.Forms.ComboBox)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmMapToolboxMarkers.cs:45
  • This method contradicts itself about `comboBox`: line 45 assigns it with `as System.Windows.Forms.ComboBox`, which hands back null rather than throwing when the value is not a `System.Windows.Forms.ComboBox`, but line 52 then dereferences it directly as `comboBox.ForeColor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `comboBox` once before the first use and handle the null case, or cast with `(System.Windows.Forms.ComboBox)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmMapToolboxStructures.cs:52
  • This method contradicts itself about `comboBox`: line 87 assigns it with `as System.Windows.Forms.ComboBox`, which hands back null rather than throwing when the value is not a `System.Windows.Forms.ComboBox`, but line 94 then dereferences it directly as `comboBox.ForeColor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `comboBox` once before the first use and handle the null case, or cast with `(System.Windows.Forms.ComboBox)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmSettings.cs:94
  • This method contradicts itself about `item`: line 632 assigns it with `as OfflineFileConfiguration`, which hands back null rather than throwing when the value is not a `OfflineFileConfiguration`, but line 633 then dereferences it directly as `item.Filename` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `item` once before the first use and handle the null case, or cast with `(OfflineFileConfiguration)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmSettings.cs:633
  • This method contradicts itself about `tabControl`: line 851 assigns it with `as TabControl`, which hands back null rather than throwing when the value is not a `TabControl`, but line 852 then dereferences it directly as `tabControl.TabPages` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `tabControl` once before the first use and handle the null case, or cast with `(TabControl)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:852
  • This method contradicts itself about `command`: line 1350 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 1353 then dereferences it directly as `command.GetTemplate` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `command` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:1353
  • This method contradicts itself about `command`: line 1733 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 1736 then dereferences it directly as `command.GetTemplate` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `command` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:1736
  • This method contradicts itself about `command`: line 1809 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 1812 then dereferences it directly as `command.GetTemplate` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `command` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:1812
  • This method contradicts itself about `command`: line 1923 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 1926 then dereferences it directly as `command.GetTemplate` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `command` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:1926
  • This method contradicts itself about `command`: line 2072 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 2075 then dereferences it directly as `command.GetTemplate` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `command` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:2075
  • This method contradicts itself about `command`: line 2467 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 2470 then dereferences it directly as `command.GetTemplate` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `command` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:2470
  • This method contradicts itself about `command`: line 2725 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 2728 then dereferences it directly as `command.GetTemplate` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `command` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:2728
  • This method contradicts itself about `selectedPlayer`: line 6840 assigns it with `as ASVComboValue`, which hands back null rather than throwing when the value is not a `ASVComboValue`, but line 6841 then dereferences it directly as `selectedPlayer.Key` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `selectedPlayer` once before the first use and handle the null case, or cast with `(ASVComboValue)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:6841
  • This method contradicts itself about `foundItem`: line 6875 writes `foundItem?.X`, which says `foundItem` can be null, but line 6853 then dereferences it directly as `foundItem.Rating` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `foundItem` truly cannot be null here, the `?.` is misleading. Settle it one way — test `foundItem` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:6853
  • This method contradicts itself about `player`: line 6999 writes `player?.`, which says `player` can be null, but line 6960 then dereferences it directly as `player.Longitude` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `player` truly cannot be null here, the `?.` is misleading. Settle it one way — test `player` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:6960
  • This method contradicts itself about `playerCache`: line 7127 writes `playerCache?.X`, which says `playerCache` can be null, but line 7111 then dereferences it directly as `playerCache.DroppedByPlayerId` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `playerCache` truly cannot be null here, the `?.` is misleading. Settle it one way — test `playerCache` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:7111
  • This method contradicts itself about `detail`: line 7579 writes `detail?.`, which says `detail` can be null, but line 7321 then dereferences it directly as `detail.ClassName` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `detail` truly cannot be null here, the `?.` is misleading. Settle it one way — test `detail` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:7321
  • This method contradicts itself about `wildCreature`: line 8087 assigns it with `as ContentWildCreature`, which hands back null rather than throwing when the value is not a `ContentWildCreature`, but line 8088 then dereferences it directly as `wildCreature.DinoId` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `wildCreature` once before the first use and handle the null case, or cast with `(ContentWildCreature)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:8088
  • This method contradicts itself about `tamedDino`: line 8114 assigns it with `as ContentTamedCreature`, which hands back null rather than throwing when the value is not a `ContentTamedCreature`, but line 8115 then dereferences it directly as `tamedDino.DinoId` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `tamedDino` once before the first use and handle the null case, or cast with `(ContentTamedCreature)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:8115
  • This method contradicts itself about `wildDino`: line 8899 assigns it with `as ContentWildCreature`, which hands back null rather than throwing when the value is not a `ContentWildCreature`, but line 8902 then dereferences it directly as `wildDino.DinoId` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `wildDino` once before the first use and handle the null case, or cast with `(ContentWildCreature)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:8902
  • This method contradicts itself about `tamedDino`: line 8919 assigns it with `as ContentTamedCreature`, which hands back null rather than throwing when the value is not a `ContentTamedCreature`, but line 8922 then dereferences it directly as `tamedDino.DinoId` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `tamedDino` once before the first use and handle the null case, or cast with `(ContentTamedCreature)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:8922
  • This method contradicts itself about `selectedCommand`: line 9098 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 9100 then dereferences it directly as `selectedCommand.Parameters` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `selectedCommand` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:9100
  • This method contradicts itself about `selectedCommand`: line 9270 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 9273 then dereferences it directly as `selectedCommand.Parameters` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `selectedCommand` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:9273
  • This method contradicts itself about `selectedCommand`: line 9281 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 9284 then dereferences it directly as `selectedCommand.Parameters` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `selectedCommand` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:9284
  • This method contradicts itself about `selectedCommand`: line 9293 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 9295 then dereferences it directly as `selectedCommand.Parameters` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `selectedCommand` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:9295
  • This method contradicts itself about `selectedCommand`: line 9302 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 9304 then dereferences it directly as `selectedCommand.Parameters` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `selectedCommand` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:9304
  • This method contradicts itself about `player`: line 9329 writes `player?.PlayerFilename`, which says `player` can be null, but line 9325 then dereferences it directly as `player.PlayerFilename` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `player` truly cannot be null here, the `?.` is misleading. Settle it one way — test `player` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:9325
  • This method contradicts itself about `selectedStructure`: line 9484 assigns it with `as ContentStructure`, which hands back null rather than throwing when the value is not a `ContentStructure`, but line 9485 then dereferences it directly as `selectedStructure.UniquePaintingId` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `selectedStructure` once before the first use and handle the null case, or cast with `(ContentStructure)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:9485
  • This method contradicts itself about `command`: line 9611 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 9614 then dereferences it directly as `command.GetTemplate` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `command` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ArkViewer/UI/frmViewer.cs:9614

What to do

  • Where a method uses `?.` on a symbol and then dereferences it directly, settle the question once: test it before the first use and handle null, or drop the `?.`.
  • Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.

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 Health44.3Weak — gated by D1, D2, D4, X1, X3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture70.1Adequate — gated by AX2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity35.2Weak — gated by D34, M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness24.0Critical — gated by D8, P1, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security77.2StrongSolid.
Performance100.0ExemplaryStrongest area.
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 — 7 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 26 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 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.

  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 59 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.
  • 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-contributor repository — bus factor is not applicable
  • D19 Documentation Quality — D19 withholds "XML-doc coverage": 7 candidate(s) (0 of them low-coverage Warnings on library projects) were measured and not published.
  • D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 4 candidate(s) found and not reported.
  • D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
  • 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
  • D28 Secrets (history) — gitleaks killed before it finished — this repository's working tree not scanned
  • D30 Dependency Vulnerabilities — nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan
  • 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) — 3 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
  • 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 none of the 3 signals this lens looks for
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • M4 Documentation accuracy — Not applicable: the 2 current-state document(s) make no claim of a kind M4 checks.
  • P12 CI test-gate honesty — no CI workflow found
  • P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
  • P8 Schema migrations — no EF Core usage detected
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • 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
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no async method does work a token could cancel
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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 — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 65 finding(s)
D17 · Explicit Debt · EmptyCatchBlock · ×41
  • EmptyCatchBlock ASVBot/Data/DiscordPlayerManager.cs:108 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ASVExport/Program.cs:270 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ASVExport/Program.cs:434 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ASVPack/Models/ContentContainer.cs:76 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ASVPack/Models/ContentContainer.cs:194 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ASVPack/Models/ContentContainer.cs:329 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ASVPack/Models/ContentContainer.cs:443 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ASVPack/Models/ContentPack.cs:191 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ASVPack/Models/ContentPack.cs:267 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ASVPack/Models/ContentPack.cs:381 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ASVPack/Models/ContentPlayer.cs:159 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ASVPack/Models/ContentPlayer.cs:512 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ASVPack/Models/DrawingContainer.cs:41 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs:74 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:134 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:316 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:361 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ArkSavegameToolkit/SavegameToolkit/ArkStoreProfile.cs:77 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayStruct.cs:70 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ArkSavegameToolkit/SavegameToolkit/Data/ExtraDataFallbackHandler.cs:16 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ArkSavegameToolkit/SavegameToolkit/Data/ExtraDataFoliageHandler.cs:51 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ArkSavegameToolkit/SavegameToolkit/GameObject.cs:194 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ArkSavegameToolkit/SavegameToolkit/GameObject.cs:236 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ArkSavegameToolkit/SavegameToolkitAdditions/ObjectCollector.cs:238 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock ArkViewer/Program.cs:78 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • + 16 more in this group — see findings.md.
D17 · Explicit Debt · WriteOnlyPrivateField · ×17
  • WriteOnlyPrivateField ASVPack/Models/ContentPack.cs:74 — private ConcurrentBag<ContentInventory> inventoryBag — 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 ArkSavegameToolkit/SavegameToolkit/ArkArchive.cs:37 — private char[] smallCharBuffer — 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 ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs:34 — private int propertiesBlockOffset — 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 ArkSavegameToolkit/SavegameToolkit/ArkContainer.cs:10 — private int propertiesBlockOffset — 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 ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs:19 — private int propertiesBlockOffset — 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 ArkSavegameToolkit/SavegameToolkit/ArkLocalProfile.cs:16 — private byte[] unknownData — 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 ArkSavegameToolkit/SavegameToolkit/ArkLocalProfile.cs:18 — private byte[] unknownData2 — 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 REDACTED:44 — private int hibernationV8Unknown3 — 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 REDACTED:45 — private int hibernationV8Unknown4 — 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 REDACTED:46 — private int hibernationUnknown1 — 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 REDACTED:47 — private int hibernationUnknown2 — 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 ArkSavegameToolkit/SavegameToolkit/GameObject.cs:39 — private int propertiesSize — 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 ArkSavegameToolkit/SavegameToolkit/HibernationEntry.cs:43 — private int propertiesStart — 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 ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:25 — private ThreadLocal<int> local — 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 AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:22 — private ThreadLocal<int> local — 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 AsaSavegameToolkit/AsaSavegameToolkit/Structs/AsaUniqueNetIdRepl.cs:5 — private byte unknown — 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 AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaObjectReference.cs:15 — private int TYPE_NAME — 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.
AX3 · Project dependency cycles · Namespace dependency cycle · ×3
  • Namespace dependency cycle AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaObjectReference.cs:10 — The namespaces AsaSavegameToolkit ↔ AsaSavegameToolkit.Structs ↔ AsaSavegameToolkit.Types depend on each other. The lightest dependency in the cycle is AsaSavegameToolkit.Types → AsaSavegameToolkit (AsaSavegameToolkit.Types.AsaObjectReference → AsaSavegameToolkit.AsaArchive, 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.
  • Namespace dependency cycle ArkSavegameToolkit/SavegameToolkit/GameObject.cs:9 — The namespaces SavegameToolkit ↔ SavegameToolkit.Arrays ↔ SavegameToolkit.Data ↔ SavegameToolkit.Propertys ↔ SavegameToolkit.Structs ↔ SavegameToolkit.Types depend on each other. The lightest dependency in the cycle is SavegameToolkit → SavegameToolkit.Data (SavegameToolkit.GameObject → SavegameToolkit.Data.IExtraData, 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.
  • Namespace dependency cycle ASVPack/ContentMapPack.cs:2 — The namespaces ASVPack ↔ ASVPack.Models depend on each other. The lightest dependency in the cycle is ASVPack → ASVPack.Models (ASVPack.ContentMapPack → ASVPack.Models.ContentMap, 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.
D17 · Explicit Debt · DeadLoopAccumulator · ×1
  • DeadLoopAccumulator ArkViewer/UI/frmViewer.cs:3880 — bool addItem = true; … if (Program.ProgramConfig.HideNoBody && addItem) — this reset runs at the top of every pass, so the value is back to its starting constant before the test below it is reached: the test is decided the same way on every iteration, and whatever the loop adds to this variable further down is wiped out before anything can read it. The threshold it is guarding can therefore never be crossed, however many times the loop goes round, which is why nothing has ever been seen to trip. Move the reset ABOVE the loop, so the count accumulates across iterations the way the test below assumes; if it really is meant to be per-iteration state, then the test belongs with it and the accumulation does not.
D35 · Change Coupling · Boundary-crossing change coupling · ×1
  • Boundary-crossing change coupling: frmViewer.cs ↔ AsaSavegame.cs ArkViewer/UI/frmViewer.cs:1 — `ArkViewer/UI/frmViewer.cs` (context ArkViewer) and `AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegame.cs` (context AsaSavegameToolkit) sit in DIFFERENT parts of the tree yet change together 58% of the time (11 of the 19 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `710ff169` 5.1.0.13; `e6c28919` 5.1.0.8; `3cb3aee3` 5.1.0.7 — run `git show` on any of them.
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.
IC1 · Incompleteness & stubs · Unfinished stub · ×1
  • Unfinished stub — throws NotImplementedException ArkViewer/UI/frmViewer.cs:4591 — `FtpClient_ValidateCertificate1` is a shipped member whose body only throws — and it is REACHED: ArkViewer/UI/frmViewer.cs:4547 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Serious — 912 finding(s)
D17 · Explicit Debt · Dead code · ×108
  • Dead code: TRIBE_START ASVPack/Extensions/AsaExtensions.cs:18 — Field TRIBE_START — Roslyn's SymbolFinder walked every project the solution loads, including ASVPack, 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: BREEDING_ID ASVPack/Extensions/AsaExtensions.cs:19 — Field BREEDING_ID — Roslyn's SymbolFinder walked every project the solution loads, including ASVPack, 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: GetFullLevel ASVPack/Extensions/GameObjectExtensions.cs:65 — Method GetFullLevel — Roslyn's SymbolFinder walked every project the solution loads, including ASVPack, 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: ToJson ASVPack/Models/ContentPack.cs:198 — Method ToJson — Roslyn's SymbolFinder walked every project the solution loads, including ASVPack, 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: ExportClusterToJson ASVPack/Models/ContentPack.cs:219 — Method ExportClusterToJson — Roslyn's SymbolFinder walked every project the solution loads, including ASVPack, 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: IsSpawned ASVPack/Models/ContentPlayer.cs:55 — Method IsSpawned — Roslyn's SymbolFinder walked every project the solution loads, including ASVPack, 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: ContentTamedEmbryo ASVPack/Models/ContentTamedEmbryo.cs:15 — NamedType ContentTamedEmbryo — Roslyn's SymbolFinder walked every project the solution loads, including ASVPack, 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: ShouldSerializeId ArkSavegameToolkit/SavegameToolkit/GameObject.cs:68 — Method ShouldSerializeId — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: ShouldSerializeUuid ArkSavegameToolkit/SavegameToolkit/GameObject.cs:69 — Method ShouldSerializeUuid — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: ShouldSerializeClassName ArkSavegameToolkit/SavegameToolkit/GameObject.cs:70 — Method ShouldSerializeClassName — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: ShouldSerializeIsItem ArkSavegameToolkit/SavegameToolkit/GameObject.cs:71 — Method ShouldSerializeIsItem — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: ShouldSerializeNames ArkSavegameToolkit/SavegameToolkit/GameObject.cs:72 — Method ShouldSerializeNames — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: ShouldSerializeFromDataFile ArkSavegameToolkit/SavegameToolkit/GameObject.cs:73 — Method ShouldSerializeFromDataFile — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: ShouldSerializeDataFileIndex ArkSavegameToolkit/SavegameToolkit/GameObject.cs:74 — Method ShouldSerializeDataFileIndex — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: ShouldSerializeLocation ArkSavegameToolkit/SavegameToolkit/GameObject.cs:75 — Method ShouldSerializeLocation — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: ShouldSerializeProperties ArkSavegameToolkit/SavegameToolkit/GameObject.cs:76 — Method ShouldSerializeProperties — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: ShouldSerializeExtraData ArkSavegameToolkit/SavegameToolkit/GameObject.cs:77 — Method ShouldSerializeExtraData — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: CollectBaseNames ArkSavegameToolkit/SavegameToolkit/GameObject.cs:215 — Method CollectBaseNames — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: ClearUUIDCache ArkSavegameToolkit/SavegameToolkit/GameObject.cs:242 — Method ClearUUIDCache — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: ToBytes ArkSavegameToolkit/SavegameToolkit/GuidExtensions.cs:34 — Method ToBytes — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: WriteObjectFieldStart ArkSavegameToolkit/SavegameToolkit/JsonTextWriterExtensions.cs:8 — Method WriteObjectFieldStart — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: WriteArrayFieldStart ArkSavegameToolkit/SavegameToolkit/JsonTextWriterExtensions.cs:13 — Method WriteArrayFieldStart — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: WriteNullField ArkSavegameToolkit/SavegameToolkit/JsonTextWriterExtensions.cs:18 — Method WriteNullField — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: WriteField ArkSavegameToolkit/SavegameToolkit/JsonTextWriterExtensions.cs:23 — Method WriteField — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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: UseDefaultPrettyPrint ArkSavegameToolkit/SavegameToolkit/JsonTextWriterExtensions.cs:28 — Method UseDefaultPrettyPrint — Roslyn's SymbolFinder walked every project the solution loads, including SavegameToolkit, 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.
  • + 83 more in this group — see findings.md.
X5 · Nullable reference types · Symbol treated as nullable, then dereferenced unguarded · ×40
  • Symbol treated as nullable, then dereferenced unguarded ASVPack/Models/ContentContainer.cs:2642 — This method contradicts itself about `foliageInfo`: line 2639 assigns it with `as List<AsaProperty<dynamic>>`, which hands back null rather than throwing when the value is not a `List<AsaProperty<dynamic>>`, but line 2642 then dereferences it directly as `foliageInfo.Count` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `foliageInfo` once before the first use and handle the null case, or cast with `(List<AsaProperty<dynamic>>)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ASVPack/Models/ContentContainer.cs:2645 — This method contradicts itself about `foliageCountInfo`: line 2640 assigns it with `as List<dynamic>`, which hands back null rather than throwing when the value is not a `List<dynamic>`, but line 2645 then dereferences it directly with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `foliageCountInfo` once before the first use and handle the null case, or cast with `(List<dynamic>)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ASVPack/Models/ContentTamedCreature.cs:393 — This method contradicts itself about `ancestorData`: line 391 assigns it with `as List<dynamic>`, which hands back null rather than throwing when the value is not a `List<dynamic>`, but line 393 then dereferences it directly as `ancestorData.Cast` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `ancestorData` once before the first use and handle the null case, or cast with `(List<dynamic>)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ASVPack/Models/ContentTamedEmbryo.cs:30 — This method contradicts itself about `objectList`: line 29 assigns it with `as List<object>`, which hands back null rather than throwing when the value is not a `List<object>`, but line 30 then dereferences it directly as `objectList.Cast` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `objectList` once before the first use and handle the null case, or cast with `(List<object>)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/Models/ListViewComparer.cs:31 — This method contradicts itself about `item_x`: line 26 assigns it with `as ListViewItem`, which hands back null rather than throwing when the value is not a `ListViewItem`, but line 31 then dereferences it directly as `item_x.SubItems` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `item_x` once before the first use and handle the null case, or cast with `(ListViewItem)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/Models/ListViewComparer.cs:41 — This method contradicts itself about `item_y`: line 27 assigns it with `as ListViewItem`, which hands back null rather than throwing when the value is not a `ListViewItem`, but line 41 then dereferences it directly as `item_y.SubItems` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `item_y` once before the first use and handle the null case, or cast with `(ListViewItem)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/BorderlessComboBox.cs:47 — This method contradicts itself about `comboBox`: line 40 assigns it with `as System.Windows.Forms.ComboBox`, which hands back null rather than throwing when the value is not a `System.Windows.Forms.ComboBox`, but line 47 then dereferences it directly as `comboBox.ForeColor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `comboBox` once before the first use and handle the null case, or cast with `(System.Windows.Forms.ComboBox)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmBreedingFindOptions.cs:29 — This method contradicts itself about `comboBox`: line 22 assigns it with `as System.Windows.Forms.ComboBox`, which hands back null rather than throwing when the value is not a `System.Windows.Forms.ComboBox`, but line 29 then dereferences it directly as `comboBox.ForeColor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `comboBox` once before the first use and handle the null case, or cast with `(System.Windows.Forms.ComboBox)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmBreedingLines.cs:39 — This method contradicts itself about `comboBox`: line 32 assigns it with `as System.Windows.Forms.ComboBox`, which hands back null rather than throwing when the value is not a `System.Windows.Forms.ComboBox`, but line 39 then dereferences it directly as `comboBox.ForeColor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `comboBox` once before the first use and handle the null case, or cast with `(System.Windows.Forms.ComboBox)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmFtpFileBrowser.cs:37 — This method contradicts itself about `comboBox`: line 30 assigns it with `as System.Windows.Forms.ComboBox`, which hands back null rather than throwing when the value is not a `System.Windows.Forms.ComboBox`, but line 37 then dereferences it directly as `comboBox.ForeColor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `comboBox` once before the first use and handle the null case, or cast with `(System.Windows.Forms.ComboBox)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmMapToolboxMarkers.cs:45 — This method contradicts itself about `comboBox`: line 38 assigns it with `as System.Windows.Forms.ComboBox`, which hands back null rather than throwing when the value is not a `System.Windows.Forms.ComboBox`, but line 45 then dereferences it directly as `comboBox.ForeColor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `comboBox` once before the first use and handle the null case, or cast with `(System.Windows.Forms.ComboBox)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmMapToolboxStructures.cs:52 — This method contradicts itself about `comboBox`: line 45 assigns it with `as System.Windows.Forms.ComboBox`, which hands back null rather than throwing when the value is not a `System.Windows.Forms.ComboBox`, but line 52 then dereferences it directly as `comboBox.ForeColor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `comboBox` once before the first use and handle the null case, or cast with `(System.Windows.Forms.ComboBox)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmPlayerInventoryViewer.cs:47 — This method contradicts itself about `comboBox`: line 40 assigns it with `as System.Windows.Forms.ComboBox`, which hands back null rather than throwing when the value is not a `System.Windows.Forms.ComboBox`, but line 47 then dereferences it directly as `comboBox.ForeColor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `comboBox` once before the first use and handle the null case, or cast with `(System.Windows.Forms.ComboBox)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmSettings.cs:94 — This method contradicts itself about `comboBox`: line 87 assigns it with `as System.Windows.Forms.ComboBox`, which hands back null rather than throwing when the value is not a `System.Windows.Forms.ComboBox`, but line 94 then dereferences it directly as `comboBox.ForeColor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `comboBox` once before the first use and handle the null case, or cast with `(System.Windows.Forms.ComboBox)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmSettings.cs:633 — This method contradicts itself about `item`: line 632 assigns it with `as OfflineFileConfiguration`, which hands back null rather than throwing when the value is not a `OfflineFileConfiguration`, but line 633 then dereferences it directly as `item.Filename` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `item` once before the first use and handle the null case, or cast with `(OfflineFileConfiguration)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmViewer.cs:852 — This method contradicts itself about `tabControl`: line 851 assigns it with `as TabControl`, which hands back null rather than throwing when the value is not a `TabControl`, but line 852 then dereferences it directly as `tabControl.TabPages` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `tabControl` once before the first use and handle the null case, or cast with `(TabControl)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmViewer.cs:1353 — This method contradicts itself about `command`: line 1350 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 1353 then dereferences it directly as `command.GetTemplate` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `command` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmViewer.cs:1736 — This method contradicts itself about `command`: line 1733 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 1736 then dereferences it directly as `command.GetTemplate` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `command` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmViewer.cs:1812 — This method contradicts itself about `command`: line 1809 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 1812 then dereferences it directly as `command.GetTemplate` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `command` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmViewer.cs:1926 — This method contradicts itself about `command`: line 1923 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 1926 then dereferences it directly as `command.GetTemplate` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `command` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmViewer.cs:2075 — This method contradicts itself about `command`: line 2072 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 2075 then dereferences it directly as `command.GetTemplate` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `command` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmViewer.cs:2470 — This method contradicts itself about `command`: line 2467 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 2470 then dereferences it directly as `command.GetTemplate` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `command` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmViewer.cs:2728 — This method contradicts itself about `command`: line 2725 assigns it with `as RCONCommand`, which hands back null rather than throwing when the value is not a `RCONCommand`, but line 2728 then dereferences it directly as `command.GetTemplate` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `command` once before the first use and handle the null case, or cast with `(RCONCommand)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmViewer.cs:6841 — This method contradicts itself about `selectedPlayer`: line 6840 assigns it with `as ASVComboValue`, which hands back null rather than throwing when the value is not a `ASVComboValue`, but line 6841 then dereferences it directly as `selectedPlayer.Key` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `selectedPlayer` once before the first use and handle the null case, or cast with `(ASVComboValue)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded ArkViewer/UI/frmViewer.cs:6853 — This method contradicts itself about `foundItem`: line 6875 writes `foundItem?.X`, which says `foundItem` can be null, but line 6853 then dereferences it directly as `foundItem.Rating` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `foundItem` truly cannot be null here, the `?.` is misleading. Settle it one way — test `foundItem` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
  • + 15 more in this group — see findings.md.
X18 · Disposal-pattern correctness · Disposable created and abandoned in the method that made it · ×37
  • Disposable created and abandoned in the method that made it ASVPack/Models/ContentPainting.cs:59 — `blankCanvas` is a `SKCanvas`, which implements `IDisposable`, and it is created here (line 59). Every use of it in `GenerateBitmap` 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 blankCanvas = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ASVPack/Models/DrawingContainer.cs:55 — `canvas` is a `SKCanvas`, which implements `IDisposable`, and it is created here (line 55). Every use of it in `SaveMapImageTamed` 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 canvas = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ASVPack/Models/DrawingContainer.cs:109 — `canvas` is a `SKCanvas`, which implements `IDisposable`, and it is created here (line 109). Every use of it in `SaveMapImageItems` 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 canvas = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ASVPack/Models/DrawingContainer.cs:221 — `canvas` is a `SKCanvas`, which implements `IDisposable`, and it is created here (line 221). Every use of it in `SaveMapImageStructures` 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 canvas = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ASVPack/Models/DrawingContainer.cs:275 — `canvas` is a `SKCanvas`, which implements `IDisposable`, and it is created here (line 275). Every use of it in `SaveMapImageWild` 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 canvas = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/Configuration/ViewerConfiguration.cs:507 — `aes` is a `Aes`, which implements `IDisposable`, and it is created here (line 507). Every use of it in `Load` 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 aes = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/Configuration/ViewerConfiguration.cs:546 — `aes` is a `Aes`, which implements `IDisposable`, and it is created here (line 546). Every use of it in `configFromJson` 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 aes = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/Models/ViewerEncryption.cs:27 — `cipher` is a `Aes`, which implements `IDisposable`, and it is created here (line 27). Every use of it in `Encrypt` 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 cipher = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/Models/ViewerEncryption.cs:30 — `cryptTransform` is a `ICryptoTransform`, which implements `IDisposable`, and it is created here (line 30). Every use of it in `Encrypt` 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 cryptTransform = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/Models/ViewerEncryption.cs:39 — `cipher` is a `Aes`, which implements `IDisposable`, and it is created here (line 39). Every use of it in `Decrypt` 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 cipher = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/Models/ViewerEncryption.cs:42 — `cryptTransform` is a `ICryptoTransform`, which implements `IDisposable`, and it is created here (line 42). Every use of it in `Decrypt` 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 cryptTransform = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/Program.cs:195 — `report` is a `frmErrorReport`, which implements `IDisposable`, and it is created here (line 195). Every use of it in `CurrentDomain_UnhandledException` 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 report = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/Program.cs:208 — `report` is a `frmErrorReport`, which implements `IDisposable`, and it is created here (line 208). Every use of it in `Application_ThreadException` 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 report = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/UI/frmMapToolboxMarkers.cs:315 — `markerEditor` is a `frmMarkerEditor`, which implements `IDisposable`, and it is created here (line 315). Every use of it in `btnAddMarker_Click` 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 markerEditor = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/UI/frmMapToolboxMarkers.cs:372 — `markerEditor` is a `frmMarkerEditor`, which implements `IDisposable`, and it is created here (line 372). Every use of it in `btnEditMarker_Click` 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 markerEditor = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/UI/frmMapToolboxStructures.cs:727 — `saveDialog` is a `SaveFileDialog`, which implements `IDisposable`, and it is created here (line 727). Every use of it in `mnuContextExport_Click` 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 saveDialog = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/UI/frmSettings.cs:954 — `mapEditor` is a `frmGenericClassMap`, which implements `IDisposable`, and it is created here (line 954). Every use of it in `btnAddDinoClass_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/UI/frmSettings.cs:980 — `mapEditor` is a `frmGenericClassMap`, which implements `IDisposable`, and it is created here (line 980). Every use of it in `btnEditDinoClass_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/UI/frmSettings.cs:1225 — `mapEditor` is a `frmItemClassMap`, which implements `IDisposable`, and it is created here (line 1225). Every use of it in `btnAddItem_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/UI/frmSettings.cs:1256 — `mapEditor` is a `frmItemClassMap`, which implements `IDisposable`, and it is created here (line 1256). Every use of it in `btnEditItem_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/UI/frmSettings.cs:1474 — `mapEditor` is a `frmGenericClassMap`, which implements `IDisposable`, and it is created here (line 1474). Every use of it in `btnEditStructure_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/UI/frmSettings.cs:1529 — `mapEditor` is a `frmGenericClassMap`, which implements `IDisposable`, and it is created here (line 1529). Every use of it in `btnAddStructure_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/UI/frmSettings.cs:1994 — `mapEditor` is a `frmGenericClassMap`, which implements `IDisposable`, and it is created here (line 1994). Every use of it in `btnCreaturesNotMappedAdd_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/UI/frmSettings.cs:2026 — `mapEditor` is a `frmItemClassMap`, which implements `IDisposable`, and it is created here (line 2026). Every use of it in `btnItemsNotMatchedAdd_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it ArkViewer/UI/frmSettings.cs:2054 — `mapEditor` is a `frmGenericClassMap`, which implements `IDisposable`, and it is created here (line 2054). Every use of it in `btnStructuresNotMappedAdd_Click` 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 mapEditor = …;`), which releases it at the end of the scope on every path including a throw.
  • + 12 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×36
  • Swallowed exception (empty catch) ASVPack/Models/ContentContainer.cs:76 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ASVPack/Models/ContentContainer.cs:194 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ASVPack/Models/ContentContainer.cs:329 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ASVPack/Models/ContentContainer.cs:443 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ASVPack/Models/ContentPack.cs:191 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ASVPack/Models/ContentPack.cs:267 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ASVPack/Models/ContentPack.cs:381 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ASVPack/Models/ContentPlayer.cs:159 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ASVPack/Models/ContentPlayer.cs:512 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ASVPack/Models/DrawingContainer.cs:41 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs:74 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:134 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:316 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:361 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ArkSavegameToolkit/SavegameToolkit/ArkStoreProfile.cs:77 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayStruct.cs:70 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ArkSavegameToolkit/SavegameToolkit/Data/ExtraDataFallbackHandler.cs:16 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ArkSavegameToolkit/SavegameToolkit/Data/ExtraDataFoliageHandler.cs:51 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ArkSavegameToolkit/SavegameToolkit/GameObject.cs:194 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ArkSavegameToolkit/SavegameToolkit/GameObject.cs:236 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ArkSavegameToolkit/SavegameToolkitAdditions/ObjectCollector.cs:238 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ASVExport/Program.cs:270 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ASVExport/Program.cs:434 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ArkViewer/Program.cs:78 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) ArkViewer/Program.cs:552 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • + 11 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×23
  • MethodTooLong: ContentContainer.LoadArkEvolvedData ASVPack/Models/ContentContainer.cs:472 — MethodTooLong — LoadArkEvolvedData runs 592 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 492 over it, 5.92× 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: ContentContainer.LoadArkAscendedData ASVPack/Models/ContentContainer.cs:1849 — MethodTooLong — LoadArkAscendedData runs 572 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 472 over it, 5.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ContentPack.ExportJsonMapStructures ASVPack/Models/ContentPack.cs:784 — MethodTooLong — ExportJsonMapStructures runs 369 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 269 over it, 3.69× 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: frmViewer.mnuContext_ExportData_Click ArkViewer/UI/frmViewer.cs:2871 — MethodTooLong — mnuContext_ExportData_Click runs 325 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 225 over it, 3.25× 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: ContentPack.LoadGameData ASVPack/Models/ContentPack.cs:2074 — MethodTooLong — LoadGameData runs 289 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 189 over it, 2.89× 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: frmViewer.LoadTameDetail ArkViewer/UI/frmViewer.cs:7205 — MethodTooLong — LoadTameDetail runs 242 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 142 over it, 2.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ASVDataManager.AddMapStructures ArkViewer/Models/ASVDataManager.cs:1726 — MethodTooLong — AddMapStructures runs 169 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 69 over it, 1.69× 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: frmMapToolboxStructures.PopulateMapStructures ArkViewer/UI/frmMapToolboxStructures.cs:185 — MethodTooLong — PopulateMapStructures runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ContentPack.ExportJsonTamed ASVPack/Models/ContentPack.cs:510 — MethodTooLong — ExportJsonTamed runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× 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: frmBreedingLines.PopulateTameDetails ArkViewer/UI/frmBreedingLines.cs:415 — MethodTooLong — PopulateTameDetails 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: ContentContainer.LoadSaveGame ASVPack/Models/ContentContainer.cs:112 — MethodTooLong — LoadSaveGame runs 154 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× 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: frmViewer.LoadContent ArkViewer/UI/frmViewer.cs:316 — MethodTooLong — LoadContent 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: frmBreedingLines.PopulateAncestors ArkViewer/UI/frmBreedingLines.cs:666 — MethodTooLong — PopulateAncestors runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× 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: ViewerConfiguration.Load ArkViewer/Configuration/ViewerConfiguration.cs:247 — MethodTooLong — Load runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× 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.ExportCommandLine ArkViewer/Program.cs:441 — MethodTooLong — ExportCommandLine 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: ASVDataManager.GetItems ArkViewer/Models/ASVDataManager.cs:522 — MethodTooLong — GetItems runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× 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: frmViewer.DrawMap ArkViewer/UI/frmViewer.cs:4651 — MethodTooLong — DrawMap runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Program.Main ASVBot/Program.cs:24 — MethodTooLong — Main runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: frmViewer.LoadWildDetail ArkViewer/UI/frmViewer.cs:7661 — MethodTooLong — LoadWildDetail runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Program.ExportCommandLine ASVExport/Program.cs:306 — MethodTooLong — ExportCommandLine runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× 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: frmBreedingLines.PopulateTamedLovers ArkViewer/UI/frmBreedingLines.cs:205 — MethodTooLong — PopulateTamedLovers runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× 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: ContentPlayer.ContentPlayer(…) ASVPack/Models/ContentPlayer.cs:327 — MethodTooLong — ContentPlayer(…) 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: frmViewer.DownloadFtp ArkViewer/UI/frmViewer.cs:4270 — MethodTooLong — DownloadFtp runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D17 · Explicit Debt · CommentedOutCode · ×17
  • CommentedOutCode ASVExport/Program.cs:474 — 5 consecutive commented-code lines
  • CommentedOutCode ASVExport/Program.cs:498 — 6 consecutive commented-code lines
  • CommentedOutCode ASVExport/Program.cs:525 — 6 consecutive commented-code lines
  • CommentedOutCode ASVExport/Program.cs:546 — 6 consecutive commented-code lines
  • CommentedOutCode ASVExport/Program.cs:567 — 6 consecutive commented-code lines
  • CommentedOutCode ArkViewer/UI/frmViewer.cs:4411 — 6 consecutive commented-code lines
  • CommentedOutCode ASVPack/Models/ContentContainer.cs:799 — 12 consecutive commented-code lines
  • CommentedOutCode ASVPack/Models/ContentContainer.cs:812 — 13 consecutive commented-code lines
  • CommentedOutCode ASVPack/Models/ContentContainer.cs:1111 — 7 consecutive commented-code lines
  • CommentedOutCode ASVPack/Models/ContentPack.cs:2174 — 7 consecutive commented-code lines
  • CommentedOutCode ArkViewer/UI/frmSettings.cs:1283 — 7 consecutive commented-code lines
  • CommentedOutCode ArkSavegameToolkit/SavegameToolkit/IPropertyContainer.cs:17 — 3 consecutive commented-code lines
  • CommentedOutCode ArkViewer/UI/frmSettings.cs:1279 — 3 consecutive commented-code lines
  • CommentedOutCode ArkViewer/UI/frmViewer.cs:8019 — 3 consecutive commented-code lines
  • CommentedOutCode ArkViewer/UI/frmViewer.cs:8051 — 3 consecutive commented-code lines
  • CommentedOutCode ArkViewer/UI/frmViewer.cs:8031 — 4 consecutive commented-code lines
  • CommentedOutCode AsaSavegameToolkit/AsaSavegameToolkit/AsaCompressedData.cs:43 — 4 consecutive commented-code lines
X1 · Async correctness · Blocking `File.WriteAllText` inside an `async` method · ×13
  • Blocking `File.WriteAllText` inside an `async` method ASVBot/Commands/AdminCommands.cs:65 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method ASVBot/Commands/AdminCommands.cs:292 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method ASVBot/Commands/AdminCommands.cs:347 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method ASVBot/Commands/AdminCommands.cs:422 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method ASVBot/Commands/AdminCommands.cs:532 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method ASVBot/Commands/AdminCommands.cs:661 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method ASVBot/Commands/PlayerCommands.cs:133 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method ASVBot/Commands/PlayerCommands.cs:188 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method ASVBot/Commands/PlayerCommands.cs:297 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method ASVBot/Commands/PlayerCommands.cs:432 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method ASVBot/Commands/PlayerCommands.cs:517 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method ASVBot/Commands/PlayerCommands.cs:604 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method ASVBot/Commands/PlayerCommands.cs:772 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×12
  • Duplicated block (7 lines × 2) REDACTED:499 — REDACTED:499-505 | REDACTED:880-886 — both copies are in the same file, so extract the 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) ArkViewer/UI/frmViewer.cs:5734 — ArkViewer/UI/frmViewer.cs:5734-5740 | ArkViewer/UI/frmViewer.cs:5916-5922 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:5734` it does not close everything it opens, so those exact lines 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) ASVPack/Models/ContentTamedCreature.cs:172 — ASVPack/Models/ContentTamedCreature.cs:172-178 | ASVPack/Models/ContentTamedCreature.cs:287-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. Note first that the copies are not typed on the same thing: the declarations holding them bind `creatureObject` to `GameObject` in one and `AsaGameObject` 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) ArkViewer/Program.cs:705 — ArkViewer/Program.cs:705-711 | ArkViewer/UI/ChartControl.cs:291-297 — 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) ArkViewer/UI/frmErrorReport.cs:27 — ArkViewer/UI/frmErrorReport.cs:27-33 | ArkViewer/UI/frmErrorReport.cs:35-41 — both copies are in the same file, so extract the 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) ASVBot/Commands/PlayerCommands.cs:664 — ASVBot/Commands/PlayerCommands.cs:664-670 | ASVPack/Models/DrawingContainer.cs:121-127 — 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 `ASVBot/Commands/PlayerCommands.cs:664` 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) ASVExport/Program.cs:265 — ASVExport/Program.cs:265-271 | ArkViewer/Program.cs:400-407 — `ASVExport/Program.cs` and `ArkViewer/Program.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 198 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `ASVExport/Program.cs:265` 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, `ArkViewer/Program.cs:408` calls `Debug` and `ASVExport/Program.cs:275` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) ArkViewer/Models/ASVDataManager.cs:1934 — ArkViewer/Models/ASVDataManager.cs:1934-1940 | ArkViewer/Models/ASVDataManager.cs:2000-2007 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/Models/ASVDataManager.cs:1934` it does not close everything it opens, so those exact lines 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) ArkViewer/UI/frmBreedingLines.cs:223 — ArkViewer/UI/frmBreedingLines.cs:223-229 | ArkViewer/UI/frmViewer.cs:7713-7719 — 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 `ArkViewer/UI/frmBreedingLines.cs:223` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) ASVBot/Commands/AdminCommands.cs:402 — ASVBot/Commands/AdminCommands.cs:402-408 | ASVBot/Commands/AdminCommands.cs:480-486 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVBot/Commands/AdminCommands.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 that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) ASVBot/Commands/PlayerCommands.cs:186 — ASVBot/Commands/PlayerCommands.cs:186-194 | ASVBot/Commands/PlayerCommands.cs:294-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.
  • Duplicated block (7 lines × 2) ArkViewer/UI/frmViewer.cs:1985 — ArkViewer/UI/frmViewer.cs:1985-1991 | ArkViewer/UI/frmViewer.cs:2182-2188 — both copies are in the same file, so extract the 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 (8 lines × 2) · ×11
  • Duplicated block (8 lines × 2) REDACTED:191 — REDACTED:191-198 | REDACTED:414-421 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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:191` it does not close everything it opens, so those exact lines 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) ArkViewer/UI/frmBreedingLines.cs:937 — ArkViewer/UI/frmBreedingLines.cs:937-944 | ArkViewer/UI/frmBreedingLines.cs:959-966 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmBreedingLines.cs:937` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) ArkViewer/UI/frmPlayerInventoryViewer.cs:461 — ArkViewer/UI/frmPlayerInventoryViewer.cs:461-468 | ArkViewer/UI/frmPlayerInventoryViewer.cs:573-580 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmPlayerInventoryViewer.cs:461` it does not close everything it opens, so those exact lines 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) ArkViewer/UI/frmBreedingLines.cs:561 — ArkViewer/UI/frmBreedingLines.cs:561-568 | ArkViewer/UI/frmBreedingLines.cs:818-825 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmBreedingLines.cs:561` it does not close everything it opens, so those exact lines 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) ASVBot/Commands/AdminCommands.cs:78 — ASVBot/Commands/AdminCommands.cs:78-85 | ASVBot/Commands/AdminCommands.cs:100-107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVBot/Commands/AdminCommands.cs:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) ASVPack/Models/ContentContainer.cs:876 — ASVPack/Models/ContentContainer.cs:876-883 | ASVPack/Models/ContentContainer.cs:1496-1503 — both copies are in the same file, so extract the 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) ArkViewer/UI/frmSettings.cs:300 — ArkViewer/UI/frmSettings.cs:300-307 | ArkViewer/UI/frmSettings.cs:465-472 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmSettings.cs:300` it does not close everything it opens, so those exact lines 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) ArkViewer/UI/frmSettings.cs:1226 — ArkViewer/UI/frmSettings.cs:1226-1233 | ArkViewer/UI/frmSettings.cs:2027-2034 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmSettings.cs:1226` it does not close everything it opens, so those 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, `ArkViewer/UI/frmSettings.cs:2035` calls `Remove` and `ArkViewer/UI/frmSettings.cs:1234` 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) ASVPack/Models/ContentContainer.cs:1131 — ASVPack/Models/ContentContainer.cs:1131-1138 | ASVPack/Models/ContentContainer.cs:2295-2302 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentContainer.cs:1131` it does not close everything it opens, so those 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, `ASVPack/Models/ContentContainer.cs:1139` calls `Debug` and `ASVPack/Models/ContentContainer.cs:2303` 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) ASVPack/Models/ContentPack.cs:2548 — ASVPack/Models/ContentPack.cs:2548-2555 | ASVPack/Models/ContentPack.cs:2703-2711 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentPack.cs:2548` 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 (8 lines × 2) ArkViewer/UI/frmBreedingLines.cs:705 — ArkViewer/UI/frmBreedingLines.cs:705-712 | ArkViewer/UI/frmViewer.cs:6675-6682 — 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.
D17 · Explicit Debt · TodoComment · ×9
  • TodoComment ASVPack/Models/ContentContainer.cs:1433 — //TODO:// add unclaimed babies, with living parent belonging to tribe — 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 ArkSavegameToolkit/SavegameToolkit/ArkSavFile.cs:36 — // TODO: verify 0 int at end — 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 ArkSavegameToolkit/SavegameToolkit/ChunkedStore.cs:48 — // TODO: seems to be a map<ID, Object>. — 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 ArkSavegameToolkit/SavegameToolkit/ChunkedStore.cs:49 — // TODO: each index entry looks to be 64-bit ID + 64-bit offset (relative to data buffer start) + 64-bit — 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 ArkSavegameToolkit/SavegameToolkit/ChunkedStore.cs:50 — // TODO: sub-buffer size. — 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 ArkSavegameToolkit/SavegameToolkit/ChunkedStore.cs:51 — // TODO: handle the chunking, read the tribe/player data, and should be good. — 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 ArkSavegameToolkit/SavegameToolkit/GuidExtensions.cs:6 — // todo — 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 ArkViewer/Models/ASVDataManager.cs:2085 — //TODO:// Get user defined terminals from json — 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 AsaSavegameToolkit/AsaSavegameToolkit/AsaPropertyRegistry.cs:214 — //TODO:// unknown atm — 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.
D3 · God Classes · ClassTooLong · ×8
  • ClassTooLong: ContentPack ASVPack/Models/ContentPack.cs — ClassTooLong — 1475 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 1075 over it, 3.69× 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: ContentContainer ASVPack/Models/ContentContainer.cs — ClassTooLong — 1412 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 1012 over it, 3.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.
  • ClassTooLong: frmBreedingLines ArkViewer/UI/frmBreedingLines.cs — ClassTooLong — 847 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 447 over it, 2.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: frmPlayerInventoryViewer ArkViewer/UI/frmPlayerInventoryViewer.cs — ClassTooLong — 591 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 191 over it, 1.48× 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: ArkSavegame REDACTED — ClassTooLong — 487 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 87 over it, 1.22× 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: PlayerCommands ASVBot/Commands/PlayerCommands.cs — ClassTooLong — 433 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 33 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Program ArkViewer/Program.cs — ClassTooLong — 433 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 33 over it, 1.08× 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: frmMapToolboxStructures ArkViewer/UI/frmMapToolboxStructures.cs — ClassTooLong — 431 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 31 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D44 · Platform End-of-Life · End-of-life runtime · ×8
  • End-of-life runtime: .NET net6.0 ASVBot/ASVBot - Backup.csproj:5 — ASVBot/ASVBot - Backup.csproj declares .NET net6.0 as this project's target framework, and .NET 6 LTS, support ended 2024-11-12. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2024-11-12 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
  • End-of-life runtime: .NET net6.0 ASVBot/ASVBot.csproj:5 — ASVBot/ASVBot.csproj declares .NET net6.0 as this project's target framework, and .NET 6 LTS, support ended 2024-11-12. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2024-11-12 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
  • End-of-life runtime: .NET net6.0 ASVExport/ASVExport.csproj:5 — ASVExport/ASVExport.csproj declares .NET net6.0 as this project's target framework, and .NET 6 LTS, support ended 2024-11-12. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2024-11-12 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
  • End-of-life runtime: .NET net6.0 ASVPack/ASVPack.csproj:4 — ASVPack/ASVPack.csproj declares .NET net6.0 as this project's target framework, and .NET 6 LTS, support ended 2024-11-12. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2024-11-12 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
  • End-of-life runtime: .NET net6.0 ArkSavegameToolkit/SavegameToolkit/SavegameToolkit.csproj:4 — ArkSavegameToolkit/SavegameToolkit/SavegameToolkit.csproj declares .NET net6.0 as this project's target framework, and .NET 6 LTS, support ended 2024-11-12. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2024-11-12 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
  • End-of-life runtime: .NET net6.0 ArkSavegameToolkit/SavegameToolkitAdditions/SavegameToolkitAdditions.csproj:4 — ArkSavegameToolkit/SavegameToolkitAdditions/SavegameToolkitAdditions.csproj declares .NET net6.0 as this project's target framework, and .NET 6 LTS, support ended 2024-11-12. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2024-11-12 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
  • End-of-life runtime: .NET net6.0 ArkViewer/ArkViewer.csproj:3 — ArkViewer/ArkViewer.csproj declares .NET net6.0 as this project's target framework, and .NET 6 LTS, support ended 2024-11-12. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2024-11-12 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
  • End-of-life runtime: .NET net6.0 AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegameToolkit.csproj:4 — AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegameToolkit.csproj declares .NET net6.0 as this project's target framework, and .NET 6 LTS, support ended 2024-11-12. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2024-11-12 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
X1 · Async correctness · async void method · ×8
  • async void method: btnTestRcon_Click ArkViewer/UI/frmAddLocalARK.cs:153 — `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
  • async void method: btnTestRcon_Click ArkViewer/UI/frmFtpFileBrowser.cs:524 — `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
  • async void method: StartRCON ArkViewer/UI/frmViewer.cs:245 — `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
  • async void method: btnRconCommandWild_Click ArkViewer/UI/frmViewer.cs:9104 — `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
  • async void method: btnRconCommandTamed_Click ArkViewer/UI/frmViewer.cs:9136 — `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
  • async void method: btnRconCommandStructures_Click ArkViewer/UI/frmViewer.cs:9169 — `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
  • async void method: btnRconCommandTribes_Click ArkViewer/UI/frmViewer.cs:9202 — `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
  • async void method: btnRconCommandPlayers_Click ArkViewer/UI/frmViewer.cs:9234 — `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
D3 · God Classes · FileTooLong · ×7
  • FileTooLong: UI/frmViewer.cs ArkViewer/UI/frmViewer.cs — FileTooLong — 4739 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4239 over it, 9.48× 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: Models/ContentPack.cs ASVPack/Models/ContentPack.cs — FileTooLong — 1496 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 996 over it, 2.99× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Models/ContentContainer.cs ASVPack/Models/ContentContainer.cs — FileTooLong — 1430 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 930 over it, 2.86× 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: Models/ASVDataManager.cs ArkViewer/Models/ASVDataManager.cs — FileTooLong — 1129 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 629 over it, 2.26× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: UI/frmBreedingLines.cs ArkViewer/UI/frmBreedingLines.cs — FileTooLong — 860 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 360 over it, 1.72× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: UI/frmPlayerInventoryViewer.cs ArkViewer/UI/frmPlayerInventoryViewer.cs — FileTooLong — 605 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 105 over it, 1.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 505 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5 over it, 1.01× 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.
SC1 · Supply-chain hygiene · NuGet dependencies are not locked · ×7
  • NuGet dependencies are not locked ASVBot/ASVBot - Backup.csproj:21 — ASVBot/ASVBot - Backup.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.
  • NuGet dependencies are not locked ASVBot/ASVBot.csproj:30 — ASVBot/ASVBot.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.
  • NuGet dependencies are not locked ASVExport/ASVExport.csproj:18 — ASVExport/ASVExport.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.
  • NuGet dependencies are not locked ASVPack/ASVPack.csproj:12 — ASVPack/ASVPack.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.
  • NuGet dependencies are not locked ArkSavegameToolkit/SavegameToolkit/SavegameToolkit.csproj:15 — ArkSavegameToolkit/SavegameToolkit/SavegameToolkit.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.
  • NuGet dependencies are not locked ArkViewer/ArkViewer.csproj:4328 — ArkViewer/ArkViewer.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.
  • NuGet dependencies are not locked AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegameToolkit.csproj:10 — AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegameToolkit.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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×6
  • Duplicated block (12 lines × 2) ArkViewer/UI/frmBreedingLines.cs:618 — ArkViewer/UI/frmBreedingLines.cs:618-629 | ArkViewer/UI/frmBreedingLines.cs:875-886 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmBreedingLines.cs:618` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ArkViewer/UI/frmBreedingLines.cs:634` calls `Clear` and `ArkViewer/UI/frmBreedingLines.cs:891` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) ArkViewer/UI/frmViewer.cs:1849 — ArkViewer/UI/frmViewer.cs:1849-1860 | ArkViewer/UI/frmViewer.cs:2760-2771 — both copies are in the same file, so extract the 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) ASVPack/Models/ContentContainer.cs:525 — ASVPack/Models/ContentContainer.cs:525-536 | ASVPack/Models/ContentContainer.cs:1869-1880 — both copies are in the same file, so extract the 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) ArkViewer/UI/frmSettings.cs:496 — ArkViewer/UI/frmSettings.cs:496-507 | ArkViewer/UI/frmViewer.cs:4048-4059 — 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 `ArkViewer/UI/frmSettings.cs:496` it does not close everything it opens, so those exact lines 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) ASVExport/Program.cs:240 — ASVExport/Program.cs:240-254 | ASVExport/Program.cs:344-355 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVExport/Program.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 (12 lines × 2) ASVPack/Models/ContentAncestor.cs:21 — ASVPack/Models/ContentAncestor.cs:21-37 | ArkViewer/Models/ASVAncestor.cs:18-29 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, 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 × 2) · ×6
  • Duplicated block (9 lines × 2) ASVPack/Models/ContentContainer.cs:2413 — ASVPack/Models/ContentContainer.cs:2413-2421 | ASVPack/Models/ContentContainer.cs:3015-3023 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentContainer.cs:2413` it does not close everything it opens, so those exact lines 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) ArkViewer/UI/frmViewer.cs:1839 — ArkViewer/UI/frmViewer.cs:1839-1847 | ArkViewer/UI/frmViewer.cs:9644-9652 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:1839` it does not close everything it opens, so those exact lines 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) ASVPack/Models/ContentContainer.cs:1476 — ASVPack/Models/ContentContainer.cs:1476-1484 | ASVPack/Models/ContentContainer.cs:2723-2731 — both copies are in the same file, so extract the 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) ASVBot/Commands/PlayerCommands.cs:713 — ASVBot/Commands/PlayerCommands.cs:713-721 | ASVPack/Models/DrawingContainer.cs:166-174 — 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 `ASVBot/Commands/PlayerCommands.cs:713` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) ArkViewer/UI/frmViewer.cs:4126 — ArkViewer/UI/frmViewer.cs:4126-4134 | ArkViewer/UI/frmViewer.cs:4293-4304 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:4126` it does not close everything it opens, so those exact lines 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) ASVPack/Models/ContentPlayer.cs:563 — ASVPack/Models/ContentPlayer.cs:563-572 | ArkSavegameToolkit/SavegameToolkitAdditions/GameObjectExtensions.cs:133-141 — 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 (11 lines × 2) · ×6
  • Duplicated block (11 lines × 2) ASVExport/Program.cs:279 — ASVExport/Program.cs:279-289 | ArkViewer/Program.cs:415-425 — `ASVExport/Program.cs` and `ArkViewer/Program.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 198 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `ASVExport/Program.cs:279` it does not close everything it opens, so those 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, `ArkViewer/Program.cs:408` calls `Debug` and `ASVExport/Program.cs:271` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) ArkViewer/UI/frmBreedingLines.cs:183 — ArkViewer/UI/frmBreedingLines.cs:183-193 | ArkViewer/UI/frmBreedingLines.cs:362-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmBreedingLines.cs:183` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) ASVPack/Models/ContentPlayer.cs:309 — ASVPack/Models/ContentPlayer.cs:309-319 | ASVPack/Models/ContentPlayer.cs:535-545 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentPlayer.cs:309` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) ArkViewer/UI/frmBreedingLines.cs:265 — ArkViewer/UI/frmBreedingLines.cs:265-275 | ArkViewer/UI/frmViewer.cs:6685-6695 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) ArkViewer/UI/frmBreedingLines.cs:789 — ArkViewer/UI/frmBreedingLines.cs:789-799 | ArkViewer/UI/frmViewer.cs:7484-7496 — 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 `ArkViewer/UI/frmBreedingLines.cs:789` 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) ArkViewer/UI/frmItemClassMap.cs:115 — ArkViewer/UI/frmItemClassMap.cs:115-125 | ArkViewer/UI/frmMarkerEditor.cs:203-213 — before extracting anything, compare `ArkViewer/UI/frmItemClassMap.cs` and `ArkViewer/UI/frmMarkerEditor.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmItemClassMap.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.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×6
  • Duplicated block (6 lines × 2) ArkViewer/UI/frmViewer.cs:1608 — ArkViewer/UI/frmViewer.cs:1608-1613 | ArkViewer/UI/frmViewer.cs:1640-1645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:1608` it does not close everything it opens, so those exact lines 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) ASVPack/Models/ContentContainer.cs:1045 — ASVPack/Models/ContentContainer.cs:1045-1050 | ASVPack/Models/ContentContainer.cs:2256-2261 — both copies are in the same file, so extract the 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) ASVPack/Models/ContentContainer.cs:1431 — ASVPack/Models/ContentContainer.cs:1431-1437 | ASVPack/Models/ContentContainer.cs:2677-2682 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentContainer.cs:1431` it does not close everything it opens, so those exact lines 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) ASVExport/Program.cs:54 — ASVExport/Program.cs:54-59 | ArkViewer/Program.cs:216-221 — `ASVExport/Program.cs` and `ArkViewer/Program.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 198 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `ASVExport/Program.cs:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ArkViewer/Program.cs:214` calls `Trace` and `ASVExport/Program.cs:50` 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) ArkViewer/UI/frmMapToolboxStructures.cs:497 — ArkViewer/UI/frmMapToolboxStructures.cs:497-502 | ArkViewer/UI/frmViewer.cs:4757-4763 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) ArkViewer/UI/frmGenericClassMap.cs:152 — ArkViewer/UI/frmGenericClassMap.cs:152-157 | ArkViewer/UI/frmItemClassMap.cs:159-164 — before extracting anything, compare `ArkViewer/UI/frmGenericClassMap.cs` and `ArkViewer/UI/frmItemClassMap.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×6
  • Low cohesion: frmViewer (LCOM4 47) ArkViewer/UI/frmViewer.cs:40 — frmViewer's methods fall into 47 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 47 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: frmSettings (LCOM4 22) ArkViewer/UI/frmSettings.cs:19 — frmSettings's methods fall into 22 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 22 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: frmBreedingLines (LCOM4 13) ArkViewer/UI/frmBreedingLines.cs:16 — frmBreedingLines's methods fall into 13 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 13 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: frmFtpFileBrowser (LCOM4 9) ArkViewer/UI/frmFtpFileBrowser.cs:17 — frmFtpFileBrowser's methods fall into 9 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 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: frmMapToolboxStructures (LCOM4 8) ArkViewer/UI/frmMapToolboxStructures.cs:18 — frmMapToolboxStructures's methods fall into 8 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 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: frmMapToolboxMarkers (LCOM4 5) ArkViewer/UI/frmMapToolboxMarkers.cs:14 — frmMapToolboxMarkers's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
AX2 · Stateful singletons · Stateful shared instance · ×5
  • Stateful shared instance: ViewerConfiguration ArkViewer/Configuration/ViewerConfiguration.cs:33 — `ViewerConfiguration` is not registered, but `Program` creates it and keeps it in the static `ProgramConfig`, 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 (EncryptionPassword, Mode, SelectedFile, SelectedServer, ClusterFolder, ColourMap; e.g. `EncryptionPassword` at line 137).
  • Stateful shared instance: frmMapToolboxMarkers ArkViewer/UI/frmMapToolboxMarkers.cs:14 — `frmMapToolboxMarkers` keeps one instance of itself in the static `inst`, 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 (isLoading, SortingColumn_Markers; e.g. `isLoading` at line 134).
  • Stateful shared instance: frmMapToolboxStructures ArkViewer/UI/frmMapToolboxStructures.cs:18 — `frmMapToolboxStructures` keeps one instance of itself in the static `inst`, 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 (SortingColumn_Structures; e.g. `SortingColumn_Structures` at line 698).
  • Stateful shared instance: frmMapView ArkViewer/UI/frmMapView.cs:13 — `frmMapView` keeps one instance of itself in the static `inst`, 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 (currentMapImage, mapMouseDownX, mapMouseDownY, mapMouseDownZoom; e.g. `currentMapImage` at line 288).
  • Stateful shared instance: ContentContainer ASVPack/Models/ContentContainer.cs:22 — `ContentContainer` is not registered, but `Program` creates it and keeps it in the static `arkPack`, 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 (logWriter, GameSaveTime, GameSeconds, MapStructures, WildCreatures, Tribes; e.g. `logWriter` at line 74).
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×5
  • Members sharing a duplicated core (5 members, 50+ identical tokens) ASVBot/Commands/PlayerCommands.cs:649 — ASVBot/Commands/PlayerCommands.cs:649-781 | ASVPack/Models/DrawingContainer.cs:53-103 | ASVPack/Models/DrawingContainer.cs:106-214 | ASVPack/Models/DrawingContainer.cs:218-270 | ASVPack/Models/DrawingContainer.cs:273-324 — 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) ArkViewer/Models/ASVDataManager.cs:177 — ArkViewer/Models/ASVDataManager.cs:177-211 | ArkViewer/Models/ASVDataManager.cs:214-270 | ArkViewer/Models/ASVDataManager.cs:373-417 | ArkViewer/Models/ASVDataManager.cs:433-467 | ArkViewer/Models/ASVDataManager.cs:486-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) ArkViewer/UI/frmViewer.cs:1290 — ArkViewer/UI/frmViewer.cs:1290-1315 | ArkViewer/UI/frmViewer.cs:1318-1343 | ArkViewer/UI/frmViewer.cs:1700-1726 | ArkViewer/UI/frmViewer.cs:2040-2064 | ArkViewer/UI/frmViewer.cs:9574-9598 — 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) ArkViewer/UI/frmViewer.cs:9105 — ArkViewer/UI/frmViewer.cs:9105-9134 | ArkViewer/UI/frmViewer.cs:9137-9167 | ArkViewer/UI/frmViewer.cs:9170-9200 | ArkViewer/UI/frmViewer.cs:9203-9232 | ArkViewer/UI/frmViewer.cs:9235-9264 — 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) ASVBot/Commands/AdminCommands.cs:250 — ASVBot/Commands/AdminCommands.cs:250-296 | ASVBot/Commands/AdminCommands.cs:305-351 | ASVBot/Commands/AdminCommands.cs:360-426 | ASVBot/Commands/AdminCommands.cs:438-536 | ASVBot/Commands/AdminCommands.cs:543-667 — 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 · Duplicated block (14 lines × 2) · ×5
  • Duplicated block (14 lines × 2) ArkViewer/UI/frmViewer.cs:5078 — ArkViewer/UI/frmViewer.cs:5078-5091 | ArkViewer/UI/frmViewer.cs:5592-5605 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:5078` it does not close everything it opens, so those exact lines 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) ArkViewer/UI/frmViewer.cs:8343 — ArkViewer/UI/frmViewer.cs:8343-8356 | ArkViewer/UI/frmViewer.cs:8382-8395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:8343` 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) ASVBot/Commands/PlayerCommands.cs:212 — ASVBot/Commands/PlayerCommands.cs:212-225 | ASVBot/Commands/PlayerCommands.cs:331-344 — both copies are in the same file, so extract the 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) ASVPack/Models/ContentPack.cs:734 — ASVPack/Models/ContentPack.cs:734-747 | ASVPack/Models/ContentPack.cs:1986-2000 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentPack.cs:734` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (14 lines × 2) ArkViewer/UI/frmViewer.cs:2374 — ArkViewer/UI/frmViewer.cs:2374-2389 | ArkViewer/UI/frmViewer.cs:2392-2405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:2374` 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 · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (7 members, 50+ identical tokens) ASVPack/Models/ContentPack.cs:395 — ASVPack/Models/ContentPack.cs:395-508 | ASVPack/Models/ContentPack.cs:511-782 | ASVPack/Models/ContentPack.cs:785-1552 | ASVPack/Models/ContentPack.cs:1555-1702 | ASVPack/Models/ContentPack.cs:1706-1763 | ASVPack/Models/ContentPack.cs:1767-1858 | ASVPack/Models/ContentPack.cs:1863-2044 — 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) ArkViewer/UI/frmBreedingLines.cs:96 — ArkViewer/UI/frmBreedingLines.cs:96-203 | ArkViewer/UI/frmBreedingLines.cs:206-383 | ArkViewer/UI/frmBreedingLines.cs:416-636 | ArkViewer/UI/frmBreedingLines.cs:667-920 | ArkViewer/UI/frmViewer.cs:6648-6789 | ArkViewer/UI/frmViewer.cs:7206-7658 | ArkViewer/UI/frmViewer.cs:7662-7877 — 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) ArkViewer/UI/frmDeathCacheViewer.cs:87 — ArkViewer/UI/frmDeathCacheViewer.cs:87-168 | ArkViewer/UI/frmDinoInventoryViewer.cs:118-198 | ArkViewer/UI/frmPlayerInventoryViewer.cs:138-317 | ArkViewer/UI/frmPlayerInventoryViewer.cs:321-394 | ArkViewer/UI/frmPlayerInventoryViewer.cs:407-521 | ArkViewer/UI/frmPlayerInventoryViewer.cs:524-636 | ArkViewer/UI/frmStructureInventoryViewer.cs:90-171 — 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) ASVBot/Commands/AdminCommands.cs:438 — ASVBot/Commands/AdminCommands.cs:438-536 | ASVBot/Commands/PlayerCommands.cs:101-143 | ASVBot/Commands/PlayerCommands.cs:205-306 | ASVBot/Commands/PlayerCommands.cs:363-441 | ASVBot/Commands/PlayerCommands.cs:446-527 | ASVBot/Commands/PlayerCommands.cs:562-614 | ASVBot/Commands/PlayerCommands.cs:649-781 — 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 (13 corresponding lines) · ×4
  • Edited copy of a member (13 corresponding lines) ASVPack/Models/ContentPack.cs:205 — ASVPack/Models/ContentPack.cs:205-217 | ArkViewer/Models/ASVDataManager.cs:777-789 — 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) ASVBot/Data/DiscordPlayerManager.cs:51 — ASVBot/Data/DiscordPlayerManager.cs:51-63 | ASVBot/Data/DiscordPlayerManager.cs:66-89 — 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) ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs:19 — ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs:19-31 | ArkSavegameToolkit/SavegameToolkit/ArkLocalProfile.cs:23-35 — 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) ASVPack/Extensions/AsaExtensions.cs:80 — ASVPack/Extensions/AsaExtensions.cs:80-95 | ArkSavegameToolkit/SavegameToolkitAdditions/GameObjectExtensions.cs:32-44 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×4
  • Edited copy of a member (10 corresponding lines) ArkViewer/UI/frmSettings.cs:1059 — ArkViewer/UI/frmSettings.cs:1059-1068 | ArkViewer/UI/frmSettings.cs:1367-1376 — 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) ArkViewer/Models/ViewerEncryption.cs:26 — ArkViewer/Models/ViewerEncryption.cs:26-35 | ArkViewer/Models/ViewerEncryption.cs:38-47 — 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) ASVPack/Extensions/StreamExtensions.cs:13 — ASVPack/Extensions/StreamExtensions.cs:13-24 | ASVPack/Models/ContentPack.cs:2756-2765 — 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) ASVPack/Extensions/GameObjectExtensions.cs:66 — ASVPack/Extensions/GameObjectExtensions.cs:66-75 | ASVPack/Models/ContentPlayer.cs:575-584 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×4
  • Edited copy of a member (7 corresponding lines) ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayBool.cs:13 — ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayBool.cs:13-19 | ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayInt8.cs:13-19 — 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) ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayByteValue.cs:13 — ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayByteValue.cs:13-19 | ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayObjectReference.cs:16-22 — 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) ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayRegistry.cs:17 — ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayRegistry.cs:17-23 | ArkSavegameToolkit/SavegameToolkit/Propertys/PropertyRegistry.cs:16-22 — 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) ArkViewer/UI/frmGenericClassMap.cs:151 — ArkViewer/UI/frmGenericClassMap.cs:151-157 | ArkViewer/UI/frmItemClassMap.cs:158-164 — 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 · Duplicated block (19 lines × 2) · ×4
  • Duplicated block (19 lines × 2) ASVPack/Models/ContentPlayer.cs:111 — ASVPack/Models/ContentPlayer.cs:111-129 | ASVPack/Models/ContentPlayer.cs:241-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 `ASVPack/Models/ContentPlayer.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 (19 lines × 2) ArkViewer/UI/frmViewer.cs:6968 — ArkViewer/UI/frmViewer.cs:6968-6986 | ArkViewer/UI/frmViewer.cs:7343-7361 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:6968` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) ArkViewer/UI/frmViewer.cs:8366 — ArkViewer/UI/frmViewer.cs:8366-8384 | ArkViewer/UI/frmViewer.cs:8404-8422 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:8366` it does not close everything it opens, so those 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) ArkViewer/UI/frmBreedingLines.cs:1402 — ArkViewer/UI/frmBreedingLines.cs:1402-1420 | ArkViewer/UI/frmBreedingLines.cs:1445-1463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmBreedingLines.cs:1402` 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 (5 lines × 2) · ×4
  • Duplicated block (5 lines × 2) ArkViewer/Configuration/ViewerConfiguration.cs:319 — ArkViewer/Configuration/ViewerConfiguration.cs:319-323 | ArkViewer/Configuration/ViewerConfiguration.cs:339-343 — both copies are in the same file, so extract the 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) ASVBot/Commands/PlayerCommands.cs:237 — ASVBot/Commands/PlayerCommands.cs:237-241 | ASVPack/Models/DrawingContainer.cs:279-283 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `ASVBot/Commands/PlayerCommands.cs:237` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) ArkViewer/UI/frmViewer.cs:5553 — ArkViewer/UI/frmViewer.cs:5553-5557 | ArkViewer/UI/frmViewer.cs:7691-7695 — both copies are in the same file, so extract the 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) ASVPack/Models/ContentContainer.cs:863 — ASVPack/Models/ContentContainer.cs:863-868 | ASVPack/Models/ContentContainer.cs:1072-1076 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentContainer.cs:863` 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.
GD1 · Unfinished & placeholder code · Unfinished stub · ×4
  • Unfinished stub — throws NotImplementedException ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayUnknown.cs:22 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayUnknown.cs:26 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException ArkSavegameToolkit/SavegameToolkit/Structs/StructUnknown.cs:22 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException ArkViewer/UI/frmViewer.cs:4591 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×4
  • Swallowed exception (caught, then discarded) REDACTED:1019 — `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) ArkSavegameToolkit/SavegameToolkit/Structs/StructPropertyList.cs:32 — `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) ArkViewer/UI/frmTribeLog.cs:176 — `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) ArkViewer/UI/frmViewer.cs:308 — `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
AX2 · Stateful singletons · Process-global static state · ×3
  • Process-global static state: GameObject ArkSavegameToolkit/SavegameToolkit/GameObject.cs:15 — `GameObject` 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 (uuidCache; e.g. `uuidCache` at line 242). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: ArkName ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:9 — `ArkName` 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 (constantNameCache, _nameCache; e.g. `constantNameCache` at line 104). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: AsaName AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:5 — `AsaName` 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 (constantNameCache, _nameCache; e.g. `constantNameCache` at line 111). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (8 members, 50+ identical tokens) ArkViewer/Models/ASVDataManager.cs:840 — ArkViewer/Models/ASVDataManager.cs:840-910 | ArkViewer/Models/ASVDataManager.cs:913-1010 | ArkViewer/Models/ASVDataManager.cs:1014-1105 | ArkViewer/Models/ASVDataManager.cs:1108-1198 | ArkViewer/Models/ASVDataManager.cs:1201-1287 | ArkViewer/Models/ASVDataManager.cs:1290-1374 | ArkViewer/Models/ASVDataManager.cs:1377-1576 | ArkViewer/Models/ASVDataManager.cs:1579-1677 — 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) ArkViewer/UI/BorderlessComboBox.cs:37 — ArkViewer/UI/BorderlessComboBox.cs:37-52 | ArkViewer/UI/frmBreedingFindOptions.cs:19-34 | ArkViewer/UI/frmBreedingLines.cs:29-44 | ArkViewer/UI/frmFtpFileBrowser.cs:27-42 | ArkViewer/UI/frmMapToolboxMarkers.cs:35-50 | ArkViewer/UI/frmMapToolboxStructures.cs:42-57 | ArkViewer/UI/frmPlayerInventoryViewer.cs:37-52 | ArkViewer/UI/frmSettings.cs:84-99 — 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) ArkViewer/UI/frmViewer.cs:3852 — ArkViewer/UI/frmViewer.cs:3852-3939 | ArkViewer/UI/frmViewer.cs:5684-5724 | ArkViewer/UI/frmViewer.cs:5728-5765 | ArkViewer/UI/frmViewer.cs:5910-5967 | ArkViewer/UI/frmViewer.cs:5970-6028 | ArkViewer/UI/frmViewer.cs:6031-6081 | ArkViewer/UI/frmViewer.cs:6245-6324 | ArkViewer/UI/frmViewer.cs:6327-6410 — 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 (4 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:492 — REDACTED:492-537 | REDACTED:539-604 | REDACTED:871-910 | REDACTED:913-978 — 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) ASVExport/Program.cs:223 — ASVExport/Program.cs:223-304 | ASVExport/Program.cs:307-577 | ArkViewer/Program.cs:358-439 | ArkViewer/Program.cs:442-688 — 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) ASVBot/Commands/PlayerCommands.cs:310 — ASVBot/Commands/PlayerCommands.cs:310-357 | ASVBot/Commands/PlayerCommands.cs:531-558 | ASVBot/Commands/PlayerCommands.cs:619-645 | ASVBot/Commands/PlayerCommands.cs:785-811 — 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 (38 corresponding lines) · ×3
  • Edited copy of a member (38 corresponding lines) ArkViewer/UI/frmBreedingLines.cs:1388 — ArkViewer/UI/frmBreedingLines.cs:1388-1425 | ArkViewer/UI/frmBreedingLines.cs:1428-1469 — 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) ArkViewer/UI/frmAddLocalARK.cs:154 — ArkViewer/UI/frmAddLocalARK.cs:154-203 | ArkViewer/UI/frmFtpFileBrowser.cs:525-562 — 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) ArkViewer/UI/frmSettings.cs:241 — ArkViewer/UI/frmSettings.cs:241-283 | ArkViewer/UI/frmSettings.cs:410-447 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×3
  • Edited copy of a member (3 corresponding lines) ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:168 — ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:168-170 | AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:184-186 — 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) ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:164 — ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:164-166 | AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:179-181 — 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) ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:148 — ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:148-150 | AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:160-162 — 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 (11 lines × 3) · ×3
  • Duplicated block (11 lines × 3) ArkViewer/UI/frmViewer.cs:2920 — ArkViewer/UI/frmViewer.cs:2920-2930 | ArkViewer/UI/frmViewer.cs:3034-3044 | ArkViewer/UI/frmViewer.cs:3381-3391 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:2920` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs:65 — ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs:65-75 | ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs:86-96 | ArkSavegameToolkit/SavegameToolkit/ArkStoreProfile.cs:89-99 — before extracting anything, compare `ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs` and `ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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) ArkViewer/UI/frmViewer.cs:5688 — ArkViewer/UI/frmViewer.cs:5688-5699 | ArkViewer/UI/frmViewer.cs:5974-5984 | ArkViewer/UI/frmViewer.cs:6035-6045 — 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 `ArkViewer/UI/frmViewer.cs:5688` it does not close everything it opens, so those 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 (20 lines × 2) · ×3
  • Duplicated block (20 lines × 2) AsaSavegameToolkit/AsaSavegameToolkit/AsaGameObject.cs:81 — AsaSavegameToolkit/AsaSavegameToolkit/AsaGameObject.cs:81-100 | AsaSavegameToolkit/AsaSavegameToolkit/AsaGameObject.cs:106-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AsaSavegameToolkit/AsaSavegameToolkit/AsaGameObject.cs:81` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) ASVPack/Models/ContentContainer.cs:1444 — ASVPack/Models/ContentContainer.cs:1444-1463 | ASVPack/Models/ContentContainer.cs:2690-2709 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentContainer.cs:1444` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) ArkViewer/UI/frmViewer.cs:2296 — ArkViewer/UI/frmViewer.cs:2296-2315 | ArkViewer/UI/frmViewer.cs:2330-2350 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:2296` it does not close everything it opens, so those 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 (15 lines × 2) · ×3
  • Duplicated block (15 lines × 2) ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs:26 — ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs:26-40 | ArkSavegameToolkit/SavegameToolkit/ArkStoreProfile.cs:25-39 — before extracting anything, compare `ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs` and `ArkSavegameToolkit/SavegameToolkit/ArkStoreProfile.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs:39 — ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs:39-53 | ArkSavegameToolkit/SavegameToolkit/ArkTribe.cs:24-40 — before extracting anything, compare `ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs` and `ArkSavegameToolkit/SavegameToolkit/ArkTribe.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15 lines × 2) ArkViewer/UI/frmViewer.cs:7112 — ArkViewer/UI/frmViewer.cs:7112-7126 | ArkViewer/UI/frmViewer.cs:7156-7170 — both copies are in the same file, so extract the 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 lines × 3) · ×3
  • Duplicated block (10 lines × 3) ArkViewer/UI/frmViewer.cs:3871 — ArkViewer/UI/frmViewer.cs:3871-3880 | ArkViewer/UI/frmViewer.cs:6255-6264 | ArkViewer/UI/frmViewer.cs:6337-6346 — 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 `ArkViewer/UI/frmViewer.cs:3871` it does not close everything it opens, so those exact lines 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) ASVPack/Models/ContentContainer.cs:1531 — ASVPack/Models/ContentContainer.cs:1531-1540 | ASVPack/Models/ContentContainer.cs:1635-1644 | ASVPack/Models/ContentContainer.cs:1716-1725 — 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 `ASVPack/Models/ContentContainer.cs:1531` it does not close everything it opens, so those 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, `ASVPack/Models/ContentContainer.cs:1726` calls `HasAnyProperty` and `ASVPack/Models/ContentContainer.cs:1541` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 3) ASVBot/Commands/PlayerCommands.cs:379 — ASVBot/Commands/PlayerCommands.cs:379-388 | ASVBot/Commands/PlayerCommands.cs:464-473 | ASVBot/Commands/PlayerCommands.cs:575-584 — 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 `ASVBot/Commands/PlayerCommands.cs:379` it does not close everything it opens, so those 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, `ASVBot/Commands/PlayerCommands.cs:584` calls `Append` and `ASVBot/Commands/PlayerCommands.cs:388` 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.
IC1 · Incompleteness & stubs · Unfinished stub · ×3
  • Unfinished stub — throws NotImplementedException ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayUnknown.cs:22 — `Init` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayUnknown.cs:26 — `Init` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException ArkSavegameToolkit/SavegameToolkit/Structs/StructUnknown.cs:22 — `Init` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
D1 · Cyclomatic Complexity · Program.ExportCommandLinePack (cyclomatic 22) · ×2
  • Program.ExportCommandLinePack (cyclomatic 22) ASVExport/Program.cs:222 — Program.ExportCommandLinePack 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.
  • Program.ExportCommandLinePack (cyclomatic 22) ArkViewer/Program.cs:357 — Program.ExportCommandLinePack 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.
D2 · Cognitive Complexity · Program.ExportCommandLinePack (cognitive 37) · ×2
  • Program.ExportCommandLinePack (cognitive 37) ASVExport/Program.cs:222 — Program.ExportCommandLinePack 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.
  • Program.ExportCommandLinePack (cognitive 37) ArkViewer/Program.cs:357 — Program.ExportCommandLinePack 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 · ContentTamedCreature.ContentTamedCreature.ctor (cognitive 17) · ×2
  • ContentTamedCreature.ContentTamedCreature.ctor (cognitive 17) ASVPack/Models/ContentTamedCreature.cs:63 — ContentTamedCreature.ContentTamedCreature.ctor 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 (ContentTamedCreature.ContentTamedCreature.ctor) 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.
  • ContentTamedCreature.ContentTamedCreature.ctor (cognitive 17) ASVPack/Models/ContentTamedCreature.cs:170 — ContentTamedCreature.ContentTamedCreature.ctor 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 (ContentTamedCreature.ContentTamedCreature.ctor) 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyMethods · ×2
  • TooManyMethods: frmViewer ArkViewer/UI/frmViewer.cs — TooManyMethods — 4702 significant lines (blank, comment-only and punctuation-only lines excluded), 251 methods. The bar is 30 methods; this is 221 over it, 8.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: ASVDataManager ArkViewer/Models/ASVDataManager.cs — TooManyMethods — 1110 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Members sharing a duplicated core (19 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (19 members, 50+ identical tokens) ArkViewer/UI/frmAddLocalARK.cs:25 — ArkViewer/UI/frmAddLocalARK.cs:25-42 | ArkViewer/UI/frmBreedingFindOptions.cs:37-54 | ArkViewer/UI/frmBreedingLines.cs:47-64 | ArkViewer/UI/frmColourEditor.cs:16-33 | ArkViewer/UI/frmDeathCacheViewer.cs:23-40 | ArkViewer/UI/frmDinoInventoryViewer.cs:23-40 | ArkViewer/UI/frmFtpFileBrowser.cs:44-61 | ArkViewer/UI/frmGenericClassMap.cs:19-36 | ArkViewer/UI/frmItemClassMap.cs:18-35 | ArkViewer/UI/frmMapToolboxMarkers.cs:52-69 | ArkViewer/UI/frmMapToolboxStructures.cs:60-77 | ArkViewer/UI/frmMapView.cs:46-63 | ArkViewer/UI/frmMarkerEditor.cs:22-39 | ArkViewer/UI/frmPlayerInventoryViewer.cs:54-71 | ArkViewer/UI/frmStructureExclusionFilter.cs:20-37 | ArkViewer/UI/frmStructureInventoryViewer.cs:22-39 | ArkViewer/UI/frmTribeLog.cs:18-35 | ArkViewer/UI/frmTribeLogColourMap.cs:16-33 | ArkViewer/UI/frmViewer.cs:76-94 — These 19 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 19 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 19 times.
  • Members sharing a duplicated core (19 members, 50+ identical tokens) ArkViewer/UI/frmAddLocalARK.cs:45 — ArkViewer/UI/frmAddLocalARK.cs:45-69 | ArkViewer/UI/frmBreedingFindOptions.cs:57-81 | ArkViewer/UI/frmBreedingLines.cs:67-91 | ArkViewer/UI/frmColourEditor.cs:36-60 | ArkViewer/UI/frmDeathCacheViewer.cs:43-67 | ArkViewer/UI/frmDinoInventoryViewer.cs:43-67 | ArkViewer/UI/frmFtpFileBrowser.cs:64-88 | ArkViewer/UI/frmGenericClassMap.cs:39-63 | ArkViewer/UI/frmItemClassMap.cs:38-62 | ArkViewer/UI/frmMapToolboxMarkers.cs:72-96 | ArkViewer/UI/frmMapToolboxStructures.cs:80-104 | ArkViewer/UI/frmMapView.cs:66-90 | ArkViewer/UI/frmMarkerEditor.cs:42-66 | ArkViewer/UI/frmPlayerInventoryViewer.cs:74-97 | ArkViewer/UI/frmStructureExclusionFilter.cs:40-64 | ArkViewer/UI/frmStructureInventoryViewer.cs:42-66 | ArkViewer/UI/frmTribeLog.cs:38-62 | ArkViewer/UI/frmTribeLogColourMap.cs:36-60 | ArkViewer/UI/frmViewer.cs:97-122 — These 19 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 19 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 19 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (6 members, 50+ identical tokens) ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs:38 — ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs:38-61 | ArkSavegameToolkit/SavegameToolkit/ArkContainer.cs:26-38 | ArkSavegameToolkit/SavegameToolkit/ArkLocalProfile.cs:42-75 | ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs:44-81 | ArkSavegameToolkit/SavegameToolkit/ArkStoreProfile.cs:43-84 | ArkSavegameToolkit/SavegameToolkit/ArkTribe.cs:23-50 — 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) ArkViewer/UI/frmSettings.cs:1789 — ArkViewer/UI/frmSettings.cs:1789-1807 | ArkViewer/UI/frmSettings.cs:1810-1828 | ArkViewer/UI/frmSettings.cs:1831-1866 | ArkViewer/UI/frmSettings.cs:1869-1890 | ArkViewer/UI/frmSettings.cs:1893-1913 | ArkViewer/UI/frmSettings.cs:2228-2247 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×2
  • Edited copy of a member (27 corresponding lines) ArkViewer/UI/frmSettings.cs:102 — ArkViewer/UI/frmSettings.cs:102-128 | ArkViewer/UI/frmSettings.cs:131-166 — 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) ASVPack/Models/ContentItem.cs:69 — ASVPack/Models/ContentItem.cs:69-95 | ASVPack/Models/ContentItem.cs:103-135 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (54 corresponding lines) · ×2
  • Edited copy of a member (54 corresponding lines) ArkViewer/UI/frmMapToolboxMarkers.cs:258 — ArkViewer/UI/frmMapToolboxMarkers.cs:258-311 | ArkViewer/UI/frmTribeLog.cs:211-264 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (54 corresponding lines) ArkViewer/UI/frmBreedingLines.cs:1215 — ArkViewer/UI/frmBreedingLines.cs:1215-1268 | ArkViewer/UI/frmViewer.cs:1462-1515 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×2
  • Edited copy of a member (29 corresponding lines) ArkViewer/UI/frmSettings.cs:1152 — ArkViewer/UI/frmSettings.cs:1152-1180 | ArkViewer/UI/frmSettings.cs:1496-1525 — 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) AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegame.cs:167 — AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegame.cs:167-200 | AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegame.cs:203-231 — 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 (24 corresponding lines) · ×2
  • Edited copy of a member (24 corresponding lines) ArkViewer/UI/frmSettings.cs:1445 — ArkViewer/UI/frmSettings.cs:1445-1468 | ArkViewer/UI/frmSettings.cs:1955-1981 — 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) ArkViewer/UI/frmSettings.cs:31 — ArkViewer/UI/frmSettings.cs:31-55 | ArkViewer/UI/frmSettings.cs:57-80 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 14+ corresponding lines) ArkViewer/UI/frmSettings.cs:2250 — ArkViewer/UI/frmSettings.cs:2250-2266 | ArkViewer/UI/frmSettings.cs:2269-2282 | ArkViewer/UI/frmSettings.cs:2285-2298 — 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) ArkViewer/UI/frmViewer.cs:2280 — ArkViewer/UI/frmViewer.cs:2280-2293 | ArkViewer/UI/frmViewer.cs:3584-3597 | ArkViewer/UI/frmViewer.cs:3600-3613 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×2
  • Edited copy of a member (18 corresponding lines) ASVPack/Extensions/AsaExtensions.cs:60 — ASVPack/Extensions/AsaExtensions.cs:60-77 | ArkSavegameToolkit/SavegameToolkitAdditions/GameObjectExtensions.cs:11-30 — 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) AsaSavegameToolkit/AsaSavegameToolkit/AsaProfile.cs:19 — AsaSavegameToolkit/AsaSavegameToolkit/AsaProfile.cs:19-40 | AsaSavegameToolkit/AsaSavegameToolkit/AsaTribe.cs:24-41 — 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 (11 corresponding lines) · ×2
  • Edited copy of a member (11 corresponding lines) ArkSavegameToolkit/SavegameToolkitAdditions/ObjectCollector.cs:24 — ArkSavegameToolkit/SavegameToolkitAdditions/ObjectCollector.cs:24-34 | ArkSavegameToolkit/SavegameToolkitAdditions/ObjectCollector.cs:36-50 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) ArkSavegameToolkit/SavegameToolkit/GuidExtensions.cs:34 — ArkSavegameToolkit/SavegameToolkit/GuidExtensions.cs:34-44 | AsaSavegameToolkit/AsaSavegameToolkit/Extensions/GuidExtensions.cs:25-36 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×2
  • Edited copy of a member (8 corresponding lines) ArkViewer/Program.cs:704 — ArkViewer/Program.cs:704-711 | ArkViewer/UI/ChartControl.cs:290-297 — 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) ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:61 — ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:61-68 | AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:64-72 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×2
  • Edited copy of a member (12 corresponding lines) ASVPack/Models/ContentPack.cs:2768 — ASVPack/Models/ContentPack.cs:2768-2782 | ASVPack/Models/ContentPack.cs:2785-2796 — 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) ASVPack/Models/ContentContainer.cs:3080 — ASVPack/Models/ContentContainer.cs:3080-3091 | REDACTED:476-487 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×2
  • Edited copy of a member (9 corresponding lines) ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:98 — ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:98-106 | AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:105-113 — 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) ArkSavegameToolkit/SavegameToolkit/GuidExtensions.cs:46 — ArkSavegameToolkit/SavegameToolkit/GuidExtensions.cs:46-54 | AsaSavegameToolkit/AsaSavegameToolkit/Extensions/GuidExtensions.cs:39-48 — 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 (71–73 lines × 2) · ×2
  • Duplicated block (71–73 lines × 2) ASVPack/Models/ContentTamedCreature.cs:79 — ASVPack/Models/ContentTamedCreature.cs:79-149 | ASVPack/Models/ContentTamedCreature.cs:185-257 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentTamedCreature.cs:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (71–73 lines × 2) ASVBot/Commands/PlayerCommands.cs:363 — ASVBot/Commands/PlayerCommands.cs:363-433 | ASVBot/Commands/PlayerCommands.cs:446-518 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVBot/Commands/PlayerCommands.cs:363` it does not close everything it opens, so those 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–28 lines × 3) · ×2
  • Duplicated block (27–28 lines × 3) ArkViewer/UI/frmPlayerInventoryViewer.cs:201 — ArkViewer/UI/frmPlayerInventoryViewer.cs:201-228 | ArkViewer/UI/frmPlayerInventoryViewer.cs:238-264 | ArkViewer/UI/frmPlayerInventoryViewer.cs:281-308 — 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 (27–28 lines × 3) ASVBot/Commands/AdminCommands.cs:364 — ASVBot/Commands/AdminCommands.cs:364-390 | ASVBot/Commands/AdminCommands.cs:441-468 | ASVBot/Commands/AdminCommands.cs:549-576 — 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 (28 lines × 2) · ×2
  • Duplicated block (28 lines × 2) ArkViewer/Models/ASVDataManager.cs:883 — ArkViewer/Models/ASVDataManager.cs:883-910 | ArkViewer/Models/ASVDataManager.cs:1171-1198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/Models/ASVDataManager.cs:883` 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 `selectedLocations` to `List<Tuple<float,float>>` in one and `List<Tuple<float, float>>` 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 (28 lines × 2) ArkViewer/UI/frmPlayerInventoryViewer.cs:537 — ArkViewer/UI/frmPlayerInventoryViewer.cs:537-564 | ArkViewer/UI/frmStructureInventoryViewer.cs:97-124 — before extracting anything, compare `ArkViewer/UI/frmPlayerInventoryViewer.cs` and `ArkViewer/UI/frmStructureInventoryViewer.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 102 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 `ArkViewer/UI/frmPlayerInventoryViewer.cs:537` it does not close everything it opens, so those 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 (25 lines × 2) · ×2
  • Duplicated block (25 lines × 2) ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs:45 — ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs:45-69 | ArkSavegameToolkit/SavegameToolkit/ArkStoreProfile.cs:48-72 — before extracting anything, compare `ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs` and `ArkSavegameToolkit/SavegameToolkit/ArkStoreProfile.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `ArkSavegameToolkit/SavegameToolkit/ArkProfile.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.
  • Duplicated block (25 lines × 2) ASVBot/Commands/PlayerCommands.cs:682 — ASVBot/Commands/PlayerCommands.cs:682-706 | ASVBot/Commands/PlayerCommands.cs:724-748 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVBot/Commands/PlayerCommands.cs:682` 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, `ASVBot/Commands/PlayerCommands.cs:679` calls `FirstOrDefault`, `ToLower` and `ASVBot/Commands/PlayerCommands.cs:723` 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 (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) ArkViewer/UI/frmViewer.cs:1925 — ArkViewer/UI/frmViewer.cs:1925-1946 | ArkViewer/UI/frmViewer.cs:2727-2748 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22 lines × 2) ArkViewer/UI/frmViewer.cs:3116 — ArkViewer/UI/frmViewer.cs:3116-3137 | ArkViewer/UI/frmViewer.cs:3231-3252 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:3116` it does not close everything it opens, so those 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–22 lines × 5) · ×2
  • Duplicated block (19–22 lines × 5) ArkViewer/Models/ASVDataManager.cs:193 — ArkViewer/Models/ASVDataManager.cs:193-211 | ArkViewer/Models/ASVDataManager.cs:249-270 | ArkViewer/Models/ASVDataManager.cs:397-417 | ArkViewer/Models/ASVDataManager.cs:447-467 | ArkViewer/Models/ASVDataManager.cs:498-518 — 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 `ArkViewer/Models/ASVDataManager.cs:193` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19–22 lines × 5) ArkViewer/UI/frmViewer.cs:1400 — ArkViewer/UI/frmViewer.cs:1400-1420 | ArkViewer/UI/frmViewer.cs:1783-1802 | ArkViewer/UI/frmViewer.cs:2015-2036 | ArkViewer/UI/frmViewer.cs:2514-2532 | ArkViewer/UI/frmViewer.cs:2792-2811 — 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 `ArkViewer/UI/frmViewer.cs:1400` 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–22 lines × 2) · ×2
  • Duplicated block (21–22 lines × 2) ASVPack/Models/ContentPack.cs:466 — ASVPack/Models/ContentPack.cs:466-486 | ASVPack/Models/ContentPack.cs:660-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ASVPack/Models/ContentPack.cs:487` calls `WriteValue`, `WritePropertyName` and `ASVPack/Models/ContentPack.cs:682` 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 (21–22 lines × 2) ArkViewer/UI/frmSettings.cs:35 — ArkViewer/UI/frmSettings.cs:35-55 | ArkViewer/UI/frmSettings.cs:59-80 — both copies are in the same file, so extract the 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 (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) REDACTED:504 — REDACTED:504-520 | REDACTED:552-568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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: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.
  • Duplicated block (17 lines × 2) ASVPack/Models/ContentContainer.cs:2598 — ASVPack/Models/ContentContainer.cs:2598-2614 | ASVPack/Models/ContentContainer.cs:2957-2973 — both copies are in the same file, so extract the 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 (19 lines × 4) · ×2
  • Duplicated block (19 lines × 4) ASVPack/Models/ContentContainer.cs:2781 — ASVPack/Models/ContentContainer.cs:2781-2799 | ASVPack/Models/ContentContainer.cs:2821-2839 | ASVPack/Models/ContentContainer.cs:2932-2950 | ASVPack/Models/ContentContainer.cs:3022-3040 — 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 `ASVPack/Models/ContentContainer.cs:2781` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 4) ArkViewer/UI/frmMapToolboxStructures.cs:754 — ArkViewer/UI/frmMapToolboxStructures.cs:754-772 | ArkViewer/UI/frmViewer.cs:3135-3153 | ArkViewer/UI/frmViewer.cs:3250-3268 | ArkViewer/UI/frmViewer.cs:3481-3499 — 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.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×2
  • Duplicated block (18–19 lines × 2) ASVPack/Models/ContentContainer.cs:1531 — ASVPack/Models/ContentContainer.cs:1531-1549 | ASVPack/Models/ContentContainer.cs:1552-1569 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18–19 lines × 2) ArkViewer/UI/frmViewer.cs:6096 — ArkViewer/UI/frmViewer.cs:6096-6114 | ArkViewer/UI/frmViewer.cs:6214-6231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:6096` 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 (15–18 lines × 3) · ×2
  • Duplicated block (15–18 lines × 3) ASVPack/Models/ContentContainer.cs:347 — ASVPack/Models/ContentContainer.cs:347-364 | ASVPack/Models/ContentLocalProfile.cs:87-101 | ASVPack/Models/ContentPack.cs:285-302 — 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 `ASVPack/Models/ContentContainer.cs:347` it does not close everything it opens, so those exact lines 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–18 lines × 3) ArkViewer/UI/frmViewer.cs:5981 — ArkViewer/UI/frmViewer.cs:5981-5995 | ArkViewer/UI/frmViewer.cs:6042-6056 | ArkViewer/UI/frmViewer.cs:6344-6361 — 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 `ArkViewer/UI/frmViewer.cs:5981` it does not close everything it opens, so those 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 (16 lines × 3) · ×2
  • Duplicated block (16 lines × 3) ArkViewer/UI/frmSettings.cs:1450 — ArkViewer/UI/frmSettings.cs:1450-1465 | ArkViewer/UI/frmSettings.cs:1614-1629 | ArkViewer/UI/frmSettings.cs:1962-1977 — 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 `ArkViewer/UI/frmSettings.cs:1450` it does not close everything it opens, so those 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, `ArkViewer/UI/frmSettings.cs:1978` calls `Remove` and `ArkViewer/UI/frmSettings.cs:1466` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 3) ASVBot/Program.cs:123 — ASVBot/Program.cs:123-138 | ASVBot/Program.cs:147-162 | ASVBot/Program.cs:171-186 — 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 `ASVBot/Program.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.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×2
  • Duplicated block (16–17 lines × 2) ArkViewer/UI/frmViewer.cs:5939 — ArkViewer/UI/frmViewer.cs:5939-5955 | ArkViewer/UI/frmViewer.cs:6001-6016 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:5939` 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 (16–17 lines × 2) ArkViewer/UI/frmViewer.cs:6657 — ArkViewer/UI/frmViewer.cs:6657-6673 | ArkViewer/UI/frmViewer.cs:7319-7334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:6657` it does not close everything it opens, so those 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–15 lines × 2) · ×2
  • Duplicated block (14–15 lines × 2) ASVPack/Models/ContentContainer.cs:893 — ASVPack/Models/ContentContainer.cs:893-907 | ASVPack/Models/ContentContainer.cs:1226-1239 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentContainer.cs:893` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14–15 lines × 2) ArkViewer/UI/frmPlayerInventoryViewer.cs:413 — ArkViewer/UI/frmPlayerInventoryViewer.cs:413-427 | ArkViewer/UI/frmPlayerInventoryViewer.cs:532-545 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmPlayerInventoryViewer.cs:413` it does not close everything it opens, so those 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 (11 lines × 4) · ×2
  • Duplicated block (11 lines × 4) ArkViewer/UI/frmViewer.cs:3129 — ArkViewer/UI/frmViewer.cs:3129-3139 | ArkViewer/UI/frmViewer.cs:3244-3254 | ArkViewer/UI/frmViewer.cs:3360-3370 | ArkViewer/UI/frmViewer.cs:3475-3485 — 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 `ArkViewer/UI/frmViewer.cs:3129` it does not close everything it opens, so those exact lines 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) ASVPack/Models/ContentContainer.cs:347 — ASVPack/Models/ContentContainer.cs:347-360 | ASVPack/Models/ContentLocalProfile.cs:87-97 | ASVPack/Models/ContentLocalProfile.cs:142-152 | ASVPack/Models/ContentPack.cs:285-298 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentContainer.cs:347` it does not close everything it opens, so those 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 × 2) · ×2
  • Duplicated block (13–14 lines × 2) REDACTED:543 — REDACTED:543-555 | REDACTED:928-941 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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:543` it does not close everything it opens, so those 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, `REDACTED:538` calls `ExtractStoredArkProfiles`, `Exists`, `CreateDirectory` and `REDACTED:925` 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) ASVExport/Program.cs:24 — ASVExport/Program.cs:24-36 | ArkViewer/Program.cs:114-127 — `ASVExport/Program.cs` and `ArkViewer/Program.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 198 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `ASVExport/Program.cs:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ArkViewer/Program.cs:128` calls `Info` and `ASVExport/Program.cs:37` 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 (13 lines × 2) · ×2
  • Duplicated block (13 lines × 2) AsaSavegameToolkit/AsaSavegameToolkit/AsaTribe.cs:25 — AsaSavegameToolkit/AsaSavegameToolkit/AsaTribe.cs:25-37 | AsaSavegameToolkit/AsaSavegameToolkit/AsaTribe.cs:52-64 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AsaSavegameToolkit/AsaSavegameToolkit/AsaTribe.cs:25` it does not close everything it opens, so those exact lines 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) ASVPack/Models/ContentPack.cs:574 — ASVPack/Models/ContentPack.cs:574-586 | ASVPack/Models/ContentPack.cs:1906-1931 — both copies are in the same file, so extract the 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 (11–13 lines × 2) · ×2
  • Duplicated block (11–13 lines × 2) ArkViewer/UI/frmDeathCacheViewer.cs:120 — ArkViewer/UI/frmDeathCacheViewer.cs:120-132 | ArkViewer/UI/frmStructureInventoryViewer.cs:124-134 — before extracting anything, compare `ArkViewer/UI/frmDeathCacheViewer.cs` and `ArkViewer/UI/frmStructureInventoryViewer.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 106 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11–13 lines × 2) ASVBot/Commands/AdminCommands.cs:598 — ASVBot/Commands/AdminCommands.cs:598-608 | ASVBot/Commands/AdminCommands.cs:623-635 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVBot/Commands/AdminCommands.cs:598` 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 (12 lines × 4) · ×2
  • Duplicated block (12 lines × 4) ASVPack/Models/ContentContainer.cs:897 — ASVPack/Models/ContentContainer.cs:897-909 | ASVPack/Models/ContentContainer.cs:1229-1240 | ASVPack/Models/ContentContainer.cs:1252-1263 | ASVPack/Models/ContentContainer.cs:1349-1360 — 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 `ASVPack/Models/ContentContainer.cs:897` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 4) ArkViewer/UI/frmBreedingLines.cs:991 — ArkViewer/UI/frmBreedingLines.cs:991-1002 | ArkViewer/UI/frmBreedingLines.cs:1149-1160 | ArkViewer/UI/frmBreedingLines.cs:1187-1198 | ArkViewer/UI/frmViewer.cs:2218-2229 — 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 `ArkViewer/UI/frmBreedingLines.cs:991` it does not close everything it opens, so those 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, `ArkViewer/UI/frmBreedingLines.cs:988` calls `Replace`, `ToString` and `ArkViewer/UI/frmBreedingLines.cs:1184` 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 (9 lines × 3) · ×2
  • Duplicated block (9 lines × 3) ASVPack/Models/ContentContainer.cs:374 — ASVPack/Models/ContentContainer.cs:374-382 | ASVPack/Models/ContentLocalProfile.cs:111-119 | ASVPack/Models/ContentPack.cs:312-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 all 3 call sites, so a change lands once.
  • Duplicated block (9 lines × 3) ASVPack/Models/ContentContainer.cs:1552 — ASVPack/Models/ContentContainer.cs:1552-1560 | ASVPack/Models/ContentContainer.cs:1660-1668 | ASVPack/Models/ContentContainer.cs:1745-1753 — 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 `ASVPack/Models/ContentContainer.cs:1552` it does not close everything it opens, so those 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, `ASVPack/Models/ContentContainer.cs:1669` calls `HasAnyProperty` and `ASVPack/Models/ContentContainer.cs:1561` 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 lines × 5) · ×2
  • Duplicated block (7 lines × 5) ArkViewer/UI/frmDeathCacheViewer.cs:119 — ArkViewer/UI/frmDeathCacheViewer.cs:119-125 | ArkViewer/UI/frmDinoInventoryViewer.cs:150-156 | ArkViewer/UI/frmPlayerInventoryViewer.cs:166-172 | ArkViewer/UI/frmPlayerInventoryViewer.cs:334-340 | ArkViewer/UI/frmStructureInventoryViewer.cs:123-129 — before extracting anything, compare `ArkViewer/UI/frmDeathCacheViewer.cs` and `ArkViewer/UI/frmDinoInventoryViewer.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 109 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 `ArkViewer/UI/frmDeathCacheViewer.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.
  • Duplicated block (7 lines × 5) ArkViewer/UI/frmDeathCacheViewer.cs:120 — ArkViewer/UI/frmDeathCacheViewer.cs:120-126 | ArkViewer/UI/frmPlayerInventoryViewer.cs:212-219 | ArkViewer/UI/frmPlayerInventoryViewer.cs:249-256 | ArkViewer/UI/frmPlayerInventoryViewer.cs:292-299 | ArkViewer/UI/frmStructureInventoryViewer.cs:124-130 — before extracting anything, compare `ArkViewer/UI/frmDeathCacheViewer.cs` and `ArkViewer/UI/frmPlayerInventoryViewer.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `ArkViewer/UI/frmDeathCacheViewer.cs:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×2
  • Duplicated block (8–10 lines × 2) ASVPack/Models/ContentContainer.cs:1073 — ASVPack/Models/ContentContainer.cs:1073-1080 | ASVPack/Models/ContentContainer.cs:2281-2290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentContainer.cs:1073` 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–10 lines × 2) ArkViewer/UI/frmBreedingLines.cs:130 — ArkViewer/UI/frmBreedingLines.cs:130-137 | ArkViewer/UI/frmViewer.cs:7745-7754 — 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 (9–10 lines × 2) · ×2
  • Duplicated block (9–10 lines × 2) ArkViewer/UI/frmTribeLogColourMap.cs:128 — ArkViewer/UI/frmTribeLogColourMap.cs:128-137 | ArkViewer/UI/frmTribeLogColourMap.cs:232-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. The matched lines also transfer control out of the body holding them, which cannot 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) ASVBot/Commands/AdminCommands.cs:587 — ASVBot/Commands/AdminCommands.cs:587-595 | ASVBot/Commands/PlayerCommands.cs:673-682 — 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 `ASVBot/Commands/AdminCommands.cs:587` it does not close everything it opens, so those 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 × 3) · ×2
  • Duplicated block (7 lines × 3) ArkViewer/Models/ASVDataManager.cs:560 — ArkViewer/Models/ASVDataManager.cs:560-566 | ArkViewer/Models/ASVDataManager.cs:631-637 | ArkViewer/Models/ASVDataManager.cs:693-699 — 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 `ArkViewer/Models/ASVDataManager.cs:560` it does not close everything it opens, so those exact lines 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) ASVBot/Commands/AdminCommands.cs:519 — ASVBot/Commands/AdminCommands.cs:519-526 | ASVBot/Commands/PlayerCommands.cs:411-417 | ASVBot/Commands/PlayerCommands.cs:496-502 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×2
  • Duplicated block (5 lines × 6) ArkViewer/UI/frmBreedingLines.cs:567 — ArkViewer/UI/frmBreedingLines.cs:567-571 | ArkViewer/UI/frmBreedingLines.cs:576-580 | ArkViewer/UI/frmBreedingLines.cs:585-589 | ArkViewer/UI/frmBreedingLines.cs:594-598 | ArkViewer/UI/frmBreedingLines.cs:603-607 | ArkViewer/UI/frmBreedingLines.cs:611-615 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 6) ArkViewer/UI/frmBreedingLines.cs:824 — ArkViewer/UI/frmBreedingLines.cs:824-828 | ArkViewer/UI/frmBreedingLines.cs:833-837 | ArkViewer/UI/frmBreedingLines.cs:842-846 | ArkViewer/UI/frmBreedingLines.cs:851-855 | ArkViewer/UI/frmBreedingLines.cs:860-864 | ArkViewer/UI/frmBreedingLines.cs:868-872 — 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 (6 lines × 3) · ×2
  • Duplicated block (6 lines × 3) ArkViewer/Models/ASVDataManager.cs:550 — ArkViewer/Models/ASVDataManager.cs:550-556 | ArkViewer/Models/ASVDataManager.cs:622-627 | ArkViewer/Models/ASVDataManager.cs:683-689 — 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 `ArkViewer/Models/ASVDataManager.cs:550` 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 × 3) ASVBot/Commands/AdminCommands.cs:496 — ASVBot/Commands/AdminCommands.cs:496-501 | ASVBot/Commands/PlayerCommands.cs:388-393 | ASVBot/Commands/PlayerCommands.cs:473-478 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×2
  • Duplicated block (5 lines × 5) ASVBot/Commands/PlayerCommands.cs:281 — ASVBot/Commands/PlayerCommands.cs:281-285 | ASVBot/Commands/PlayerCommands.cs:393-398 | ASVBot/Commands/PlayerCommands.cs:399-404 | ASVBot/Commands/PlayerCommands.cs:478-483 | ASVBot/Commands/PlayerCommands.cs:484-489 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ASVBot/Commands/PlayerCommands.cs:392` calls `Append` and `ASVBot/Commands/PlayerCommands.cs:399` 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 × 5) ArkViewer/Models/ASVDataManager.cs:1942 — ArkViewer/Models/ASVDataManager.cs:1942-1946 | ArkViewer/Models/ASVDataManager.cs:1963-1969 | ArkViewer/Models/ASVDataManager.cs:1985-1991 | ArkViewer/Models/ASVDataManager.cs:2006-2010 | ArkViewer/Models/ASVDataManager.cs:2028-2032 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ArkViewer/Models/ASVDataManager.cs:1942` calls `FillEllipse`, `SolidBrush` and `ArkViewer/Models/ASVDataManager.cs:1963` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) ASVPack/Models/ContentContainer.cs:865 — ASVPack/Models/ContentContainer.cs:865-870 | ASVPack/Models/ContentContainer.cs:2054-2058 | ASVPack/Models/ContentContainer.cs:2918-2923 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) ArkViewer/UI/frmBreedingLines.cs:985 — ArkViewer/UI/frmBreedingLines.cs:985-990 | ArkViewer/UI/frmBreedingLines.cs:1143-1148 | ArkViewer/UI/frmViewer.cs:2159-2163 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Note 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.
IC1 · Incompleteness & stubs · Hollow method · ×2
  • Hollow method — returns a constant without doing the work ArkSavegameToolkit/SavegameToolkit/Data/ExtraDataCharacter.cs:5 — `CalculateSize` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
  • Hollow method — returns a constant without doing the work ArkSavegameToolkit/SavegameToolkit/Data/ExtraDataZero.cs:7 — `CalculateSize` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
X1 · Async correctness · Sync-over-async (deadlock risk) through `Task.WaitAll` · ×2
  • Sync-over-async (deadlock risk) through `Task.WaitAll` ASVPack/Models/ContentPack.cs:207 — `Task.WaitAll` blocks this thread until the tasks complete — sync-over-async: it can deadlock under a synchronization context and it parks a thread for as long as the work runs. `await Task.WhenAll(…)` instead.
  • Sync-over-async (deadlock risk) through `Task.WaitAll` ArkViewer/Models/ASVDataManager.cs:779 — `Task.WaitAll` blocks this thread until the tasks complete — sync-over-async: it can deadlock under a synchronization context and it parks a thread for as long as the work runs. `await Task.WhenAll(…)` instead.
X18 · Disposal-pattern correctness · Owned disposable field is never released · ×2
  • Owned disposable field is never released ArkViewer/UI/frmMarkerEditor.Designer.cs:395 — `colorDialog1` (line 395) is a component the designer creates for `frmMarkerEditor` with no container: it is not built with `new T(components)`, not added to `components`, and not added to a parent control's `Controls` or to a component's own child collection — the only routes by which the framework would release it for you. And the type's disposal never names it: searched `Dispose` (frmMarkerEditor.Designer.cs line 14), plus every method those call by name. So `frmMarkerEditor` owns it and never releases it; whatever it holds (a dialog's window handle, a file-system watch, a process handle) stays until finalization, once per instance. Release it in `Dispose(bool)` (`colorDialog1?.Dispose();` under `disposing`) — that method may be edited, or moved to the hand-written partial; only `InitializeComponent` belongs to the designer — or register it with the container so `components.Dispose()` releases it.
  • Owned disposable field is never released ArkViewer/UI/frmSettings.Designer.cs:3206 — `openFileDialog1` (line 3206) is a component the designer creates for `frmSettings` with no container: it is not built with `new T(components)`, not added to `components`, and not added to a parent control's `Controls` or to a component's own child collection — the only routes by which the framework would release it for you. And the type's disposal never names it: searched `Dispose` (frmSettings.Designer.cs line 14), plus every method those call by name. So `frmSettings` owns it and never releases it; whatever it holds (a dialog's window handle, a file-system watch, a process handle) stays until finalization, once per instance. Release it in `Dispose(bool)` (`openFileDialog1?.Dispose();` under `disposing`) — that method may be edited, or moved to the hand-written partial; only `InitializeComponent` belongs to the designer — or register it with the container so `components.Dispose()` releases it.
AX2 · Stateful singletons · Stateful singleton · ×1
  • Stateful singleton: BotConfig ASVBot/Config/BotConfig.cs:13 — `BotConfig` is a singleton (one shared instance) but mutates instance state outside any lock (ArkSaveFile, ArkClusterFolder, AutoReloadTimeMinutes, DiscordBotToken, DiscordServerId; e.g. `ArkSaveFile` at line 44).
D1 · Cyclomatic Complexity · ContentContainer.LoadArkAscendedData (cyclomatic 162) · ×1
  • ContentContainer.LoadArkAscendedData (cyclomatic 162) ASVPack/Models/ContentContainer.cs:1849 — ContentContainer.LoadArkAscendedData has cyclomatic complexity 162 (threshold 15). Of this number, 48 points are the body's own statements and 114 belong to 19 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContentContainer.LoadArkEvolvedData (cyclomatic 159) · ×1
  • ContentContainer.LoadArkEvolvedData (cyclomatic 159) ASVPack/Models/ContentContainer.cs:472 — ContentContainer.LoadArkEvolvedData has cyclomatic complexity 159 (threshold 15). Of this number, 37 points are the body's own statements and 122 belong to 20 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContentPack.LoadGameData (cyclomatic 110) · ×1
  • ContentPack.LoadGameData (cyclomatic 110) ASVPack/Models/ContentPack.cs:2074 — ContentPack.LoadGameData has cyclomatic complexity 110 (threshold 15). Of this number, 44 points are the body's own statements and 66 belong to 30 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · frmViewer.mnuContext_ExportData_Click (cyclomatic 92) · ×1
  • frmViewer.mnuContext_ExportData_Click (cyclomatic 92) ArkViewer/UI/frmViewer.cs:2871 — frmViewer.mnuContext_ExportData_Click has cyclomatic complexity 92 (threshold 15). To reduce it, separate the cases: extract each independent 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 · frmViewer.LoadTameDetail (cyclomatic 85) · ×1
  • frmViewer.LoadTameDetail (cyclomatic 85) ArkViewer/UI/frmViewer.cs:7205 — frmViewer.LoadTameDetail has cyclomatic complexity 85 (threshold 15). Of this number, 72 points are the body's own statements and 13 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContentPack.ExportJsonMapStructures (cyclomatic 68) · ×1
  • ContentPack.ExportJsonMapStructures (cyclomatic 68) ASVPack/Models/ContentPack.cs:784 — ContentPack.ExportJsonMapStructures has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ASVDataManager.GetMapImageTribes (cyclomatic 60) · ×1
  • ASVDataManager.GetMapImageTribes (cyclomatic 60) ArkViewer/Models/ASVDataManager.cs:1376 — ASVDataManager.GetMapImageTribes has cyclomatic complexity 60 (threshold 15). Of this number, 45 points are the body's own statements and 15 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Program.ExportCommandLine (cyclomatic 60) · ×1
  • Program.ExportCommandLine (cyclomatic 60) ArkViewer/Program.cs:441 — Program.ExportCommandLine has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Program.ExportCommandLine (cyclomatic 58) · ×1
  • Program.ExportCommandLine (cyclomatic 58) ASVExport/Program.cs:306 — Program.ExportCommandLine 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 · ASVDataManager.GetItems (cyclomatic 50) · ×1
  • ASVDataManager.GetItems (cyclomatic 50) ArkViewer/Models/ASVDataManager.cs:522 — ASVDataManager.GetItems has cyclomatic complexity 50 (threshold 15). Of this number, 28 points are the body's own statements and 22 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContentContainer.LoadSaveGame (cyclomatic 47) · ×1
  • ContentContainer.LoadSaveGame (cyclomatic 47) ASVPack/Models/ContentContainer.cs:112 — ContentContainer.LoadSaveGame has cyclomatic complexity 47 (threshold 15). Of this number, 18 points are the body's own statements and 29 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · frmBreedingLines.PopulateAncestors (cyclomatic 44) · ×1
  • frmBreedingLines.PopulateAncestors (cyclomatic 44) ArkViewer/UI/frmBreedingLines.cs:666 — frmBreedingLines.PopulateAncestors has cyclomatic complexity 44 (threshold 15). Of this number, 42 points are the body's own statements and 2 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 · frmBreedingLines.PopulateTamedLovers (cyclomatic 38) · ×1
  • frmBreedingLines.PopulateTamedLovers (cyclomatic 38) ArkViewer/UI/frmBreedingLines.cs:205 — frmBreedingLines.PopulateTamedLovers has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 7 of the 38 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 225, 209). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · frmViewer.LoadContent (cyclomatic 38) · ×1
  • frmViewer.LoadContent (cyclomatic 38) ArkViewer/UI/frmViewer.cs:316 — frmViewer.LoadContent has cyclomatic complexity 38 (threshold 15). Of this number, 37 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 · ASVDataManager.AddMapStructures (cyclomatic 37) · ×1
  • ASVDataManager.AddMapStructures (cyclomatic 37) ArkViewer/Models/ASVDataManager.cs:1726 — ASVDataManager.AddMapStructures has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · frmViewer.LoadPlayerStructureDetail (cyclomatic 37) · ×1
  • frmViewer.LoadPlayerStructureDetail (cyclomatic 37) ArkViewer/UI/frmViewer.cs:6414 — frmViewer.LoadPlayerStructureDetail has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 14 of the 37 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 6485, 6476). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · frmViewer.LoadWildDetail (cyclomatic 36) · ×1
  • frmViewer.LoadWildDetail (cyclomatic 36) ArkViewer/UI/frmViewer.cs:7661 — frmViewer.LoadWildDetail has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 10 of the 36 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 7715, 7703, 7710). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · frmViewer.DrawMap (cyclomatic 35) · ×1
  • frmViewer.DrawMap (cyclomatic 35) ArkViewer/UI/frmViewer.cs:4651 — frmViewer.DrawMap 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 · ArkSavegame.extractBinaryObjectStoredCreatures (cyclomatic 33) · ×1
  • ArkSavegame.extractBinaryObjectStoredCreatures (cyclomatic 33) REDACTED:62 — ArkSavegame.extractBinaryObjectStoredCreatures has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 8 of the 33 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 101, 81). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ArkSavegame.readBinaryStoredObjects (cyclomatic 33) · ×1
  • ArkSavegame.readBinaryStoredObjects (cyclomatic 33) REDACTED:268 — ArkSavegame.readBinaryStoredObjects has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 10 of the 33 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 376, 290, 276). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · frmViewer.DownloadFtp (cyclomatic 33) · ×1
  • frmViewer.DownloadFtp (cyclomatic 33) ArkViewer/UI/frmViewer.cs:4270 — frmViewer.DownloadFtp has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AdminCommands.ListArkItems (cyclomatic 33) · ×1
  • AdminCommands.ListArkItems (cyclomatic 33) ASVBot/Commands/AdminCommands.cs:541 — AdminCommands.ListArkItems has cyclomatic complexity 33 (threshold 15). Of this number, 23 points are the body's own statements and 10 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContentPlayer.ContentPlayer.ctor (cyclomatic 32) · ×1
  • ContentPlayer.ContentPlayer.ctor (cyclomatic 32) ASVPack/Models/ContentPlayer.cs:327 — ContentPlayer.ContentPlayer.ctor has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · frmBreedingLines.PopulateTameDetails (cyclomatic 32) · ×1
  • frmBreedingLines.PopulateTameDetails (cyclomatic 32) ArkViewer/UI/frmBreedingLines.cs:415 — frmBreedingLines.PopulateTameDetails 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 · ContentCreature.ContentCreature.ctor (cyclomatic 31) · ×1
  • ContentCreature.ContentCreature.ctor (cyclomatic 31) ASVPack/Models/ContentCreature.cs:229 — ContentCreature.ContentCreature.ctor has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContentPack.LoadPackData (cyclomatic 30) · ×1
  • ContentPack.LoadPackData (cyclomatic 30) ASVPack/Models/ContentPack.cs:2598 — ContentPack.LoadPackData has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 11 of the 30 points are its own statements and the rest belongs to 16 function literals inside it that branch (lines 2745, 2711, 2614, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ASVDataManager.GetMapImageWild (cyclomatic 30) · ×1
  • ASVDataManager.GetMapImageWild (cyclomatic 30) ArkViewer/Models/ASVDataManager.cs:912 — ASVDataManager.GetMapImageWild has cyclomatic complexity 30 (threshold 15). Of this number, 24 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · frmViewer.picMap_MouseClick (cyclomatic 29) · ×1
  • frmViewer.picMap_MouseClick (cyclomatic 29) ArkViewer/UI/frmViewer.cs:1545 — frmViewer.picMap_MouseClick 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 · AsaSavegame.parseStoredCreatures (cyclomatic 29) · ×1
  • AsaSavegame.parseStoredCreatures (cyclomatic 29) AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegame.cs:233 — AsaSavegame.parseStoredCreatures has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 243, 242). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ASVDataManager.GetMapImageTamed (cyclomatic 28) · ×1
  • ASVDataManager.GetMapImageTamed (cyclomatic 28) ArkViewer/Models/ASVDataManager.cs:1013 — ASVDataManager.GetMapImageTamed has cyclomatic complexity 28 (threshold 15). Of this number, 22 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · frmMapToolboxStructures.PopulateMapStructures (cyclomatic 28) · ×1
  • frmMapToolboxStructures.PopulateMapStructures (cyclomatic 28) ArkViewer/UI/frmMapToolboxStructures.cs:185 — frmMapToolboxStructures.PopulateMapStructures has cyclomatic complexity 28 (threshold 15). Of this number, 15 points are the body's own statements and 13 belong to 13 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · frmViewer.RefreshItemListTribes (cyclomatic 28) · ×1
  • frmViewer.RefreshItemListTribes (cyclomatic 28) ArkViewer/UI/frmViewer.cs:5791 — frmViewer.RefreshItemListTribes has cyclomatic complexity 28 (threshold 15). Of this number, 17 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContentPack.ExportClusterToJson (cyclomatic 27) · ×1
  • ContentPack.ExportClusterToJson (cyclomatic 27) ASVPack/Models/ContentPack.cs:219 — ContentPack.ExportClusterToJson has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 227). 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.
D1 · Cyclomatic Complexity · ContentLocalProfile.ContentLocalProfile.ctor (cyclomatic 26) · ×1
  • ContentLocalProfile.ContentLocalProfile.ctor (cyclomatic 26) ASVPack/Models/ContentLocalProfile.cs:29 — ContentLocalProfile.ContentLocalProfile.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 · ViewerConfiguration.Load (cyclomatic 26) · ×1
  • ViewerConfiguration.Load (cyclomatic 26) ArkViewer/Configuration/ViewerConfiguration.cs:247 — ViewerConfiguration.Load 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. Note what this body is, though: it works in explicit hardware vector and instruction-set types. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
D1 · Cyclomatic Complexity · ASVDataManager.GetMapImagePlayers (cyclomatic 26) · ×1
  • ASVDataManager.GetMapImagePlayers (cyclomatic 26) ArkViewer/Models/ASVDataManager.cs:1578 — ASVDataManager.GetMapImagePlayers has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body's own statements and 5 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 · frmViewer.AttemptReverseMapSelection (cyclomatic 26) · ×1
  • frmViewer.AttemptReverseMapSelection (cyclomatic 26) ArkViewer/UI/frmViewer.cs:4898 — frmViewer.AttemptReverseMapSelection 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 · frmViewer.LoadPlayerDetail (cyclomatic 26) · ×1
  • frmViewer.LoadPlayerDetail (cyclomatic 26) ArkViewer/UI/frmViewer.cs:6922 — frmViewer.LoadPlayerDetail has cyclomatic complexity 26 (threshold 15). Of this number, 25 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 · Program.Main (cyclomatic 26) · ×1
  • Program.Main (cyclomatic 26) ASVBot/Program.cs:24 — Program.Main has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 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 · frmViewer.LoadUploadedTames (cyclomatic 25) · ×1
  • frmViewer.LoadUploadedTames (cyclomatic 25) ArkViewer/UI/frmViewer.cs:6647 — frmViewer.LoadUploadedTames 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 · frmViewer.LoadDroppedItemDetail (cyclomatic 25) · ×1
  • frmViewer.LoadDroppedItemDetail (cyclomatic 25) ArkViewer/UI/frmViewer.cs:7065 — frmViewer.LoadDroppedItemDetail has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 7143, 7106). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · AsaPropertyRegistry.ReadProperty (cyclomatic 25) · ×1
  • AsaPropertyRegistry.ReadProperty (cyclomatic 25) AsaSavegameToolkit/AsaSavegameToolkit/AsaPropertyRegistry.cs:23 — AsaPropertyRegistry.ReadProperty has cyclomatic complexity 25 (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 · ContentCreature.ContentCreature.ctor (cyclomatic 24) · ×1
  • ContentCreature.ContentCreature.ctor (cyclomatic 24) ASVPack/Models/ContentCreature.cs:66 — ContentCreature.ContentCreature.ctor has cyclomatic complexity 24 (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 · ASVDataManager.GetMapImagePlayerStructures (cyclomatic 24) · ×1
  • ASVDataManager.GetMapImagePlayerStructures (cyclomatic 24) ArkViewer/Models/ASVDataManager.cs:1289 — ASVDataManager.GetMapImagePlayerStructures has cyclomatic complexity 24 (threshold 15). Of this number, 19 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · frmBreedingLines.PopulateWildLovers (cyclomatic 24) · ×1
  • frmBreedingLines.PopulateWildLovers (cyclomatic 24) ArkViewer/UI/frmBreedingLines.cs:95 — frmBreedingLines.PopulateWildLovers has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 112). 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.
D1 · Cyclomatic Complexity · frmSettings.frmSettings_Load (cyclomatic 24) · ×1
  • frmSettings.frmSettings_Load (cyclomatic 24) ArkViewer/UI/frmSettings.cs:530 — frmSettings.frmSettings_Load 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 · frmViewer.DownloadSFtp (cyclomatic 24) · ×1
  • frmViewer.DownloadSFtp (cyclomatic 24) ArkViewer/UI/frmViewer.cs:4111 — frmViewer.DownloadSFtp 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 · ASVDataManager.GetTamedCreatures (cyclomatic 23) · ×1
  • ASVDataManager.GetTamedCreatures (cyclomatic 23) ArkViewer/Models/ASVDataManager.cs:213 — ASVDataManager.GetTamedCreatures has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 254, 222, 220, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ASVDataManager.GetMapImageDroppedItems (cyclomatic 23) · ×1
  • ASVDataManager.GetMapImageDroppedItems (cyclomatic 23) ArkViewer/Models/ASVDataManager.cs:1107 — ASVDataManager.GetMapImageDroppedItems has cyclomatic complexity 23 (threshold 15). Of this number, 18 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ASVDataManager.GetMapImageDropBags (cyclomatic 22) · ×1
  • ASVDataManager.GetMapImageDropBags (cyclomatic 22) ArkViewer/Models/ASVDataManager.cs:1200 — ASVDataManager.GetMapImageDropBags has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 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 · frmViewer.RefreshRealms (cyclomatic 22) · ×1
  • frmViewer.RefreshRealms (cyclomatic 22) ArkViewer/UI/frmViewer.cs:643 — frmViewer.RefreshRealms has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · frmViewer.GetTamedCommandText (cyclomatic 22) · ×1
  • frmViewer.GetTamedCommandText (cyclomatic 22) ArkViewer/UI/frmViewer.cs:2066 — frmViewer.GetTamedCommandText 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 · frmViewer.LoadItemListDetail (cyclomatic 22) · ×1
  • frmViewer.LoadItemListDetail (cyclomatic 22) ArkViewer/UI/frmViewer.cs:6795 — frmViewer.LoadItemListDetail has cyclomatic complexity 22 (threshold 15). Of this number, 21 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 · ObjectCollector.visit (cyclomatic 21) · ×1
  • ObjectCollector.visit (cyclomatic 21) ArkSavegameToolkit/SavegameToolkitAdditions/ObjectCollector.cs:60 — ObjectCollector.visit 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 · PlayerCommands.GetMyItems (cyclomatic 20) · ×1
  • PlayerCommands.GetMyItems (cyclomatic 20) ASVBot/Commands/PlayerCommands.cs:647 — PlayerCommands.GetMyItems has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · Program.ExportWithCommandLineOptions (cyclomatic 19) · ×1
  • Program.ExportWithCommandLineOptions (cyclomatic 19) ASVExport/Program.cs:49 — Program.ExportWithCommandLineOptions has cyclomatic complexity 19 (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 · ChartControl.DrawChart (cyclomatic 19) · ×1
  • ChartControl.DrawChart (cyclomatic 19) ArkViewer/UI/ChartControl.cs:61 — ChartControl.DrawChart 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 · frmViewer.RefreshStructurePlayerList (cyclomatic 19) · ×1
  • frmViewer.RefreshStructurePlayerList (cyclomatic 19) ArkViewer/UI/frmViewer.cs:6326 — frmViewer.RefreshStructurePlayerList has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContentPack.ExportJsonPlayerStructures (cyclomatic 18) · ×1
  • ContentPack.ExportJsonPlayerStructures (cyclomatic 18) ASVPack/Models/ContentPack.cs:1554 — ContentPack.ExportJsonPlayerStructures 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 · ContentPlayer.ContentPlayer.ctor (cyclomatic 18) · ×1
  • ContentPlayer.ContentPlayer.ctor (cyclomatic 18) ASVPack/Models/ContentPlayer.cs:141 — ContentPlayer.ContentPlayer.ctor 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 · frmViewer.InitializeDefaults (cyclomatic 18) · ×1
  • frmViewer.InitializeDefaults (cyclomatic 18) ArkViewer/UI/frmViewer.cs:150 — frmViewer.InitializeDefaults 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 · frmViewer.tabFeatures_SelectedIndexChanged (cyclomatic 18) · ×1
  • frmViewer.tabFeatures_SelectedIndexChanged (cyclomatic 18) ArkViewer/UI/frmViewer.cs:1189 — frmViewer.tabFeatures_SelectedIndexChanged 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 · frmViewer.GetPlayerCommandText (cyclomatic 18) · ×1
  • frmViewer.GetPlayerCommandText (cyclomatic 18) ArkViewer/UI/frmViewer.cs:1804 — frmViewer.GetPlayerCommandText 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 · frmViewer.RefreshWildSummary (cyclomatic 18) · ×1
  • frmViewer.RefreshWildSummary (cyclomatic 18) ArkViewer/UI/frmViewer.cs:5529 — frmViewer.RefreshWildSummary has cyclomatic complexity 18 (threshold 15). Of this number, 17 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 · frmViewer.RefreshTamePlayerList (cyclomatic 18) · ×1
  • frmViewer.RefreshTamePlayerList (cyclomatic 18) ArkViewer/UI/frmViewer.cs:6244 — frmViewer.RefreshTamePlayerList has cyclomatic complexity 18 (threshold 15). Of this number, 17 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 · frmViewer.LoadPaintingStructureDetails (cyclomatic 18) · ×1
  • frmViewer.LoadPaintingStructureDetails (cyclomatic 18) ArkViewer/UI/frmViewer.cs:9355 — frmViewer.LoadPaintingStructureDetails has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContentTamedCreature.ContentTamedCreature.ctor (cyclomatic 17) · ×1
  • ContentTamedCreature.ContentTamedCreature.ctor (cyclomatic 17) ASVPack/Models/ContentTamedCreature.cs:285 — ContentTamedCreature.ContentTamedCreature.ctor 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 · Program.ExportWithCommandLineOptions (cyclomatic 17) · ×1
  • Program.ExportWithCommandLineOptions (cyclomatic 17) ArkViewer/Program.cs:212 — Program.ExportWithCommandLineOptions has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · frmSettings.btnSave_Click (cyclomatic 17) · ×1
  • frmSettings.btnSave_Click (cyclomatic 17) ArkViewer/UI/frmSettings.cs:786 — frmSettings.btnSave_Click 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 · frmViewer.GetTribeCommandText (cyclomatic 17) · ×1
  • frmViewer.GetTribeCommandText (cyclomatic 17) ArkViewer/UI/frmViewer.cs:2721 — frmViewer.GetTribeCommandText 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 · frmViewer.RefreshItemListPlayers (cyclomatic 17) · ×1
  • frmViewer.RefreshItemListPlayers (cyclomatic 17) ArkViewer/UI/frmViewer.cs:3851 — frmViewer.RefreshItemListPlayers has cyclomatic complexity 17 (threshold 15). Of this number, 16 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 · frmViewer.RefreshPaintingStructures (cyclomatic 17) · ×1
  • frmViewer.RefreshPaintingStructures (cyclomatic 17) ArkViewer/UI/frmViewer.cs:5191 — frmViewer.RefreshPaintingStructures has cyclomatic 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, separate the cases: extract each independent 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 · frmViewer.GetPaintingCommandText (cyclomatic 17) · ×1
  • frmViewer.GetPaintingCommandText (cyclomatic 17) ArkViewer/UI/frmViewer.cs:9605 — frmViewer.GetPaintingCommandText 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 · ContentPack.ExportJsonTamed (cyclomatic 16) · ×1
  • ContentPack.ExportJsonTamed (cyclomatic 16) ASVPack/Models/ContentPack.cs:510 — ContentPack.ExportJsonTamed 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 · ContentStructure.ContentStructure.ctor (cyclomatic 16) · ×1
  • ContentStructure.ContentStructure.ctor (cyclomatic 16) ASVPack/Models/ContentStructure.cs:82 — ContentStructure.ContentStructure.ctor has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ObjectCollector.applyOrderRules (cyclomatic 16) · ×1
  • ObjectCollector.applyOrderRules (cyclomatic 16) ArkSavegameToolkit/SavegameToolkitAdditions/ObjectCollector.cs:196 — ObjectCollector.applyOrderRules 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 · ObjectCollector.doRemap (cyclomatic 16) · ×1
  • ObjectCollector.doRemap (cyclomatic 16) ArkSavegameToolkit/SavegameToolkitAdditions/ObjectCollector.cs:276 — ObjectCollector.doRemap 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 · ViewerConfiguration.Save (cyclomatic 16) · ×1
  • ViewerConfiguration.Save (cyclomatic 16) ArkViewer/Configuration/ViewerConfiguration.cs:112 — ViewerConfiguration.Save 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.
D1 · Cyclomatic Complexity · frmMapToolboxStructures.mnuContextExport_Click (cyclomatic 16) · ×1
  • frmMapToolboxStructures.mnuContextExport_Click (cyclomatic 16) ArkViewer/UI/frmMapToolboxStructures.cs:725 — frmMapToolboxStructures.mnuContextExport_Click 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 · frmPlayerInventoryViewer.PopulateCreatureInventory (cyclomatic 16) · ×1
  • frmPlayerInventoryViewer.PopulateCreatureInventory (cyclomatic 16) ArkViewer/UI/frmPlayerInventoryViewer.cs:406 — frmPlayerInventoryViewer.PopulateCreatureInventory has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 417, 413). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · frmViewer.StartRCON (cyclomatic 16) · ×1
  • frmViewer.StartRCON (cyclomatic 16) ArkViewer/UI/frmViewer.cs:245 — frmViewer.StartRCON has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · frmViewer.GetWildCommandText (cyclomatic 16) · ×1
  • frmViewer.GetWildCommandText (cyclomatic 16) ArkViewer/UI/frmViewer.cs:1920 — frmViewer.GetWildCommandText 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 · frmViewer.RefreshStructureSummary (cyclomatic 16) · ×1
  • frmViewer.RefreshStructureSummary (cyclomatic 16) ArkViewer/UI/frmViewer.cs:5096 — frmViewer.RefreshStructureSummary has cyclomatic complexity 16 (threshold 15). Of this number, 15 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 · frmViewer.RefreshTamedSummary (cyclomatic 16) · ×1
  • frmViewer.RefreshTamedSummary (cyclomatic 16) ArkViewer/UI/frmViewer.cs:5430 — frmViewer.RefreshTamedSummary has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · frmViewer.RefreshStructureTribes (cyclomatic 16) · ×1
  • frmViewer.RefreshStructureTribes (cyclomatic 16) ArkViewer/UI/frmViewer.cs:5969 — frmViewer.RefreshStructureTribes has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D17 · Explicit Debt · BarePragmaDisable · ×1
  • BarePragmaDisable ArkSavegameToolkit/SavegameToolkit/ArkArchive.cs:60 — #pragma warning disable 162 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
D2 · Cognitive Complexity · frmViewer.mnuContext_ExportData_Click (cognitive 471) · ×1
  • frmViewer.mnuContext_ExportData_Click (cognitive 471) ArkViewer/UI/frmViewer.cs:2871 — frmViewer.mnuContext_ExportData_Click has cognitive complexity 471 (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 · ContentContainer.LoadArkAscendedData (cognitive 458) · ×1
  • ContentContainer.LoadArkAscendedData (cognitive 458) ASVPack/Models/ContentContainer.cs:1849 — ContentContainer.LoadArkAscendedData has cognitive complexity 458 (threshold 15). Of this number, 140 points are the body's own statements and 318 belong to 19 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ContentContainer.LoadArkEvolvedData (cognitive 408) · ×1
  • ContentContainer.LoadArkEvolvedData (cognitive 408) ASVPack/Models/ContentContainer.cs:472 — ContentContainer.LoadArkEvolvedData has cognitive complexity 408 (threshold 15). Of this number, 83 points are the body's own statements and 325 belong to 20 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · frmViewer.LoadTameDetail (cognitive 216) · ×1
  • frmViewer.LoadTameDetail (cognitive 216) ArkViewer/UI/frmViewer.cs:7205 — frmViewer.LoadTameDetail has cognitive complexity 216 (threshold 15). Of this number, 206 points are the body's own statements and 10 belong to 5 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ContentPack.ExportJsonMapStructures (cognitive 197) · ×1
  • ContentPack.ExportJsonMapStructures (cognitive 197) ASVPack/Models/ContentPack.cs:784 — ContentPack.ExportJsonMapStructures has cognitive complexity 197 (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 · ContentContainer.LoadSaveGame (cognitive 182) · ×1
  • ContentContainer.LoadSaveGame (cognitive 182) ASVPack/Models/ContentContainer.cs:112 — ContentContainer.LoadSaveGame has cognitive complexity 182 (threshold 15). Of this number, 26 points are the body's own statements and 156 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ASVDataManager.GetMapImageTribes (cognitive 151) · ×1
  • ASVDataManager.GetMapImageTribes (cognitive 151) ArkViewer/Models/ASVDataManager.cs:1376 — ASVDataManager.GetMapImageTribes has cognitive complexity 151 (threshold 15). Of this number, 148 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ContentPack.LoadGameData (cognitive 136) · ×1
  • ContentPack.LoadGameData (cognitive 136) ASVPack/Models/ContentPack.cs:2074 — ContentPack.LoadGameData has cognitive complexity 136 (threshold 15). Of this number, 70 points are the body's own statements and 66 belong to 30 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 · AsaSavegame.parseStoredCreatures (cognitive 136) · ×1
  • AsaSavegame.parseStoredCreatures (cognitive 136) AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegame.cs:233 — AsaSavegame.parseStoredCreatures has cognitive complexity 136 (threshold 15). Most of this is not in the body itself: 1 of the 136 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 243, 242). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ContentPack.ExportClusterToJson (cognitive 125) · ×1
  • ContentPack.ExportClusterToJson (cognitive 125) ASVPack/Models/ContentPack.cs:219 — ContentPack.ExportClusterToJson has cognitive complexity 125 (threshold 15). Most of this is not in the body itself: 3 of the 125 points are its own statements and the rest belongs to one function literal inside it that branches (line 227). 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.
D2 · Cognitive Complexity · Program.ExportCommandLine (cognitive 124) · ×1
  • Program.ExportCommandLine (cognitive 124) ArkViewer/Program.cs:441 — Program.ExportCommandLine has cognitive complexity 124 (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.ExportCommandLine (cognitive 121) · ×1
  • Program.ExportCommandLine (cognitive 121) ASVExport/Program.cs:306 — Program.ExportCommandLine has cognitive complexity 121 (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 · ASVDataManager.GetItems (cognitive 119) · ×1
  • ASVDataManager.GetItems (cognitive 119) ArkViewer/Models/ASVDataManager.cs:522 — ASVDataManager.GetItems has cognitive complexity 119 (threshold 15). Of this number, 71 points are the body's own statements and 48 belong to 7 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ArkSavegame.extractBinaryObjectStoredCreatures (cognitive 110) · ×1
  • ArkSavegame.extractBinaryObjectStoredCreatures (cognitive 110) REDACTED:62 — ArkSavegame.extractBinaryObjectStoredCreatures has cognitive complexity 110 (threshold 15). Most of this is not in the body itself: 13 of the 110 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 101, 81). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ContentLocalProfile.ContentLocalProfile.ctor (cognitive 108) · ×1
  • ContentLocalProfile.ContentLocalProfile.ctor (cognitive 108) ASVPack/Models/ContentLocalProfile.cs:29 — ContentLocalProfile.ContentLocalProfile.ctor has cognitive complexity 108 (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 · frmBreedingLines.PopulateAncestors (cognitive 97) · ×1
  • frmBreedingLines.PopulateAncestors (cognitive 97) ArkViewer/UI/frmBreedingLines.cs:666 — frmBreedingLines.PopulateAncestors has cognitive complexity 97 (threshold 15). Of this number, 95 points are the body's own statements and 2 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 · frmViewer.DownloadFtp (cognitive 75) · ×1
  • frmViewer.DownloadFtp (cognitive 75) ArkViewer/UI/frmViewer.cs:4270 — frmViewer.DownloadFtp has cognitive complexity 75 (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 · frmViewer.LoadPlayerStructureDetail (cognitive 71) · ×1
  • frmViewer.LoadPlayerStructureDetail (cognitive 71) ArkViewer/UI/frmViewer.cs:6414 — frmViewer.LoadPlayerStructureDetail has cognitive complexity 71 (threshold 15). Most of this is not in the body itself: 15 of the 71 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 6485, 6476). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ArkSavegame.readBinaryStoredObjects (cognitive 70) · ×1
  • ArkSavegame.readBinaryStoredObjects (cognitive 70) REDACTED:268 — ArkSavegame.readBinaryStoredObjects has cognitive complexity 70 (threshold 15). Of this number, 22 points are the body's own statements and 48 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ASVDataManager.AddMapStructures (cognitive 69) · ×1
  • ASVDataManager.AddMapStructures (cognitive 69) ArkViewer/Models/ASVDataManager.cs:1726 — ASVDataManager.AddMapStructures has cognitive complexity 69 (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 · frmBreedingLines.PopulateTamedLovers (cognitive 67) · ×1
  • frmBreedingLines.PopulateTamedLovers (cognitive 67) ArkViewer/UI/frmBreedingLines.cs:205 — frmBreedingLines.PopulateTamedLovers has cognitive complexity 67 (threshold 15). Most of this is not in the body itself: 7 of the 67 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 225, 209). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · AdminCommands.ListArkItems (cognitive 67) · ×1
  • AdminCommands.ListArkItems (cognitive 67) ASVBot/Commands/AdminCommands.cs:541 — AdminCommands.ListArkItems has cognitive complexity 67 (threshold 15). Of this number, 61 points are the body's own statements and 6 belong to 6 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 · ObjectCollector.visit (cognitive 66) · ×1
  • ObjectCollector.visit (cognitive 66) ArkSavegameToolkit/SavegameToolkitAdditions/ObjectCollector.cs:60 — ObjectCollector.visit has cognitive complexity 66 (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 · frmMapToolboxStructures.mnuContextExport_Click (cognitive 66) · ×1
  • frmMapToolboxStructures.mnuContextExport_Click (cognitive 66) ArkViewer/UI/frmMapToolboxStructures.cs:725 — frmMapToolboxStructures.mnuContextExport_Click has cognitive complexity 66 (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 66) · ×1
  • Program.Main (cognitive 66) ASVBot/Program.cs:24 — Program.Main has cognitive complexity 66 (threshold 15). Of this number, 64 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 · frmViewer.picMap_MouseClick (cognitive 65) · ×1
  • frmViewer.picMap_MouseClick (cognitive 65) ArkViewer/UI/frmViewer.cs:1545 — frmViewer.picMap_MouseClick has cognitive complexity 65 (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 · frmViewer.RefreshItemListTribes (cognitive 63) · ×1
  • frmViewer.RefreshItemListTribes (cognitive 63) ArkViewer/UI/frmViewer.cs:5791 — frmViewer.RefreshItemListTribes has cognitive complexity 63 (threshold 15). Of this number, 29 points are the body's own statements and 34 belong to 5 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ViewerConfiguration.Load (cognitive 60) · ×1
  • ViewerConfiguration.Load (cognitive 60) ArkViewer/Configuration/ViewerConfiguration.cs:247 — ViewerConfiguration.Load has cognitive complexity 60 (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. Note what this body is, though: it works in explicit hardware vector and instruction-set types. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
D2 · Cognitive Complexity · frmViewer.LoadWildDetail (cognitive 59) · ×1
  • frmViewer.LoadWildDetail (cognitive 59) ArkViewer/UI/frmViewer.cs:7661 — frmViewer.LoadWildDetail has cognitive complexity 59 (threshold 15). Of this number, 17 points are the body's own statements and 42 belong to 3 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 · frmViewer.DownloadSFtp (cognitive 57) · ×1
  • frmViewer.DownloadSFtp (cognitive 57) ArkViewer/UI/frmViewer.cs:4111 — frmViewer.DownloadSFtp 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 · ContentPlayer.ContentPlayer.ctor (cognitive 55) · ×1
  • ContentPlayer.ContentPlayer.ctor (cognitive 55) ASVPack/Models/ContentPlayer.cs:327 — ContentPlayer.ContentPlayer.ctor has cognitive complexity 55 (threshold 15). Of this number, 54 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frmViewer.LoadContent (cognitive 54) · ×1
  • frmViewer.LoadContent (cognitive 54) ArkViewer/UI/frmViewer.cs:316 — frmViewer.LoadContent has cognitive complexity 54 (threshold 15). Of this number, 52 points are the body's own statements and 2 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 · frmViewer.DrawMap (cognitive 53) · ×1
  • frmViewer.DrawMap (cognitive 53) ArkViewer/UI/frmViewer.cs:4651 — frmViewer.DrawMap has cognitive complexity 53 (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 · frmBreedingLines.PopulateTameDetails (cognitive 51) · ×1
  • frmBreedingLines.PopulateTameDetails (cognitive 51) ArkViewer/UI/frmBreedingLines.cs:415 — frmBreedingLines.PopulateTameDetails has cognitive complexity 51 (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 · frmViewer.AttemptReverseMapSelection (cognitive 51) · ×1
  • frmViewer.AttemptReverseMapSelection (cognitive 51) ArkViewer/UI/frmViewer.cs:4898 — frmViewer.AttemptReverseMapSelection has cognitive complexity 51 (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 · frmMapToolboxStructures.UpdateSelection (cognitive 49) · ×1
  • frmMapToolboxStructures.UpdateSelection (cognitive 49) ArkViewer/UI/frmMapToolboxStructures.cs:483 — frmMapToolboxStructures.UpdateSelection has cognitive complexity 49 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ContentPack.ExportJsonPlayerStructures (cognitive 48) · ×1
  • ContentPack.ExportJsonPlayerStructures (cognitive 48) ASVPack/Models/ContentPack.cs:1554 — ContentPack.ExportJsonPlayerStructures 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.
D2 · Cognitive Complexity · frmViewer.LoadDroppedItemDetail (cognitive 48) · ×1
  • frmViewer.LoadDroppedItemDetail (cognitive 48) ArkViewer/UI/frmViewer.cs:7065 — frmViewer.LoadDroppedItemDetail has cognitive complexity 48 (threshold 15). Most of this is not in the body itself: 14 of the 48 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 7143, 7106). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · frmTribeLog.LoadLog (cognitive 44) · ×1
  • frmTribeLog.LoadLog (cognitive 44) ArkViewer/UI/frmTribeLog.cs:117 — frmTribeLog.LoadLog has cognitive complexity 44 (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 · ObjectCollector.doRemap (cognitive 43) · ×1
  • ObjectCollector.doRemap (cognitive 43) ArkSavegameToolkit/SavegameToolkitAdditions/ObjectCollector.cs:276 — ObjectCollector.doRemap has cognitive complexity 43 (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 · frmViewer.GetTamedCommandText (cognitive 43) · ×1
  • frmViewer.GetTamedCommandText (cognitive 43) ArkViewer/UI/frmViewer.cs:2066 — frmViewer.GetTamedCommandText has cognitive complexity 43 (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 · frmViewer.LoadPlayerDetail (cognitive 43) · ×1
  • frmViewer.LoadPlayerDetail (cognitive 43) ArkViewer/UI/frmViewer.cs:6922 — frmViewer.LoadPlayerDetail has cognitive complexity 43 (threshold 15). Of this number, 42 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frmViewer.LoadUploadedTames (cognitive 42) · ×1
  • frmViewer.LoadUploadedTames (cognitive 42) ArkViewer/UI/frmViewer.cs:6647 — frmViewer.LoadUploadedTames has cognitive complexity 42 (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 · frmMapToolboxStructures.PopulateMapStructures (cognitive 40) · ×1
  • frmMapToolboxStructures.PopulateMapStructures (cognitive 40) ArkViewer/UI/frmMapToolboxStructures.cs:185 — frmMapToolboxStructures.PopulateMapStructures has cognitive complexity 40 (threshold 15). Most of this is not in the body itself: 14 of the 40 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 201, 223, 244, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · frmViewer.GetPlayerCommandText (cognitive 39) · ×1
  • frmViewer.GetPlayerCommandText (cognitive 39) ArkViewer/UI/frmViewer.cs:1804 — frmViewer.GetPlayerCommandText 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 · frmPlayerInventoryViewer.PopulateCreatureInventory (cognitive 37) · ×1
  • frmPlayerInventoryViewer.PopulateCreatureInventory (cognitive 37) ArkViewer/UI/frmPlayerInventoryViewer.cs:406 — frmPlayerInventoryViewer.PopulateCreatureInventory has cognitive complexity 37 (threshold 15). None of this is in the body itself: all 37 points belong to 2 function literals inside it that branch (lines 417, 413). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ASVDataManager.GetMapImagePlayers (cognitive 36) · ×1
  • ASVDataManager.GetMapImagePlayers (cognitive 36) ArkViewer/Models/ASVDataManager.cs:1578 — ASVDataManager.GetMapImagePlayers has cognitive complexity 36 (threshold 15). Of this number, 35 points are the body's own statements and 1 belongs 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 · frmBreedingLines.PopulateWildLovers (cognitive 36) · ×1
  • frmBreedingLines.PopulateWildLovers (cognitive 36) ArkViewer/UI/frmBreedingLines.cs:95 — frmBreedingLines.PopulateWildLovers has cognitive complexity 36 (threshold 15). Most of this is not in the body itself: 6 of the 36 points are its own statements and the rest belongs to one function literal inside it that branches (line 112). 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.
D2 · Cognitive Complexity · frmViewer.GetPaintingCommandText (cognitive 35) · ×1
  • frmViewer.GetPaintingCommandText (cognitive 35) ArkViewer/UI/frmViewer.cs:9605 — frmViewer.GetPaintingCommandText 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 · ContentCreature.ContentCreature.ctor (cognitive 34) · ×1
  • ContentCreature.ContentCreature.ctor (cognitive 34) ASVPack/Models/ContentCreature.cs:229 — ContentCreature.ContentCreature.ctor has cognitive complexity 34 (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.ExportJsonPlayers (cognitive 34) · ×1
  • ContentPack.ExportJsonPlayers (cognitive 34) ASVPack/Models/ContentPack.cs:1862 — ContentPack.ExportJsonPlayers has cognitive complexity 34 (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 · frmSettings.frmSettings_Load (cognitive 34) · ×1
  • frmSettings.frmSettings_Load (cognitive 34) ArkViewer/UI/frmSettings.cs:530 — frmSettings.frmSettings_Load 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 · ContentPlayer.ContentPlayer.ctor (cognitive 33) · ×1
  • ContentPlayer.ContentPlayer.ctor (cognitive 33) ASVPack/Models/ContentPlayer.cs:141 — ContentPlayer.ContentPlayer.ctor 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 · ContentPack.LoadPackData (cognitive 32) · ×1
  • ContentPack.LoadPackData (cognitive 32) ASVPack/Models/ContentPack.cs:2598 — ContentPack.LoadPackData has cognitive complexity 32 (threshold 15). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 16 function literals inside it that branch (lines 2711, 2745, 2614, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · frmPlayerInventoryViewer.PopulatePersonalInventory (cognitive 32) · ×1
  • frmPlayerInventoryViewer.PopulatePersonalInventory (cognitive 32) ArkViewer/UI/frmPlayerInventoryViewer.cs:320 — frmPlayerInventoryViewer.PopulatePersonalInventory has cognitive complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to one function literal inside it that branches (line 332). 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.
D2 · Cognitive Complexity · ContentPack.ExportJsonTamed (cognitive 31) · ×1
  • ContentPack.ExportJsonTamed (cognitive 31) ASVPack/Models/ContentPack.cs:510 — ContentPack.ExportJsonTamed 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 · ObjectCollector.applyOrderRules (cognitive 31) · ×1
  • ObjectCollector.applyOrderRules (cognitive 31) ArkSavegameToolkit/SavegameToolkitAdditions/ObjectCollector.cs:196 — ObjectCollector.applyOrderRules 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 · frmViewer.LoadItemListDetail (cognitive 31) · ×1
  • frmViewer.LoadItemListDetail (cognitive 31) ArkViewer/UI/frmViewer.cs:6795 — frmViewer.LoadItemListDetail has cognitive complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerCommands.GetMyItems (cognitive 31) · ×1
  • PlayerCommands.GetMyItems (cognitive 31) ASVBot/Commands/PlayerCommands.cs:647 — PlayerCommands.GetMyItems has cognitive complexity 31 (threshold 15). Of this number, 27 points are the body's own statements and 4 belong to 4 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 · frmViewer.RefreshTamePlayerList (cognitive 30) · ×1
  • frmViewer.RefreshTamePlayerList (cognitive 30) ArkViewer/UI/frmViewer.cs:6244 — frmViewer.RefreshTamePlayerList has cognitive complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArkSavegame.ExtractStoredArkProfiles (cognitive 29) · ×1
  • ArkSavegame.ExtractStoredArkProfiles (cognitive 29) REDACTED:538 — ArkSavegame.ExtractStoredArkProfiles 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 · frmViewer.GetWildCommandText (cognitive 29) · ×1
  • frmViewer.GetWildCommandText (cognitive 29) ArkViewer/UI/frmViewer.cs:1920 — frmViewer.GetWildCommandText 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 · frmViewer.RefreshItemListPlayers (cognitive 29) · ×1
  • frmViewer.RefreshItemListPlayers (cognitive 29) ArkViewer/UI/frmViewer.cs:3851 — frmViewer.RefreshItemListPlayers has cognitive complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frmViewer.RefreshWildSummary (cognitive 29) · ×1
  • frmViewer.RefreshWildSummary (cognitive 29) ArkViewer/UI/frmViewer.cs:5529 — frmViewer.RefreshWildSummary has cognitive complexity 29 (threshold 15). Of this number, 27 points are the body's own statements and 2 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 · ASVDataManager.GetMapImageWild (cognitive 28) · ×1
  • ASVDataManager.GetMapImageWild (cognitive 28) ArkViewer/Models/ASVDataManager.cs:912 — ASVDataManager.GetMapImageWild has cognitive complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 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 · ASVDataManager.GetMapImageTamed (cognitive 28) · ×1
  • ASVDataManager.GetMapImageTamed (cognitive 28) ArkViewer/Models/ASVDataManager.cs:1013 — ASVDataManager.GetMapImageTamed has cognitive complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 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 · ChartControl.DrawChart (cognitive 28) · ×1
  • ChartControl.DrawChart (cognitive 28) ArkViewer/UI/ChartControl.cs:61 — ChartControl.DrawChart 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 · frmViewer.GetTribeCommandText (cognitive 28) · ×1
  • frmViewer.GetTribeCommandText (cognitive 28) ArkViewer/UI/frmViewer.cs:2721 — frmViewer.GetTribeCommandText 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 · frmViewer.RefreshStructurePlayerList (cognitive 28) · ×1
  • frmViewer.RefreshStructurePlayerList (cognitive 28) ArkViewer/UI/frmViewer.cs:6326 — frmViewer.RefreshStructurePlayerList has cognitive complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 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 · frmDinoInventoryViewer.PopulateCreatureInventory (cognitive 27) · ×1
  • frmDinoInventoryViewer.PopulateCreatureInventory (cognitive 27) ArkViewer/UI/frmDinoInventoryViewer.cs:117 — frmDinoInventoryViewer.PopulateCreatureInventory has cognitive complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 148). 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.
D2 · Cognitive Complexity · frmViewer.RefreshPaintingTribes (cognitive 27) · ×1
  • frmViewer.RefreshPaintingTribes (cognitive 27) ArkViewer/UI/frmViewer.cs:6030 — frmViewer.RefreshPaintingTribes has cognitive complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs 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 · frmPlayerInventoryViewer.PopulateStructureInventory (cognitive 26) · ×1
  • frmPlayerInventoryViewer.PopulateStructureInventory (cognitive 26) ArkViewer/UI/frmPlayerInventoryViewer.cs:523 — frmPlayerInventoryViewer.PopulateStructureInventory has cognitive complexity 26 (threshold 15). None of this is in the body itself: all 26 points belong to 2 function literals inside it that branch (lines 561, 530). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · frmViewer.RefreshStructureTribes (cognitive 26) · ×1
  • frmViewer.RefreshStructureTribes (cognitive 26) ArkViewer/UI/frmViewer.cs:5969 — frmViewer.RefreshStructureTribes has cognitive complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 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 · ContentStructure.ContentStructure.ctor (cognitive 25) · ×1
  • ContentStructure.ContentStructure.ctor (cognitive 25) ASVPack/Models/ContentStructure.cs:82 — ContentStructure.ContentStructure.ctor has cognitive complexity 25 (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 · ASVDataManager.GetMapImageDroppedItems (cognitive 25) · ×1
  • ASVDataManager.GetMapImageDroppedItems (cognitive 25) ArkViewer/Models/ASVDataManager.cs:1107 — ASVDataManager.GetMapImageDroppedItems has cognitive complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ASVDataManager.GetMapImageDropBags (cognitive 25) · ×1
  • ASVDataManager.GetMapImageDropBags (cognitive 25) ArkViewer/Models/ASVDataManager.cs:1200 — ASVDataManager.GetMapImageDropBags has cognitive complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ASVDataManager.GetMapImagePlayerStructures (cognitive 25) · ×1
  • ASVDataManager.GetMapImagePlayerStructures (cognitive 25) ArkViewer/Models/ASVDataManager.cs:1289 — ASVDataManager.GetMapImagePlayerStructures has cognitive complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frmViewer.InitializeDefaults (cognitive 25) · ×1
  • frmViewer.InitializeDefaults (cognitive 25) ArkViewer/UI/frmViewer.cs:150 — frmViewer.InitializeDefaults 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 · frmViewer.btnDeletePlayer_Click (cognitive 25) · ×1
  • frmViewer.btnDeletePlayer_Click (cognitive 25) ArkViewer/UI/frmViewer.cs:3615 — frmViewer.btnDeletePlayer_Click 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 · frmViewer.RefreshPaintingStructures (cognitive 25) · ×1
  • frmViewer.RefreshPaintingStructures (cognitive 25) ArkViewer/UI/frmViewer.cs:5191 — frmViewer.RefreshPaintingStructures has cognitive complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 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 · ResponseDataFormatter.FormatResponseTable (cognitive 25) · ×1
  • ResponseDataFormatter.FormatResponseTable (cognitive 25) ASVBot/Data/ResponseDataFormatter.cs:11 — ResponseDataFormatter.FormatResponseTable 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 · frmViewer.StartRCON (cognitive 24) · ×1
  • frmViewer.StartRCON (cognitive 24) ArkViewer/UI/frmViewer.cs:245 — frmViewer.StartRCON 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 · frmViewer.RefreshStructureSummary (cognitive 24) · ×1
  • frmViewer.RefreshStructureSummary (cognitive 24) ArkViewer/UI/frmViewer.cs:5096 — frmViewer.RefreshStructureSummary has cognitive complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frmViewer.RefreshTamedSummary (cognitive 24) · ×1
  • frmViewer.RefreshTamedSummary (cognitive 24) ArkViewer/UI/frmViewer.cs:5430 — frmViewer.RefreshTamedSummary has cognitive complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 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 · frmViewer.RefreshTamedTribes (cognitive 24) · ×1
  • frmViewer.RefreshTamedTribes (cognitive 24) ArkViewer/UI/frmViewer.cs:5909 — frmViewer.RefreshTamedTribes has cognitive complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frmViewer.LoadPaintingStructureDetails (cognitive 24) · ×1
  • frmViewer.LoadPaintingStructureDetails (cognitive 24) ArkViewer/UI/frmViewer.cs:9355 — frmViewer.LoadPaintingStructureDetails has cognitive complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 9400, 9399, 9383). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · frmSettings.RefreshUnknownItems (cognitive 23) · ×1
  • frmSettings.RefreshUnknownItems (cognitive 23) ArkViewer/UI/frmSettings.cs:366 — frmSettings.RefreshUnknownItems has cognitive 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, 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 · frmStructureInventoryViewer.PopulateStructureInventory (cognitive 23) · ×1
  • frmStructureInventoryViewer.PopulateStructureInventory (cognitive 23) ArkViewer/UI/frmStructureInventoryViewer.cs:89 — frmStructureInventoryViewer.PopulateStructureInventory has cognitive complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 121). 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.
D2 · Cognitive Complexity · ContentTamedCreature.ContentTamedCreature.ctor (cognitive 22) · ×1
  • ContentTamedCreature.ContentTamedCreature.ctor (cognitive 22) ASVPack/Models/ContentTamedCreature.cs:285 — ContentTamedCreature.ContentTamedCreature.ctor has cognitive complexity 22 (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 · ArkSavegame.readBinaryStoredProfiles (cognitive 22) · ×1
  • ArkSavegame.readBinaryStoredProfiles (cognitive 22) REDACTED:912 — ArkSavegame.readBinaryStoredProfiles 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 · ViewerConfiguration.Save (cognitive 22) · ×1
  • ViewerConfiguration.Save (cognitive 22) ArkViewer/Configuration/ViewerConfiguration.cs:112 — ViewerConfiguration.Save has cognitive complexity 22 (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 · frmSettings.btnSave_Click (cognitive 22) · ×1
  • frmSettings.btnSave_Click (cognitive 22) ArkViewer/UI/frmSettings.cs:786 — frmSettings.btnSave_Click 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 · frmViewer.GetStructureCommandText (cognitive 22) · ×1
  • frmViewer.GetStructureCommandText (cognitive 22) ArkViewer/UI/frmViewer.cs:1345 — frmViewer.GetStructureCommandText 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: 2 other methods here (frmViewer.GetItemSearchCommandText, frmViewer.GetDroppedItemCommandText) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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 · frmViewer.GetItemSearchCommandText (cognitive 22) · ×1
  • frmViewer.GetItemSearchCommandText (cognitive 22) ArkViewer/UI/frmViewer.cs:1728 — frmViewer.GetItemSearchCommandText 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: 2 other methods here (frmViewer.GetStructureCommandText, frmViewer.GetDroppedItemCommandText) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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 · frmViewer.GetDroppedItemCommandText (cognitive 22) · ×1
  • frmViewer.GetDroppedItemCommandText (cognitive 22) ArkViewer/UI/frmViewer.cs:2462 — frmViewer.GetDroppedItemCommandText 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: 2 other methods here (frmViewer.GetStructureCommandText, frmViewer.GetItemSearchCommandText) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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 · ContentMapPack.LoadConfiguredMaps (cognitive 21) · ×1
  • ContentMapPack.LoadConfiguredMaps (cognitive 21) ASVPack/ContentMapPack.cs:18 — ContentMapPack.LoadConfiguredMaps 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 · frmSettings.RefreshUnknownColours (cognitive 21) · ×1
  • frmSettings.RefreshUnknownColours (cognitive 21) ArkViewer/UI/frmSettings.cs:198 — frmSettings.RefreshUnknownColours 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 · frmViewer.RefreshRealms (cognitive 21) · ×1
  • frmViewer.RefreshRealms (cognitive 21) ArkViewer/UI/frmViewer.cs:643 — frmViewer.RefreshRealms has cognitive complexity 21 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · frmViewer.RefreshDroppedItems (cognitive 21) · ×1
  • frmViewer.RefreshDroppedItems (cognitive 21) ArkViewer/UI/frmViewer.cs:6127 — frmViewer.RefreshDroppedItems 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 · Program.Main (cognitive 20) · ×1
  • Program.Main (cognitive 20) ArkViewer/Program.cs:93 — Program.Main has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frmViewer.RefreshPlayerList (cognitive 20) · ×1
  • frmViewer.RefreshPlayerList (cognitive 20) ArkViewer/UI/frmViewer.cs:6194 — frmViewer.RefreshPlayerList 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 · ContentWildCreature.ContentWildCreature.ctor (cognitive 19) · ×1
  • ContentWildCreature.ContentWildCreature.ctor (cognitive 19) ASVPack/Models/ContentWildCreature.cs:38 — ContentWildCreature.ContentWildCreature.ctor 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 · frmDeathCacheViewer.PopulateDeathCacheInventory (cognitive 19) · ×1
  • frmDeathCacheViewer.PopulateDeathCacheInventory (cognitive 19) ArkViewer/UI/frmDeathCacheViewer.cs:86 — frmDeathCacheViewer.PopulateDeathCacheInventory has cognitive complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 117). 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.
D2 · Cognitive Complexity · frmViewer.RefreshDroppedPlayers (cognitive 19) · ×1
  • frmViewer.RefreshDroppedPlayers (cognitive 19) ArkViewer/UI/frmViewer.cs:6083 — frmViewer.RefreshDroppedPlayers 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 · ContentPlayer.ContentPlayer.ctor (cognitive 18) · ×1
  • ContentPlayer.ContentPlayer.ctor (cognitive 18) ASVPack/Models/ContentPlayer.cs:64 — ContentPlayer.ContentPlayer.ctor 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 · DrawingContainer.SaveMapImageItems (cognitive 18) · ×1
  • DrawingContainer.SaveMapImageItems (cognitive 18) ASVPack/Models/DrawingContainer.cs:105 — DrawingContainer.SaveMapImageItems has cognitive complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · Program.GetSteamFolder (cognitive 18) · ×1
  • Program.GetSteamFolder (cognitive 18) ArkViewer/Program.cs:40 — Program.GetSteamFolder 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 · frmBreedingLines.SwitchStats (cognitive 18) · ×1
  • frmBreedingLines.SwitchStats (cognitive 18) ArkViewer/UI/frmBreedingLines.cs:1037 — frmBreedingLines.SwitchStats 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 · frmMapView.picMap_MouseMove (cognitive 18) · ×1
  • frmMapView.picMap_MouseMove (cognitive 18) ArkViewer/UI/frmMapView.cs:349 — frmMapView.picMap_MouseMove has cognitive complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frmViewer.tabFeatures_SelectedIndexChanged (cognitive 18) · ×1
  • frmViewer.tabFeatures_SelectedIndexChanged (cognitive 18) ArkViewer/UI/frmViewer.cs:1189 — frmViewer.tabFeatures_SelectedIndexChanged 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 · GameObjectContainerMixin.addObject (cognitive 17) · ×1
  • GameObjectContainerMixin.addObject (cognitive 17) ArkSavegameToolkit/SavegameToolkit/GameObjectContainerMixin.cs:11 — GameObjectContainerMixin.addObject has cognitive complexity 17 (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 · ChartControl.ChartControl_MouseMove (cognitive 17) · ×1
  • ChartControl.ChartControl_MouseMove (cognitive 17) ArkViewer/UI/ChartControl.cs:299 — ChartControl.ChartControl_MouseMove has cognitive complexity 17 (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 · frmSettings.RefreshUnknownCreatures (cognitive 17) · ×1
  • frmSettings.RefreshUnknownCreatures (cognitive 17) ArkViewer/UI/frmSettings.cs:285 — frmSettings.RefreshUnknownCreatures 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 (frmSettings.RefreshUnknownStructures) 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 · frmSettings.RefreshUnknownStructures (cognitive 17) · ×1
  • frmSettings.RefreshUnknownStructures (cognitive 17) ArkViewer/UI/frmSettings.cs:449 — frmSettings.RefreshUnknownStructures 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 (frmSettings.RefreshUnknownCreatures) 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 · frmViewer.RefreshLeaderboardTribes (cognitive 17) · ×1
  • frmViewer.RefreshLeaderboardTribes (cognitive 17) ArkViewer/UI/frmViewer.cs:5727 — frmViewer.RefreshLeaderboardTribes 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 · frmViewer.LoadLeaderboardPlayers (cognitive 17) · ×1
  • frmViewer.LoadLeaderboardPlayers (cognitive 17) ArkViewer/UI/frmViewer.cs:8483 — frmViewer.LoadLeaderboardPlayers 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 into named stages: move each independent 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 · frmViewer.LoadLeaderboardScores (cognitive 17) · ×1
  • frmViewer.LoadLeaderboardScores (cognitive 17) ArkViewer/UI/frmViewer.cs:8542 — frmViewer.LoadLeaderboardScores has cognitive complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 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 · AsaPropertyRegistry.ReadMapProperty (cognitive 17) · ×1
  • AsaPropertyRegistry.ReadMapProperty (cognitive 17) AsaSavegameToolkit/AsaSavegameToolkit/AsaPropertyRegistry.cs:129 — AsaPropertyRegistry.ReadMapProperty 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 · ArkSavegame.readBinaryDataFilesObjectMap (cognitive 16) · ×1
  • ArkSavegame.readBinaryDataFilesObjectMap (cognitive 16) REDACTED:776 — ArkSavegame.readBinaryDataFilesObjectMap has cognitive complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ASVDataManager.GetTamedCreatures (cognitive 16) · ×1
  • ASVDataManager.GetTamedCreatures (cognitive 16) ArkViewer/Models/ASVDataManager.cs:213 — ASVDataManager.GetTamedCreatures has cognitive complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 222, 220, 220, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ASVDataManager.GetMapImageItems (cognitive 16) · ×1
  • ASVDataManager.GetMapImageItems (cognitive 16) ArkViewer/Models/ASVDataManager.cs:839 — ASVDataManager.GetMapImageItems has cognitive complexity 16 (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 · frmPlayerInventoryViewer.PopulatePlayerEngrams (cognitive 16) · ×1
  • frmPlayerInventoryViewer.PopulatePlayerEngrams (cognitive 16) ArkViewer/UI/frmPlayerInventoryViewer.cs:137 — frmPlayerInventoryViewer.PopulatePlayerEngrams has cognitive complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 164, 210, 247, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · frmSettings.PopulateDinoClassMap (cognitive 16) · ×1
  • frmSettings.PopulateDinoClassMap (cognitive 16) ArkViewer/UI/frmSettings.cs:240 — frmSettings.PopulateDinoClassMap has cognitive complexity 16 (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 · frmSettings.PopulateSinglePlayerGames (cognitive 16) · ×1
  • frmSettings.PopulateSinglePlayerGames (cognitive 16) ArkViewer/UI/frmSettings.cs:482 — frmSettings.PopulateSinglePlayerGames 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 · frmViewer.mnuContext_TribeId_Click (cognitive 16) · ×1
  • frmViewer.mnuContext_TribeId_Click (cognitive 16) ArkViewer/UI/frmViewer.cs:2364 — frmViewer.mnuContext_TribeId_Click has cognitive complexity 16 (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 · AdminCommands.ListArkStructures (cognitive 16) · ×1
  • AdminCommands.ListArkStructures (cognitive 16) ASVBot/Commands/AdminCommands.cs:358 — AdminCommands.ListArkStructures has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerCommands.GetWildDetail (cognitive 16) · ×1
  • PlayerCommands.GetWildDetail (cognitive 16) ASVBot/Commands/PlayerCommands.cs:203 — PlayerCommands.GetWildDetail has cognitive complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 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.
D35 · Change Coupling · Change coupling · ×1
  • Change coupling: AdminCommands.cs ↔ PlayerCommands.cs ASVBot/Commands/AdminCommands.cs:1 — `ASVBot/Commands/AdminCommands.cs` and `ASVBot/Commands/PlayerCommands.cs` change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). 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 9 shared commits counted here, the most recent 3 are `de70633e` 4.6.1.1; `54d12244` Added final admin command for initial release.; `889ae933` Added basic templates for remaining admin commands. To be completed l… — run `git show` on any of them.
D4 · Code Duplication · Near-duplicate member pair (56 shared lines) · ×1
  • Near-duplicate member pair (56 shared lines) ASVPack/Models/ContentPlayer.cs:65 — ASVPack/Models/ContentPlayer.cs:65-139 | ASVPack/Models/ContentPlayer.cs:142-270 — These two members are variants of one another: 56 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (12 members, 50+ identical tokens) ArkViewer/UI/frmBreedingLines.cs:975 — ArkViewer/UI/frmBreedingLines.cs:975-1012 | ArkViewer/UI/frmBreedingLines.cs:1134-1170 | ArkViewer/UI/frmBreedingLines.cs:1173-1208 | ArkViewer/UI/frmMapToolboxStructures.cs:140-183 | ArkViewer/UI/frmViewer.cs:1346-1420 | ArkViewer/UI/frmViewer.cs:1729-1802 | ArkViewer/UI/frmViewer.cs:1805-1917 | ArkViewer/UI/frmViewer.cs:1921-2036 | ArkViewer/UI/frmViewer.cs:2067-2244 | ArkViewer/UI/frmViewer.cs:2463-2532 | ArkViewer/UI/frmViewer.cs:2722-2811 | ArkViewer/UI/frmViewer.cs:9606-9707 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
D4 · Code Duplication · Edited copy of a member (105 corresponding lines) · ×1
  • Edited copy of a member (105 corresponding lines) ASVPack/Models/ContentTamedCreature.cs:64 — ASVPack/Models/ContentTamedCreature.cs:64-168 | ASVPack/Models/ContentTamedCreature.cs:171-277 — These two members are one piece of code written twice and then edited apart: 105 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (143 corresponding lines) · ×1
  • Edited copy of a member (143 corresponding lines) ASVExport/Program.cs:50 — ASVExport/Program.cs:50-220 | ArkViewer/Program.cs:213-355 — These two members are one piece of code written twice and then edited apart: 143 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (85 corresponding lines) · ×1
  • Edited copy of a member (85 corresponding lines) ArkViewer/UI/frmViewer.cs:5097 — ArkViewer/UI/frmViewer.cs:5097-5189 | ArkViewer/UI/frmViewer.cs:5192-5276 — These two members are one piece of code written twice and then edited apart: 85 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (42 corresponding lines) · ×1
  • Edited copy of a member (42 corresponding lines) ArkViewer/UI/frmViewer.cs:6084 — ArkViewer/UI/frmViewer.cs:6084-6125 | ArkViewer/UI/frmViewer.cs:6195-6242 — 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 (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) ArkViewer/UI/frmSettings.cs:483 — ArkViewer/UI/frmSettings.cs:483-528 | ArkViewer/UI/frmViewer.cs:4038-4080 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 30+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 30+ corresponding lines) ArkViewer/UI/frmSettings.cs:286 — ArkViewer/UI/frmSettings.cs:286-315 | ArkViewer/UI/frmSettings.cs:367-405 | ArkViewer/UI/frmSettings.cs:450-480 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) ArkSavegameToolkit/SavegameToolkit/ArkArchive.cs:155 — ArkSavegameToolkit/SavegameToolkit/ArkArchive.cs:155-195 | AsaSavegameToolkit/AsaSavegameToolkit/AsaArchive.cs:45-85 — 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 (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) ArkViewer/UI/frmItemClassMap.cs:110 — ArkViewer/UI/frmItemClassMap.cs:110-139 | ArkViewer/UI/frmMarkerEditor.cs:194-230 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 36+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 36+ corresponding lines) ArkViewer/UI/frmViewer.cs:8326 — ArkViewer/UI/frmViewer.cs:8326-8362 | ArkViewer/UI/frmViewer.cs:8365-8400 | ArkViewer/UI/frmViewer.cs:8403-8438 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 36 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 54+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 54+ corresponding lines) ArkViewer/UI/frmDeathCacheViewer.cs:181 — ArkViewer/UI/frmDeathCacheViewer.cs:181-234 | ArkViewer/UI/frmDinoInventoryViewer.cs:211-264 | ArkViewer/UI/frmStructureInventoryViewer.cs:184-237 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 54 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 38+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 38+ corresponding lines) ArkViewer/UI/frmColourPicker.cs:19 — ArkViewer/UI/frmColourPicker.cs:19-58 | ArkViewer/UI/frmSettings.cs:1183-1220 | ArkViewer/UI/frmSettings.cs:1551-1596 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 38 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (65 corresponding lines) · ×1
  • Edited copy of a member (65 corresponding lines) ArkViewer/UI/frmFtpFileBrowser.cs:123 — ArkViewer/UI/frmFtpFileBrowser.cs:123-194 | ArkViewer/UI/frmFtpFileBrowser.cs:197-261 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 19+ corresponding lines) ArkViewer/UI/frmViewer.cs:8077 — ArkViewer/UI/frmViewer.cs:8077-8099 | ArkViewer/UI/frmViewer.cs:8102-8127 | ArkViewer/UI/frmViewer.cs:8130-8148 | ArkViewer/UI/frmViewer.cs:8151-8169 | ArkViewer/UI/frmViewer.cs:8172-8190 | ArkViewer/UI/frmViewer.cs:8193-8211 | ArkViewer/UI/frmViewer.cs:8214-8232 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 18+ corresponding lines) ArkViewer/UI/frmViewer.cs:5345 — ArkViewer/UI/frmViewer.cs:5345-5367 | ArkViewer/UI/frmViewer.cs:5370-5391 | ArkViewer/UI/frmViewer.cs:5411-5428 — 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 (6 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 21+ corresponding lines) ArkViewer/UI/frmSettings.cs:953 — ArkViewer/UI/frmSettings.cs:953-974 | ArkViewer/UI/frmSettings.cs:977-1000 | ArkViewer/UI/frmSettings.cs:1471-1493 | ArkViewer/UI/frmSettings.cs:1528-1548 | ArkViewer/UI/frmSettings.cs:1989-2015 | ArkViewer/UI/frmSettings.cs:2050-2074 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×1
  • Edited copy of a member (15 corresponding lines) AsaSavegameToolkit/AsaSavegameToolkit/AsaTribeStore.cs:83 — AsaSavegameToolkit/AsaSavegameToolkit/AsaTribeStore.cs:83-97 | AsaSavegameToolkit/AsaSavegameToolkit/AsaTribeStore.cs:100-118 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 32+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 32+ corresponding lines) ArkViewer/UI/frmViewer.cs:2296 — ArkViewer/UI/frmViewer.cs:2296-2327 | ArkViewer/UI/frmViewer.cs:2330-2362 | ArkViewer/UI/frmViewer.cs:9308-9342 — 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 copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) AsaSavegameToolkit/AsaSavegameToolkit/AsaProfile.cs:43 — AsaSavegameToolkit/AsaSavegameToolkit/AsaProfile.cs:43-70 | AsaSavegameToolkit/AsaSavegameToolkit/AsaTribe.cs:44-72 — 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 (4 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 15+ corresponding lines) ArkViewer/UI/frmViewer.cs:966 — ArkViewer/UI/frmViewer.cs:966-980 | ArkViewer/UI/frmViewer.cs:1117-1131 | ArkViewer/UI/frmViewer.cs:1437-1452 | ArkViewer/UI/frmViewer.cs:9803-9827 — 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 copy of a member (22 corresponding lines) · ×1
  • Edited copy of a member (22 corresponding lines) ArkSavegameToolkit/SavegameToolkit/Propertys/PropertyArray.cs:20 — ArkSavegameToolkit/SavegameToolkit/Propertys/PropertyArray.cs:20-43 | ArkSavegameToolkit/SavegameToolkit/Propertys/PropertyStruct.cs:26-47 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegame.cs:528 — AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegame.cs:528-558 | AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegame.cs:617-647 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×1
  • Edited copy of a member (17 corresponding lines) ArkViewer/UI/frmPlayerInventoryViewer.cs:728 — ArkViewer/UI/frmPlayerInventoryViewer.cs:728-745 | ArkViewer/UI/frmPlayerInventoryViewer.cs:748-764 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) REDACTED:733 — REDACTED:733-752 | REDACTED:755-774 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 9+ corresponding lines) ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:76 — ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:76-84 | ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:114-122 | AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:81-90 | AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:122-131 — 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 (14 corresponding lines) · ×1
  • Edited copy of a member (14 corresponding lines) ArkViewer/UI/ChartControl.cs:274 — ArkViewer/UI/ChartControl.cs:274-287 | ArkViewer/UI/frmViewer.cs:5394-5408 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 7+ corresponding lines) ArkViewer/UI/frmViewer.cs:9095 — ArkViewer/UI/frmViewer.cs:9095-9102 | ArkViewer/UI/frmViewer.cs:9267-9275 | ArkViewer/UI/frmViewer.cs:9278-9287 | ArkViewer/UI/frmViewer.cs:9290-9296 | ArkViewer/UI/frmViewer.cs:9299-9305 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (53 lines × 2) · ×1
  • Duplicated block (53 lines × 2) ArkViewer/UI/frmMapToolboxStructures.cs:662 — ArkViewer/UI/frmMapToolboxStructures.cs:662-714 | ArkViewer/UI/frmViewer.cs:1135-1187 — 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 (42 lines × 3) · ×1
  • Duplicated block (42 lines × 3) ArkViewer/UI/frmDeathCacheViewer.cs:185 — ArkViewer/UI/frmDeathCacheViewer.cs:185-226 | ArkViewer/UI/frmDinoInventoryViewer.cs:215-256 | ArkViewer/UI/frmStructureInventoryViewer.cs:188-229 — before extracting anything, compare `ArkViewer/UI/frmDeathCacheViewer.cs` and `ArkViewer/UI/frmDinoInventoryViewer.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×1
  • Duplicated block (42 lines × 2) ArkViewer/UI/frmMapToolboxMarkers.cs:262 — ArkViewer/UI/frmMapToolboxMarkers.cs:262-303 | ArkViewer/UI/frmTribeLog.cs:215-256 — 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 (82–84 lines × 2) · ×1
  • Duplicated block (82–84 lines × 2) ASVPack/Models/ContentContainer.cs:339 — ASVPack/Models/ContentContainer.cs:339-422 | ASVPack/Models/ContentPack.cs:277-358 — 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 `ASVPack/Models/ContentContainer.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. 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 (24–42 lines × 2) · ×1
  • Duplicated block (24–42 lines × 2) ASVPack/Models/ContentContainer.cs:1230 — ASVPack/Models/ContentContainer.cs:1230-1271 | ASVPack/Models/ContentContainer.cs:1350-1373 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentContainer.cs:1350` it does not close everything it opens, so those 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 (39 lines × 2) · ×1
  • Duplicated block (39 lines × 2) ArkViewer/UI/frmMapToolboxStructures.cs:780 — ArkViewer/UI/frmMapToolboxStructures.cs:780-818 | ArkViewer/UI/frmViewer.cs:3160-3198 — 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 `ArkViewer/UI/frmMapToolboxStructures.cs:780` 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 (36–38 lines × 15) · ×1
  • Duplicated block (36–38 lines × 15) ASVPack/Models/ContentPack.cs:735 — ASVPack/Models/ContentPack.cs:735-772 | ASVPack/Models/ContentPack.cs:824-860 | ASVPack/Models/ContentPack.cs:880-916 | ASVPack/Models/ContentPack.cs:936-972 | ASVPack/Models/ContentPack.cs:995-1031 | ASVPack/Models/ContentPack.cs:1051-1087 | ASVPack/Models/ContentPack.cs:1108-1144 | ASVPack/Models/ContentPack.cs:1165-1201 | ASVPack/Models/ContentPack.cs:1222-1258 | ASVPack/Models/ContentPack.cs:1278-1314 | ASVPack/Models/ContentPack.cs:1335-1371 | ASVPack/Models/ContentPack.cs:1391-1427 | ASVPack/Models/ContentPack.cs:1447-1483 | ASVPack/Models/ContentPack.cs:1504-1540 | ASVPack/Models/ContentPack.cs:1656-1691 — all 15 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ASVPack/Models/ContentPack.cs:772` calls `WriteEnd`, `WriteEndArray` and `ASVPack/Models/ContentPack.cs:860` 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 (34–37 lines × 2) · ×1
  • Duplicated block (34–37 lines × 2) ArkViewer/Models/ASVDataManager.cs:631 — ArkViewer/Models/ASVDataManager.cs:631-664 | ArkViewer/Models/ASVDataManager.cs:693-729 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/Models/ASVDataManager.cs:631` 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 (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) ArkViewer/UI/frmViewer.cs:5130 — ArkViewer/UI/frmViewer.cs:5130-5165 | ArkViewer/UI/frmViewer.cs:5218-5253 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:5130` 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 (32–34 lines × 2) · ×1
  • Duplicated block (32–34 lines × 2) ASVExport/Program.cs:310 — ASVExport/Program.cs:310-343 | ArkViewer/Program.cs:445-476 — `ASVExport/Program.cs` and `ArkViewer/Program.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 198 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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, `ArkViewer/Program.cs:443` calls `Trace` and `ASVExport/Program.cs:307` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (64 lines × 2) · ×1
  • Duplicated block (64 lines × 2) ASVExport/Program.cs:384 — ASVExport/Program.cs:384-447 | ArkViewer/Program.cs:502-565 — `ASVExport/Program.cs` and `ArkViewer/Program.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 198 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `ASVExport/Program.cs:384` 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 (31–32 lines × 2) · ×1
  • Duplicated block (31–32 lines × 2) ASVPack/Models/ContentCreature.cs:67 — ASVPack/Models/ContentCreature.cs:67-98 | ASVPack/Models/ContentCreature.cs:230-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentCreature.cs:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `creatureObject` to `AsaGameObject` in one and `GameObject` 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 (29–32 lines × 2) · ×1
  • Duplicated block (29–32 lines × 2) ArkViewer/UI/frmViewer.cs:3882 — ArkViewer/UI/frmViewer.cs:3882-3910 | ArkViewer/UI/frmViewer.cs:6361-6392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:3882` 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 (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) ASVExport/Program.cs:70 — ASVExport/Program.cs:70-99 | ArkViewer/Program.cs:230-259 — `ASVExport/Program.cs` and `ArkViewer/Program.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 198 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `ASVExport/Program.cs:70` 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 (29–30 lines × 3) · ×1
  • Duplicated block (29–30 lines × 3) ArkViewer/Models/ASVDataManager.cs:1412 — ArkViewer/Models/ASVDataManager.cs:1412-1440 | ArkViewer/Models/ASVDataManager.cs:1459-1488 | ArkViewer/Models/ASVDataManager.cs:1509-1538 — 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 `ArkViewer/Models/ASVDataManager.cs:1412` it does not close everything it opens, so those 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 (26–28 lines × 4) · ×1
  • Duplicated block (26–28 lines × 4) ASVPack/Models/DrawingContainer.cs:67 — ASVPack/Models/DrawingContainer.cs:67-92 | ASVPack/Models/DrawingContainer.cs:132-159 | ASVPack/Models/DrawingContainer.cs:173-199 | ASVPack/Models/DrawingContainer.cs:232-257 — 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 `ASVPack/Models/DrawingContainer.cs:67` 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 (27–28 lines × 2) · ×1
  • Duplicated block (27–28 lines × 2) ArkSavegameToolkit/SavegameToolkit/ArkArchive.cs:155 — ArkSavegameToolkit/SavegameToolkit/ArkArchive.cs:155-181 | AsaSavegameToolkit/AsaSavegameToolkit/AsaArchive.cs:45-72 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `ArkSavegameToolkit/SavegameToolkit/ArkArchive.cs:155` it does not close everything it opens, so those 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 (21–27 lines × 4) · ×1
  • Duplicated block (21–27 lines × 4) ASVExport/Program.cs:466 — ASVExport/Program.cs:466-490 | ASVExport/Program.cs:491-517 | ASVExport/Program.cs:518-539 | ASVExport/Program.cs:540-560 — 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 `ASVExport/Program.cs:466` 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–27 lines × 2) · ×1
  • Duplicated block (25–27 lines × 2) ArkViewer/UI/frmViewer.cs:1891 — ArkViewer/UI/frmViewer.cs:1891-1917 | ArkViewer/UI/frmViewer.cs:9683-9707 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:1891` 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–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) ASVBot/Commands/AdminCommands.cs:254 — ASVBot/Commands/AdminCommands.cs:254-279 | ASVBot/Commands/AdminCommands.cs:308-334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVBot/Commands/AdminCommands.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 (25–26 lines × 6) · ×1
  • Duplicated block (25–26 lines × 6) ArkViewer/UI/frmViewer.cs:1350 — ArkViewer/UI/frmViewer.cs:1350-1374 | ArkViewer/UI/frmViewer.cs:1733-1758 | ArkViewer/UI/frmViewer.cs:1809-1833 | ArkViewer/UI/frmViewer.cs:2072-2096 | ArkViewer/UI/frmViewer.cs:2467-2492 | ArkViewer/UI/frmViewer.cs:9611-9635 — 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. 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 (24–26 lines × 3) · ×1
  • Duplicated block (24–26 lines × 3) ASVPack/Models/ContentContainer.cs:1660 — ASVPack/Models/ContentContainer.cs:1660-1684 | ASVPack/Models/ContentContainer.cs:1716-1741 | ASVPack/Models/ContentContainer.cs:1745-1768 — 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 `ASVPack/Models/ContentContainer.cs:1660` 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 (25–26 lines × 3) · ×1
  • Duplicated block (25–26 lines × 3) ArkViewer/UI/frmViewer.cs:2536 — ArkViewer/UI/frmViewer.cs:2536-2561 | ArkViewer/UI/frmViewer.cs:2694-2718 | ArkViewer/UI/frmViewer.cs:3968-3993 — 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. 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 (25–26 lines × 2) · ×1
  • Duplicated block (25–26 lines × 2) ASVPack/Models/ContentContainer.cs:276 — ASVPack/Models/ContentContainer.cs:276-301 | ASVPack/Models/ContentPack.cs:235-259 — 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 `ASVPack/Models/ContentContainer.cs:276` it does not close everything it opens, so those 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 (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) ASVPack/Models/ContentPlayer.cs:82 — ASVPack/Models/ContentPlayer.cs:82-107 | ASVPack/Models/ContentPlayer.cs:162-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 `ASVPack/Models/ContentPlayer.cs:82` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23–25 lines × 6) · ×1
  • Duplicated block (23–25 lines × 6) ASVPack/Models/ContentPack.cs:2209 — ASVPack/Models/ContentPack.cs:2209-2232 | ASVPack/Models/ContentPack.cs:2241-2263 | ASVPack/Models/ContentPack.cs:2272-2295 | ASVPack/Models/ContentPack.cs:2304-2327 | ASVPack/Models/ContentPack.cs:2335-2359 | ASVPack/Models/ContentPack.cs:2509-2531 — 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 `ASVPack/Models/ContentPack.cs:2209` 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 (24–25 lines × 5) · ×1
  • Duplicated block (24–25 lines × 5) ArkViewer/UI/frmViewer.cs:1291 — ArkViewer/UI/frmViewer.cs:1291-1315 | ArkViewer/UI/frmViewer.cs:1319-1343 | ArkViewer/UI/frmViewer.cs:1702-1726 | ArkViewer/UI/frmViewer.cs:2041-2064 | ArkViewer/UI/frmViewer.cs:9575-9598 — 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. 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 (23–25 lines × 5) · ×1
  • Duplicated block (23–25 lines × 5) ASVBot/Commands/AdminCommands.cs:254 — ASVBot/Commands/AdminCommands.cs:254-276 | ASVBot/Commands/AdminCommands.cs:308-331 | ASVBot/Commands/AdminCommands.cs:364-387 | ASVBot/Commands/AdminCommands.cs:441-465 | ASVBot/Commands/AdminCommands.cs:549-573 — 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.
D4 · Code Duplication · Duplicated block (23–25 lines × 3) · ×1
  • Duplicated block (23–25 lines × 3) ArkViewer/UI/frmBreedingLines.cs:277 — ArkViewer/UI/frmBreedingLines.cs:277-299 | ArkViewer/UI/frmBreedingLines.cs:476-500 | ArkViewer/UI/frmBreedingLines.cs:765-789 — 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 `ArkViewer/UI/frmBreedingLines.cs:277` it does not close everything it opens, so those 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 (23 lines × 3) · ×1
  • Duplicated block (23 lines × 3) ArkViewer/UI/frmBreedingLines.cs:990 — ArkViewer/UI/frmBreedingLines.cs:990-1012 | ArkViewer/UI/frmBreedingLines.cs:1148-1170 | ArkViewer/UI/frmBreedingLines.cs:1186-1208 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmBreedingLines.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ArkViewer/UI/frmBreedingLines.cs:988` calls `Replace`, `ToString` and `ArkViewer/UI/frmBreedingLines.cs:1184` 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 (23–25 lines × 2) · ×1
  • Duplicated block (23–25 lines × 2) ASVPack/Models/ContentContainer.cs:1313 — ASVPack/Models/ContentContainer.cs:1313-1335 | ASVPack/Models/ContentContainer.cs:2512-2536 — both copies are in the same file, so extract the 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 (15–25 lines × 2) · ×1
  • Duplicated block (15–25 lines × 2) ArkViewer/UI/frmViewer.cs:4394 — ArkViewer/UI/frmViewer.cs:4394-4418 | ArkViewer/UI/frmViewer.cs:4473-4487 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:4394` it does not close everything it opens, so those 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–25 lines × 2) · ×1
  • Duplicated block (13–25 lines × 2) ArkViewer/UI/frmViewer.cs:7581 — ArkViewer/UI/frmViewer.cs:7581-7605 | ArkViewer/UI/frmViewer.cs:7810-7822 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:7581` it does not close everything it opens, so those 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 (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) AsaSavegameToolkit/AsaSavegameToolkit/AsaObject.cs:22 — AsaSavegameToolkit/AsaSavegameToolkit/AsaObject.cs:22-45 | AsaSavegameToolkit/AsaSavegameToolkit/AsaObject.cs:49-72 — both copies are in the same file, so extract the 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 (20–24 lines × 3) · ×1
  • Duplicated block (20–24 lines × 3) ASVPack/Models/ContentContainer.cs:2420 — ASVPack/Models/ContentContainer.cs:2420-2439 | ASVPack/Models/ContentContainer.cs:2442-2462 | ASVPack/Models/ContentContainer.cs:2549-2572 — 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 (22 lines × 3) · ×1
  • Duplicated block (22 lines × 3) ASVBot/Commands/PlayerCommands.cs:417 — ASVBot/Commands/PlayerCommands.cs:417-438 | ASVBot/Commands/PlayerCommands.cs:502-523 | ASVBot/Commands/PlayerCommands.cs:589-610 — 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 `ASVBot/Commands/PlayerCommands.cs:417` 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 (23–24 lines × 2) · ×1
  • Duplicated block (23–24 lines × 2) ArkViewer/UI/frmDeathCacheViewer.cs:101 — ArkViewer/UI/frmDeathCacheViewer.cs:101-123 | ArkViewer/UI/frmDinoInventoryViewer.cs:131-154 — before extracting anything, compare `ArkViewer/UI/frmDeathCacheViewer.cs` and `ArkViewer/UI/frmDinoInventoryViewer.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 109 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 `ArkViewer/UI/frmDeathCacheViewer.cs:101` 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 (21–23 lines × 9) · ×1
  • Duplicated block (21–23 lines × 9) ArkViewer/Models/ASVDataManager.cs:963 — ArkViewer/Models/ASVDataManager.cs:963-984 | ArkViewer/Models/ASVDataManager.cs:1058-1080 | ArkViewer/Models/ASVDataManager.cs:1151-1171 | ArkViewer/Models/ASVDataManager.cs:1243-1263 | ArkViewer/Models/ASVDataManager.cs:1327-1347 | ArkViewer/Models/ASVDataManager.cs:1420-1440 | ArkViewer/Models/ASVDataManager.cs:1467-1488 | ArkViewer/Models/ASVDataManager.cs:1517-1538 | ArkViewer/Models/ASVDataManager.cs:1617-1638 — 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. 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 (21–23 lines × 6) · ×1
  • Duplicated block (21–23 lines × 6) ASVPack/Models/ContentPack.cs:2148 — ASVPack/Models/ContentPack.cs:2148-2170 | ASVPack/Models/ContentPack.cs:2368-2388 | ASVPack/Models/ContentPack.cs:2396-2416 | ASVPack/Models/ContentPack.cs:2424-2444 | ASVPack/Models/ContentPack.cs:2452-2472 | ASVPack/Models/ContentPack.cs:2481-2501 — 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 `ASVPack/Models/ContentPack.cs:2148` 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 (23 lines × 5) · ×1
  • Duplicated block (23 lines × 5) ArkViewer/UI/frmViewer.cs:3084 — ArkViewer/UI/frmViewer.cs:3084-3106 | ArkViewer/UI/frmViewer.cs:3200-3222 | ArkViewer/UI/frmViewer.cs:3315-3337 | ArkViewer/UI/frmViewer.cs:3431-3453 | ArkViewer/UI/frmViewer.cs:3546-3568 — 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 `ArkViewer/UI/frmViewer.cs:3084` 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 (22–23 lines × 5) · ×1
  • Duplicated block (22–23 lines × 5) ArkViewer/UI/frmViewer.cs:9109 — ArkViewer/UI/frmViewer.cs:9109-9131 | ArkViewer/UI/frmViewer.cs:9141-9162 | ArkViewer/UI/frmViewer.cs:9174-9195 | ArkViewer/UI/frmViewer.cs:9207-9228 | ArkViewer/UI/frmViewer.cs:9239-9260 — 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.
D4 · Code Duplication · Duplicated block (15–23 lines × 2) · ×1
  • Duplicated block (15–23 lines × 2) ArkViewer/UI/frmPlayerInventoryViewer.cs:156 — ArkViewer/UI/frmPlayerInventoryViewer.cs:156-170 | ArkViewer/UI/frmStructureInventoryViewer.cs:105-127 — before extracting anything, compare `ArkViewer/UI/frmPlayerInventoryViewer.cs` and `ArkViewer/UI/frmStructureInventoryViewer.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 102 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 `ArkViewer/UI/frmPlayerInventoryViewer.cs:156` 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 (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) ArkViewer/UI/frmViewer.cs:5976 — ArkViewer/UI/frmViewer.cs:5976-5996 | ArkViewer/UI/frmViewer.cs:6037-6057 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:5976` it does not close everything it opens, so those 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 (20–21 lines × 19) · ×1
  • Duplicated block (20–21 lines × 19) ArkViewer/UI/frmAddLocalARK.cs:49 — ArkViewer/UI/frmAddLocalARK.cs:49-69 | ArkViewer/UI/frmBreedingFindOptions.cs:61-81 | ArkViewer/UI/frmBreedingLines.cs:71-91 | ArkViewer/UI/frmColourEditor.cs:40-60 | ArkViewer/UI/frmDeathCacheViewer.cs:47-67 | ArkViewer/UI/frmDinoInventoryViewer.cs:47-67 | ArkViewer/UI/frmFtpFileBrowser.cs:68-88 | ArkViewer/UI/frmGenericClassMap.cs:43-63 | ArkViewer/UI/frmItemClassMap.cs:42-62 | ArkViewer/UI/frmMapToolboxMarkers.cs:76-96 | ArkViewer/UI/frmMapToolboxStructures.cs:84-104 | ArkViewer/UI/frmMapView.cs:70-90 | ArkViewer/UI/frmMarkerEditor.cs:46-66 | ArkViewer/UI/frmPlayerInventoryViewer.cs:78-97 | ArkViewer/UI/frmStructureExclusionFilter.cs:44-64 | ArkViewer/UI/frmStructureInventoryViewer.cs:46-66 | ArkViewer/UI/frmTribeLog.cs:42-62 | ArkViewer/UI/frmTribeLogColourMap.cs:40-60 | ArkViewer/UI/frmViewer.cs:102-122 — 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 19 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmAddLocalARK.cs:49` 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 (20–21 lines × 13) · ×1
  • Duplicated block (20–21 lines × 13) ArkViewer/UI/frmMapToolboxStructures.cs:200 — ArkViewer/UI/frmMapToolboxStructures.cs:200-220 | ArkViewer/UI/frmMapToolboxStructures.cs:222-241 | ArkViewer/UI/frmMapToolboxStructures.cs:243-262 | ArkViewer/UI/frmMapToolboxStructures.cs:264-283 | ArkViewer/UI/frmMapToolboxStructures.cs:285-304 | ArkViewer/UI/frmMapToolboxStructures.cs:306-325 | ArkViewer/UI/frmMapToolboxStructures.cs:327-346 | ArkViewer/UI/frmMapToolboxStructures.cs:348-367 | ArkViewer/UI/frmMapToolboxStructures.cs:369-388 | ArkViewer/UI/frmMapToolboxStructures.cs:390-409 | ArkViewer/UI/frmMapToolboxStructures.cs:411-431 | ArkViewer/UI/frmMapToolboxStructures.cs:433-453 | ArkViewer/UI/frmMapToolboxStructures.cs:455-475 — all 13 copies are in the same file, so extract the block into one function there and call 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 `ArkViewer/UI/frmMapToolboxStructures.cs:200` 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 (18–21 lines × 7) · ×1
  • Duplicated block (18–21 lines × 7) ArkViewer/UI/frmViewer.cs:1396 — ArkViewer/UI/frmViewer.cs:1396-1416 | ArkViewer/UI/frmViewer.cs:1781-1799 | ArkViewer/UI/frmViewer.cs:1889-1907 | ArkViewer/UI/frmViewer.cs:2013-2032 | ArkViewer/UI/frmViewer.cs:2512-2529 | ArkViewer/UI/frmViewer.cs:2790-2807 | ArkViewer/UI/frmViewer.cs:9681-9699 — 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 `ArkViewer/UI/frmViewer.cs:1396` 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, `ArkViewer/UI/frmViewer.cs:1392` calls `Replace`, `ToString` and `ArkViewer/UI/frmViewer.cs:1777` 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 × 3) · ×1
  • Duplicated block (21 lines × 3) ASVPack/Models/ContentContainer.cs:2780 — ASVPack/Models/ContentContainer.cs:2780-2800 | ASVPack/Models/ContentContainer.cs:2820-2840 | ASVPack/Models/ContentContainer.cs:3021-3041 — 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–20 lines × 7) · ×1
  • Duplicated block (19–20 lines × 7) ArkViewer/UI/frmMapToolboxStructures.cs:776 — ArkViewer/UI/frmMapToolboxStructures.cs:776-794 | ArkViewer/UI/frmViewer.cs:2925-2944 | ArkViewer/UI/frmViewer.cs:3040-3058 | ArkViewer/UI/frmViewer.cs:3156-3174 | ArkViewer/UI/frmViewer.cs:3271-3289 | ArkViewer/UI/frmViewer.cs:3387-3405 | ArkViewer/UI/frmViewer.cs:3502-3520 — there are 7 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 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmMapToolboxStructures.cs:776` 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 before the matched lines, `ArkViewer/UI/frmMapToolboxStructures.cs:775` calls `Add` and `ArkViewer/UI/frmViewer.cs:2923` 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 (14 lines × 6) · ×1
  • Duplicated block (14 lines × 6) ArkViewer/UI/frmViewer.cs:2986 — ArkViewer/UI/frmViewer.cs:2986-2999 | ArkViewer/UI/frmViewer.cs:3100-3113 | ArkViewer/UI/frmViewer.cs:3216-3229 | ArkViewer/UI/frmViewer.cs:3331-3344 | ArkViewer/UI/frmViewer.cs:3447-3460 | ArkViewer/UI/frmViewer.cs:3562-3575 — 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 `ArkViewer/UI/frmViewer.cs:2986` 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–20 lines × 2) · ×1
  • Duplicated block (14–20 lines × 2) ASVPack/Models/ContentContainer.cs:2531 — ASVPack/Models/ContentContainer.cs:2531-2550 | ASVPack/Models/ContentContainer.cs:2920-2933 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentContainer.cs:2531` it does not close everything it opens, so those 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 × 2) · ×1
  • Duplicated block (19–20 lines × 2) ASVExport/Program.cs:226 — ASVExport/Program.cs:226-245 | ArkViewer/Program.cs:361-379 — `ASVExport/Program.cs` and `ArkViewer/Program.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 198 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `ASVExport/Program.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.
D4 · Code Duplication · Duplicated block (17–20 lines × 2) · ×1
  • Duplicated block (17–20 lines × 2) ArkViewer/UI/frmViewer.cs:4962 — ArkViewer/UI/frmViewer.cs:4962-4981 | ArkViewer/UI/frmViewer.cs:4990-5006 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:4962` 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 (8–19 lines × 7) · ×1
  • Duplicated block (8–19 lines × 7) ArkViewer/Models/ASVDataManager.cs:1743 — ArkViewer/Models/ASVDataManager.cs:1743-1750 | ArkViewer/Models/ASVDataManager.cs:1759-1776 | ArkViewer/Models/ASVDataManager.cs:1789-1806 | ArkViewer/Models/ASVDataManager.cs:1817-1831 | ArkViewer/Models/ASVDataManager.cs:1844-1862 | ArkViewer/Models/ASVDataManager.cs:1875-1892 | ArkViewer/Models/ASVDataManager.cs:1904-1921 — 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 `ArkViewer/Models/ASVDataManager.cs:1759` it does not close everything it opens, so those 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 (17 lines × 3) · ×1
  • Duplicated block (17 lines × 3) ArkViewer/UI/frmSettings.cs:955 — ArkViewer/UI/frmSettings.cs:955-971 | ArkViewer/UI/frmSettings.cs:981-997 | ArkViewer/UI/frmSettings.cs:1995-2011 — 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 `ArkViewer/UI/frmSettings.cs:955` it does not close everything it opens, so those 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, `ArkViewer/UI/frmSettings.cs:2012` calls `Remove` and `ArkViewer/UI/frmSettings.cs:973` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) ArkViewer/UI/frmSettings.cs:1475 — ArkViewer/UI/frmSettings.cs:1475-1489 | ArkViewer/UI/frmSettings.cs:1530-1544 | ArkViewer/UI/frmSettings.cs:2055-2069 — 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 `ArkViewer/UI/frmSettings.cs:1475` it does not close everything it opens, so those 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 (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) ASVPack/Models/ContentPack.cs:1719 — ASVPack/Models/ContentPack.cs:1719-1736 | ASVPack/Models/ContentPack.cs:1779-1796 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentPack.cs:1719` it does not close everything it opens, so those 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) ArkViewer/UI/frmViewer.cs:4424 — ArkViewer/UI/frmViewer.cs:4424-4441 | ArkViewer/UI/frmViewer.cs:4464-4479 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:4424` it does not close everything it opens, so those 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 × 19) · ×1
  • Duplicated block (15 lines × 19) ArkViewer/UI/frmAddLocalARK.cs:28 — ArkViewer/UI/frmAddLocalARK.cs:28-42 | ArkViewer/UI/frmBreedingFindOptions.cs:40-54 | ArkViewer/UI/frmBreedingLines.cs:50-64 | ArkViewer/UI/frmColourEditor.cs:19-33 | ArkViewer/UI/frmDeathCacheViewer.cs:26-40 | ArkViewer/UI/frmDinoInventoryViewer.cs:26-40 | ArkViewer/UI/frmFtpFileBrowser.cs:47-61 | ArkViewer/UI/frmGenericClassMap.cs:22-36 | ArkViewer/UI/frmItemClassMap.cs:21-35 | ArkViewer/UI/frmMapToolboxMarkers.cs:55-69 | ArkViewer/UI/frmMapToolboxStructures.cs:63-77 | ArkViewer/UI/frmMapView.cs:49-63 | ArkViewer/UI/frmMarkerEditor.cs:25-39 | ArkViewer/UI/frmPlayerInventoryViewer.cs:57-71 | ArkViewer/UI/frmStructureExclusionFilter.cs:23-37 | ArkViewer/UI/frmStructureInventoryViewer.cs:25-39 | ArkViewer/UI/frmTribeLog.cs:21-35 | ArkViewer/UI/frmTribeLogColourMap.cs:19-33 | ArkViewer/UI/frmViewer.cs:80-94 — 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 19 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmAddLocalARK.cs:28` 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–17 lines × 6) · ×1
  • Duplicated block (15–17 lines × 6) ASVPack/Models/ContentPack.cs:397 — ASVPack/Models/ContentPack.cs:397-412 | ASVPack/Models/ContentPack.cs:514-530 | ASVPack/Models/ContentPack.cs:786-801 | ASVPack/Models/ContentPack.cs:1556-1571 | ASVPack/Models/ContentPack.cs:1707-1722 | ASVPack/Models/ContentPack.cs:1864-1878 — 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 `ASVPack/Models/ContentPack.cs:397` it does not close everything it opens, so those 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, `ASVPack/Models/ContentPack.cs:534` calls `SelectMany`, `ToList` and `ASVPack/Models/ContentPack.cs:417` 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 (15 lines × 5) · ×1
  • Duplicated block (15 lines × 5) ASVPack/Models/DrawingContainer.cs:72 — ASVPack/Models/DrawingContainer.cs:72-86 | ASVPack/Models/DrawingContainer.cs:138-152 | ASVPack/Models/DrawingContainer.cs:178-192 | ASVPack/Models/DrawingContainer.cs:237-251 | ASVPack/Models/DrawingContainer.cs:292-306 — 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.
D4 · Code Duplication · Duplicated block (16–17 lines × 5) · ×1
  • Duplicated block (16–17 lines × 5) ASVBot/Commands/PlayerCommands.cs:128 — ASVBot/Commands/PlayerCommands.cs:128-143 | ASVBot/Commands/PlayerCommands.cs:426-441 | ASVBot/Commands/PlayerCommands.cs:511-527 | ASVBot/Commands/PlayerCommands.cs:598-614 | ASVBot/Commands/PlayerCommands.cs:766-781 — 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 `ASVBot/Commands/PlayerCommands.cs:128` 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–17 lines × 3) · ×1
  • Duplicated block (13–17 lines × 3) ArkViewer/UI/frmViewer.cs:4391 — ArkViewer/UI/frmViewer.cs:4391-4407 | ArkViewer/UI/frmViewer.cs:4432-4448 | ArkViewer/UI/frmViewer.cs:4472-4484 — 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 `ArkViewer/UI/frmViewer.cs:4391` it does not close everything it opens, so those 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 × 8) · ×1
  • Duplicated block (15 lines × 8) ArkViewer/UI/BorderlessComboBox.cs:38 — ArkViewer/UI/BorderlessComboBox.cs:38-52 | ArkViewer/UI/frmBreedingFindOptions.cs:20-34 | ArkViewer/UI/frmBreedingLines.cs:30-44 | ArkViewer/UI/frmFtpFileBrowser.cs:28-42 | ArkViewer/UI/frmMapToolboxMarkers.cs:36-50 | ArkViewer/UI/frmMapToolboxStructures.cs:43-57 | ArkViewer/UI/frmPlayerInventoryViewer.cs:38-52 | ArkViewer/UI/frmSettings.cs:85-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 all 8 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 (16 lines × 6) · ×1
  • Duplicated block (16 lines × 6) ArkViewer/Models/ASVDataManager.cs:887 — ArkViewer/Models/ASVDataManager.cs:887-904 | ArkViewer/Models/ASVDataManager.cs:988-1005 | ArkViewer/Models/ASVDataManager.cs:1084-1100 | ArkViewer/Models/ASVDataManager.cs:1175-1190 | ArkViewer/Models/ASVDataManager.cs:1267-1282 | ArkViewer/Models/ASVDataManager.cs:1351-1369 — 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 `ArkViewer/Models/ASVDataManager.cs:887` 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 first that the copies are not typed on the same thing: the declarations holding them bind `selectedLocations` to `List<Tuple<float,float>>` in one and `List<Tuple<float, float>>` 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 (14–16 lines × 3) · ×1
  • Duplicated block (14–16 lines × 3) ASVPack/Models/ContentTamedCreature.cs:118 — ASVPack/Models/ContentTamedCreature.cs:118-133 | ASVPack/Models/ContentTamedCreature.cs:224-239 | ASVPack/Models/ContentTamedCreature.cs:340-353 — 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 `ASVPack/Models/ContentTamedCreature.cs:118` it does not close everything it opens, so those 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 `creatureObject` to `GameObject` in one and `AsaGameObject` 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–15 lines × 6) · ×1
  • Duplicated block (13–15 lines × 6) ArkViewer/UI/frmMapToolboxStructures.cs:163 — ArkViewer/UI/frmMapToolboxStructures.cs:163-175 | ArkViewer/UI/frmViewer.cs:1395-1409 | ArkViewer/UI/frmViewer.cs:1780-1792 | ArkViewer/UI/frmViewer.cs:1888-1900 | ArkViewer/UI/frmViewer.cs:2511-2523 | ArkViewer/UI/frmViewer.cs:9680-9692 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, 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, `ArkViewer/UI/frmViewer.cs:1884` calls `Replace` and `ArkViewer/UI/frmMapToolboxStructures.cs:160` 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–15 lines × 2) · ×1
  • Duplicated block (12–15 lines × 2) ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:34 — ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:34-45 | AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:32-46 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (14 lines × 7) · ×1
  • Duplicated block (14 lines × 7) ArkViewer/UI/frmViewer.cs:1361 — ArkViewer/UI/frmViewer.cs:1361-1374 | ArkViewer/UI/frmViewer.cs:1744-1758 | ArkViewer/UI/frmViewer.cs:1820-1833 | ArkViewer/UI/frmViewer.cs:1935-1948 | ArkViewer/UI/frmViewer.cs:2478-2492 | ArkViewer/UI/frmViewer.cs:2737-2750 | ArkViewer/UI/frmViewer.cs:9622-9635 — 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 `ArkViewer/UI/frmViewer.cs:1361` 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–14 lines × 4) · ×1
  • Duplicated block (12–14 lines × 4) ASVPack/Models/DrawingContainer.cs:92 — ASVPack/Models/DrawingContainer.cs:92-103 | ASVPack/Models/DrawingContainer.cs:201-214 | ASVPack/Models/DrawingContainer.cs:257-270 | ASVPack/Models/DrawingContainer.cs:311-324 — 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 `ASVPack/Models/DrawingContainer.cs:92` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (11–14 lines × 4) · ×1
  • Duplicated block (11–14 lines × 4) ASVBot/Commands/PlayerCommands.cs:310 — ASVBot/Commands/PlayerCommands.cs:310-320 | ASVBot/Commands/PlayerCommands.cs:531-544 | ASVBot/Commands/PlayerCommands.cs:619-632 | ASVBot/Commands/PlayerCommands.cs:785-798 — 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 `ASVBot/Commands/PlayerCommands.cs:310` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) ASVPack/Models/ContentContainer.cs:1699 — ASVPack/Models/ContentContainer.cs:1699-1710 | ASVPack/Models/ContentContainer.cs:2999-3012 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentContainer.cs:1699` 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 (11–14 lines × 2) · ×1
  • Duplicated block (11–14 lines × 2) ArkSavegameToolkit/SavegameToolkit/ArkArchive.cs:185 — ArkSavegameToolkit/SavegameToolkit/ArkArchive.cs:185-195 | AsaSavegameToolkit/AsaSavegameToolkit/AsaArchive.cs:72-85 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `ArkSavegameToolkit/SavegameToolkit/ArkArchive.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.
D4 · Code Duplication · Duplicated block (12–13 lines × 7) · ×1
  • Duplicated block (12–13 lines × 7) ASVPack/Models/ContentPack.cs:402 — ASVPack/Models/ContentPack.cs:402-414 | ASVPack/Models/ContentPack.cs:520-532 | ASVPack/Models/ContentPack.cs:792-803 | ASVPack/Models/ContentPack.cs:1562-1573 | ASVPack/Models/ContentPack.cs:1713-1724 | ASVPack/Models/ContentPack.cs:1772-1784 | ASVPack/Models/ContentPack.cs:1869-1880 — 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 `ASVPack/Models/ContentPack.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ASVPack/Models/ContentPack.cs:534` calls `SelectMany`, `ToList` and `ASVPack/Models/ContentPack.cs:417` 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 (8 lines × 6) · ×1
  • Duplicated block (8 lines × 6) ArkViewer/UI/frmViewer.cs:2970 — ArkViewer/UI/frmViewer.cs:2970-2977 | ArkViewer/UI/frmViewer.cs:3084-3091 | ArkViewer/UI/frmViewer.cs:3200-3207 | ArkViewer/UI/frmViewer.cs:3315-3322 | ArkViewer/UI/frmViewer.cs:3431-3438 | ArkViewer/UI/frmViewer.cs:3546-3553 — 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 (11–13 lines × 5) · ×1
  • Duplicated block (11–13 lines × 5) ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs:45 — ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs:45-55 | ArkSavegameToolkit/SavegameToolkit/ArkLocalProfile.cs:59-69 | ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs:54-66 | ArkSavegameToolkit/SavegameToolkit/ArkStoreProfile.cs:57-69 | ArkSavegameToolkit/SavegameToolkit/ArkTribe.cs:31-43 — before extracting anything, compare `ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs` and `ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.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. 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, `ArkSavegameToolkit/SavegameToolkit/ArkTribe.cs:28` calls `NotSupportedException` and `ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs:50` 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–13 lines × 3) · ×1
  • Duplicated block (11–13 lines × 3) ASVPack/Models/DrawingContainer.cs:53 — ASVPack/Models/DrawingContainer.cs:53-63 | ASVPack/Models/DrawingContainer.cs:106-118 | ASVPack/Models/DrawingContainer.cs:218-228 — 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 `ASVPack/Models/DrawingContainer.cs:53` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) ArkViewer/Program.cs:617 — ArkViewer/Program.cs:617-631 | ArkViewer/Program.cs:640-652 | ArkViewer/Program.cs:660-672 — 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 `ArkViewer/Program.cs:617` 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–13 lines × 3) · ×1
  • Duplicated block (10–13 lines × 3) ArkViewer/UI/frmViewer.cs:902 — ArkViewer/UI/frmViewer.cs:902-914 | ArkViewer/UI/frmViewer.cs:915-927 | ArkViewer/UI/frmViewer.cs:928-937 — 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 (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) ArkViewer/UI/frmViewer.cs:1567 — ArkViewer/UI/frmViewer.cs:1567-1579 | ArkViewer/UI/frmViewer.cs:1667-1678 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:1567` it does not close everything it opens, so those 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 × 7) · ×1
  • Duplicated block (10–12 lines × 7) ArkViewer/Models/ASVDataManager.cs:840 — ArkViewer/Models/ASVDataManager.cs:840-851 | ArkViewer/Models/ASVDataManager.cs:913-923 | ArkViewer/Models/ASVDataManager.cs:1014-1023 | ArkViewer/Models/ASVDataManager.cs:1108-1118 | ArkViewer/Models/ASVDataManager.cs:1201-1210 | ArkViewer/Models/ASVDataManager.cs:1290-1299 | ArkViewer/Models/ASVDataManager.cs:1579-1588 — 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 `ArkViewer/Models/ASVDataManager.cs:840` it does not close everything it opens, so those 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 (11–12 lines × 3) · ×1
  • Duplicated block (11–12 lines × 3) ArkViewer/UI/frmViewer.cs:3891 — ArkViewer/UI/frmViewer.cs:3891-3902 | ArkViewer/UI/frmViewer.cs:5999-6009 | ArkViewer/UI/frmViewer.cs:6370-6381 — 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 `ArkViewer/UI/frmViewer.cs:3891` 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–12 lines × 3) · ×1
  • Duplicated block (10–12 lines × 3) ArkViewer/UI/frmViewer.cs:5743 — ArkViewer/UI/frmViewer.cs:5743-5754 | ArkViewer/UI/frmViewer.cs:5945-5956 | ArkViewer/UI/frmViewer.cs:6008-6017 — 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 `ArkViewer/UI/frmViewer.cs:5743` 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 (9–12 lines × 2) · ×1
  • Duplicated block (9–12 lines × 2) ASVPack/Models/ContentContainer.cs:761 — ASVPack/Models/ContentContainer.cs:761-772 | ASVPack/Models/ContentContainer.cs:1980-1988 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentContainer.cs:761` it does not close everything it opens, so those 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 (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) ASVPack/Models/ContentPlayer.cs:70 — ASVPack/Models/ContentPlayer.cs:70-80 | ASVPack/Models/ContentPlayer.cs:143-154 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, 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 × 8) · ×1
  • Duplicated block (9 lines × 8) ArkViewer/UI/frmViewer.cs:1352 — ArkViewer/UI/frmViewer.cs:1352-1360 | ArkViewer/UI/frmViewer.cs:1735-1743 | ArkViewer/UI/frmViewer.cs:1811-1819 | ArkViewer/UI/frmViewer.cs:1925-1933 | ArkViewer/UI/frmViewer.cs:2074-2082 | ArkViewer/UI/frmViewer.cs:2469-2477 | ArkViewer/UI/frmViewer.cs:2727-2735 | ArkViewer/UI/frmViewer.cs:9613-9621 — 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 `ArkViewer/UI/frmViewer.cs:1352` it does not close everything it opens, so those 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–11 lines × 6) · ×1
  • Duplicated block (9–11 lines × 6) ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs:45 — ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs:45-53 | ArkSavegameToolkit/SavegameToolkit/ArkContainer.cs:27-35 | ArkSavegameToolkit/SavegameToolkit/ArkLocalProfile.cs:59-67 | ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs:54-64 | ArkSavegameToolkit/SavegameToolkit/ArkStoreProfile.cs:57-67 | ArkSavegameToolkit/SavegameToolkit/ArkTribe.cs:31-41 — before extracting anything, compare `ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs` and `ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.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. 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, `ArkSavegameToolkit/SavegameToolkit/ArkTribe.cs:28` calls `NotSupportedException` and `ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs:50` 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 (8–11 lines × 5) · ×1
  • Duplicated block (8–11 lines × 5) ArkViewer/UI/frmMapToolboxStructures.cs:753 — ArkViewer/UI/frmMapToolboxStructures.cs:753-760 | ArkViewer/UI/frmViewer.cs:3131-3141 | ArkViewer/UI/frmViewer.cs:3246-3256 | ArkViewer/UI/frmViewer.cs:3362-3372 | ArkViewer/UI/frmViewer.cs:3477-3487 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmMapToolboxStructures.cs:753` it does not close everything it opens, so those 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, `ArkViewer/UI/frmMapToolboxStructures.cs:753` calls `JObject` and `ArkViewer/UI/frmViewer.cs:3131` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) ArkViewer/UI/frmBreedingLines.cs:226 — ArkViewer/UI/frmBreedingLines.cs:226-235 | ArkViewer/UI/frmViewer.cs:6658-6668 | ArkViewer/UI/frmViewer.cs:7320-7329 — 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 `ArkViewer/UI/frmBreedingLines.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.
D4 · Code Duplication · Duplicated block (9–11 lines × 3) · ×1
  • Duplicated block (9–11 lines × 3) ArkViewer/UI/frmViewer.cs:5831 — ArkViewer/UI/frmViewer.cs:5831-5839 | ArkViewer/UI/frmViewer.cs:5843-5853 | ArkViewer/UI/frmViewer.cs:5857-5867 — 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. 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–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) ArkViewer/UI/frmViewer.cs:1969 — ArkViewer/UI/frmViewer.cs:1969-1979 | ArkViewer/UI/frmViewer.cs:2162-2171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmViewer.cs:1969` it does not close everything it opens, so those 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–10 lines × 18) · ×1
  • Duplicated block (8–10 lines × 18) ArkViewer/UI/frmViewer.cs:6713 — ArkViewer/UI/frmViewer.cs:6713-6720 | ArkViewer/UI/frmViewer.cs:6722-6729 | ArkViewer/UI/frmViewer.cs:6731-6738 | ArkViewer/UI/frmViewer.cs:6740-6747 | ArkViewer/UI/frmViewer.cs:6749-6756 | ArkViewer/UI/frmViewer.cs:6758-6767 | ArkViewer/UI/frmViewer.cs:7520-7527 | ArkViewer/UI/frmViewer.cs:7529-7536 | ArkViewer/UI/frmViewer.cs:7538-7545 | ArkViewer/UI/frmViewer.cs:7547-7554 | ArkViewer/UI/frmViewer.cs:7556-7563 | ArkViewer/UI/frmViewer.cs:7565-7574 | ArkViewer/UI/frmViewer.cs:7754-7761 | ArkViewer/UI/frmViewer.cs:7763-7770 | ArkViewer/UI/frmViewer.cs:7772-7779 | ArkViewer/UI/frmViewer.cs:7781-7788 | ArkViewer/UI/frmViewer.cs:7790-7797 | ArkViewer/UI/frmViewer.cs:7799-7806 — all 18 copies are in the same file, so extract the block into one function there and call 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 (9–10 lines × 12) · ×1
  • Duplicated block (9–10 lines × 12) ASVPack/Models/ContentPack.cs:2146 — ASVPack/Models/ContentPack.cs:2146-2155 | ASVPack/Models/ContentPack.cs:2207-2216 | ASVPack/Models/ContentPack.cs:2239-2247 | ASVPack/Models/ContentPack.cs:2270-2279 | ASVPack/Models/ContentPack.cs:2302-2311 | ASVPack/Models/ContentPack.cs:2333-2342 | ASVPack/Models/ContentPack.cs:2366-2375 | ASVPack/Models/ContentPack.cs:2394-2403 | ASVPack/Models/ContentPack.cs:2422-2431 | ASVPack/Models/ContentPack.cs:2450-2459 | ASVPack/Models/ContentPack.cs:2479-2488 | ASVPack/Models/ContentPack.cs:2507-2515 — all 12 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ASVPack/Models/ContentPack.cs:2146` 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–10 lines × 10) · ×1
  • Duplicated block (8–10 lines × 10) ArkViewer/UI/frmBreedingLines.cs:990 — ArkViewer/UI/frmBreedingLines.cs:990-997 | ArkViewer/UI/frmBreedingLines.cs:1148-1155 | ArkViewer/UI/frmBreedingLines.cs:1186-1193 | ArkViewer/UI/frmMapToolboxStructures.cs:162-169 | ArkViewer/UI/frmViewer.cs:1394-1403 | ArkViewer/UI/frmViewer.cs:1779-1786 | ArkViewer/UI/frmViewer.cs:1887-1894 | ArkViewer/UI/frmViewer.cs:2217-2224 | ArkViewer/UI/frmViewer.cs:2510-2517 | ArkViewer/UI/frmViewer.cs:9679-9686 — there are 10 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 10 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmBreedingLines.cs:990` it does not close everything it opens, so those 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, `ArkViewer/UI/frmBreedingLines.cs:988` calls `Replace`, `ToString` and `ArkViewer/UI/frmBreedingLines.cs:1184` 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 (8 lines × 7) · ×1
  • Duplicated block (8 lines × 7) ArkViewer/UI/frmMapToolboxStructures.cs:756 — ArkViewer/UI/frmMapToolboxStructures.cs:756-763 | ArkViewer/UI/frmViewer.cs:2907-2914 | ArkViewer/UI/frmViewer.cs:3021-3028 | ArkViewer/UI/frmViewer.cs:3137-3144 | ArkViewer/UI/frmViewer.cs:3252-3259 | ArkViewer/UI/frmViewer.cs:3368-3375 | ArkViewer/UI/frmViewer.cs:3483-3490 — there are 7 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 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmMapToolboxStructures.cs:756` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ArkViewer/UI/frmMapToolboxStructures.cs:753` calls `JObject` and `ArkViewer/UI/frmViewer.cs:2902` 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 (10 lines × 2) · ×1
  • Duplicated block (10 lines × 2) ASVPack/Models/ContentContainer.cs:2045 — ASVPack/Models/ContentContainer.cs:2045-2054 | ASVPack/Models/ContentContainer.cs:2194-2203 — both copies are in the same file, so extract the 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, `ASVPack/Models/ContentContainer.cs:2193` calls `AsWildCreature` and `ASVPack/Models/ContentContainer.cs:2043` 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 (5 lines × 10) · ×1
  • Duplicated block (5 lines × 10) ArkViewer/UI/frmBreedingLines.cs:138 — ArkViewer/UI/frmBreedingLines.cs:138-142 | ArkViewer/UI/frmBreedingLines.cs:147-151 | ArkViewer/UI/frmBreedingLines.cs:156-160 | ArkViewer/UI/frmBreedingLines.cs:165-169 | ArkViewer/UI/frmBreedingLines.cs:174-178 | ArkViewer/UI/frmBreedingLines.cs:317-321 | ArkViewer/UI/frmBreedingLines.cs:326-330 | ArkViewer/UI/frmBreedingLines.cs:335-339 | ArkViewer/UI/frmBreedingLines.cs:344-348 | ArkViewer/UI/frmBreedingLines.cs:353-357 — 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 5) · ×1
  • Duplicated block (8–9 lines × 5) ArkViewer/UI/frmBreedingLines.cs:823 — ArkViewer/UI/frmBreedingLines.cs:823-831 | ArkViewer/UI/frmBreedingLines.cs:832-840 | ArkViewer/UI/frmBreedingLines.cs:841-849 | ArkViewer/UI/frmBreedingLines.cs:850-858 | ArkViewer/UI/frmBreedingLines.cs:859-866 — 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.
D4 · Code Duplication · Duplicated block (7–9 lines × 5) · ×1
  • Duplicated block (7–9 lines × 5) ArkViewer/Models/ASVBreedingResult.cs:72 — ArkViewer/Models/ASVBreedingResult.cs:72-80 | ArkViewer/Models/ASVBreedingResult.cs:81-89 | ArkViewer/Models/ASVBreedingResult.cs:90-96 | ArkViewer/Models/ASVBreedingResult.cs:99-106 | ArkViewer/Models/ASVBreedingResult.cs:109-116 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 14) · ×1
  • Duplicated block (7 lines × 14) ASVPack/Models/ContentPack.cs:817 — ASVPack/Models/ContentPack.cs:817-823 | ASVPack/Models/ContentPack.cs:873-879 | ASVPack/Models/ContentPack.cs:929-935 | ASVPack/Models/ContentPack.cs:988-994 | ASVPack/Models/ContentPack.cs:1044-1050 | ASVPack/Models/ContentPack.cs:1101-1107 | ASVPack/Models/ContentPack.cs:1158-1164 | ASVPack/Models/ContentPack.cs:1215-1221 | ASVPack/Models/ContentPack.cs:1271-1277 | ASVPack/Models/ContentPack.cs:1328-1334 | ASVPack/Models/ContentPack.cs:1384-1390 | ASVPack/Models/ContentPack.cs:1440-1446 | ASVPack/Models/ContentPack.cs:1497-1503 | ASVPack/Models/ContentPack.cs:1645-1651 — all 14 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ASVPack/Models/ContentPack.cs:1655` calls `WritePropertyName`, `WriteValue` and `ASVPack/Models/ContentPack.cs:827` 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 (8 lines × 12) · ×1
  • Duplicated block (8 lines × 12) ArkViewer/UI/frmBreedingLines.cs:137 — ArkViewer/UI/frmBreedingLines.cs:137-144 | ArkViewer/UI/frmBreedingLines.cs:146-153 | ArkViewer/UI/frmBreedingLines.cs:155-162 | ArkViewer/UI/frmBreedingLines.cs:164-171 | ArkViewer/UI/frmBreedingLines.cs:173-180 | ArkViewer/UI/frmBreedingLines.cs:182-190 | ArkViewer/UI/frmBreedingLines.cs:316-323 | ArkViewer/UI/frmBreedingLines.cs:325-332 | ArkViewer/UI/frmBreedingLines.cs:334-341 | ArkViewer/UI/frmBreedingLines.cs:343-350 | ArkViewer/UI/frmBreedingLines.cs:352-359 | ArkViewer/UI/frmBreedingLines.cs:361-369 — all 12 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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 (6 lines × 7) · ×1
  • Duplicated block (6 lines × 7) ArkViewer/UI/frmSettings.cs:1794 — ArkViewer/UI/frmSettings.cs:1794-1799 | ArkViewer/UI/frmSettings.cs:1815-1820 | ArkViewer/UI/frmSettings.cs:1837-1842 | ArkViewer/UI/frmSettings.cs:1853-1858 | ArkViewer/UI/frmSettings.cs:1875-1880 | ArkViewer/UI/frmSettings.cs:1899-1904 | ArkViewer/UI/frmSettings.cs:2234-2239 — 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 `ArkViewer/UI/frmSettings.cs:1794` it does not close everything it opens, so those 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 × 5) · ×1
  • Duplicated block (8 lines × 5) ArkViewer/UI/frmBreedingLines.cs:566 — ArkViewer/UI/frmBreedingLines.cs:566-574 | ArkViewer/UI/frmBreedingLines.cs:575-583 | ArkViewer/UI/frmBreedingLines.cs:584-592 | ArkViewer/UI/frmBreedingLines.cs:593-601 | ArkViewer/UI/frmBreedingLines.cs:602-609 — 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.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) ArkViewer/UI/frmViewer.cs:1379 — ArkViewer/UI/frmViewer.cs:1379-1386 | ArkViewer/UI/frmViewer.cs:1765-1774 | ArkViewer/UI/frmViewer.cs:2497-2505 | ArkViewer/UI/frmViewer.cs:2777-2784 — 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 `ArkViewer/UI/frmViewer.cs:1379` it does not close everything it opens, so those 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–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) ArkViewer/UI/frmViewer.cs:6768 — ArkViewer/UI/frmViewer.cs:6768-6775 | ArkViewer/UI/frmViewer.cs:7579-7585 | ArkViewer/UI/frmViewer.cs:7808-7814 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ArkViewer/UI/frmViewer.cs:7578` calls `Add`, `Round`, `ToString` and `ArkViewer/UI/frmViewer.cs:6768` 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–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:81 — AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:81-88 | AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:122-128 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5–7 lines × 4) · ×1
  • Duplicated block (5–7 lines × 4) ArkViewer/UI/frmBreedingLines.cs:124 — ArkViewer/UI/frmBreedingLines.cs:124-130 | ArkViewer/UI/frmBreedingLines.cs:255-259 | ArkViewer/UI/frmViewer.cs:6698-6702 | ArkViewer/UI/frmViewer.cs:7739-7745 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ArkViewer/UI/frmBreedingLines.cs:255` calls `Add`, `ToString` and `ArkViewer/UI/frmBreedingLines.cs:124` 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 lines × 4) · ×1
  • Duplicated block (7 lines × 4) ArkViewer/UI/frmViewer.cs:4910 — ArkViewer/UI/frmViewer.cs:4910-4916 | ArkViewer/UI/frmViewer.cs:4937-4943 | ArkViewer/UI/frmViewer.cs:4960-4966 | ArkViewer/UI/frmViewer.cs:4988-4994 — 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 `ArkViewer/UI/frmViewer.cs:4910` it does not close everything it opens, so those 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–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:76 — ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:76-82 | ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:114-119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:76` it does not close everything it opens, so those 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 × 15) · ×1
  • Duplicated block (8 lines × 15) ArkViewer/UI/frmBreedingLines.cs:141 — ArkViewer/UI/frmBreedingLines.cs:141-148 | ArkViewer/UI/frmBreedingLines.cs:150-157 | ArkViewer/UI/frmBreedingLines.cs:159-166 | ArkViewer/UI/frmBreedingLines.cs:168-175 | ArkViewer/UI/frmBreedingLines.cs:177-184 | ArkViewer/UI/frmBreedingLines.cs:320-327 | ArkViewer/UI/frmBreedingLines.cs:329-336 | ArkViewer/UI/frmBreedingLines.cs:338-345 | ArkViewer/UI/frmBreedingLines.cs:347-354 | ArkViewer/UI/frmBreedingLines.cs:356-363 | ArkViewer/UI/frmViewer.cs:7758-7765 | ArkViewer/UI/frmViewer.cs:7767-7774 | ArkViewer/UI/frmViewer.cs:7776-7783 | ArkViewer/UI/frmViewer.cs:7785-7792 | ArkViewer/UI/frmViewer.cs:7794-7801 — there are 15 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 15 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmBreedingLines.cs:141` 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 (4–6 lines × 4) · ×1
  • Duplicated block (4–6 lines × 4) ASVExport/Program.cs:255 — ASVExport/Program.cs:255-258 | ASVExport/Program.cs:370-375 | ArkViewer/Program.cs:390-393 | ArkViewer/Program.cs:497-502 — `ASVExport/Program.cs` and `ArkViewer/Program.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 198 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (5 lines × 35) · ×1
  • Duplicated block (5 lines × 35) ArkViewer/UI/frmBreedingLines.cs:145 — ArkViewer/UI/frmBreedingLines.cs:145-149 | ArkViewer/UI/frmBreedingLines.cs:154-158 | ArkViewer/UI/frmBreedingLines.cs:163-167 | ArkViewer/UI/frmBreedingLines.cs:172-176 | ArkViewer/UI/frmBreedingLines.cs:181-185 | ArkViewer/UI/frmBreedingLines.cs:324-328 | ArkViewer/UI/frmBreedingLines.cs:333-337 | ArkViewer/UI/frmBreedingLines.cs:342-346 | ArkViewer/UI/frmBreedingLines.cs:351-355 | ArkViewer/UI/frmBreedingLines.cs:360-364 | ArkViewer/UI/frmBreedingLines.cs:574-578 | ArkViewer/UI/frmBreedingLines.cs:583-587 | ArkViewer/UI/frmBreedingLines.cs:592-596 | ArkViewer/UI/frmBreedingLines.cs:601-605 | ArkViewer/UI/frmBreedingLines.cs:609-613 | ArkViewer/UI/frmBreedingLines.cs:831-835 | ArkViewer/UI/frmBreedingLines.cs:840-844 | ArkViewer/UI/frmBreedingLines.cs:849-853 | ArkViewer/UI/frmBreedingLines.cs:858-862 | ArkViewer/UI/frmBreedingLines.cs:866-870 | ArkViewer/UI/frmViewer.cs:6721-6725 | ArkViewer/UI/frmViewer.cs:6730-6734 | ArkViewer/UI/frmViewer.cs:6739-6743 | ArkViewer/UI/frmViewer.cs:6748-6752 | ArkViewer/UI/frmViewer.cs:6757-6761 | ArkViewer/UI/frmViewer.cs:7528-7532 | ArkViewer/UI/frmViewer.cs:7537-7541 | ArkViewer/UI/frmViewer.cs:7546-7550 | ArkViewer/UI/frmViewer.cs:7555-7559 | ArkViewer/UI/frmViewer.cs:7564-7568 | ArkViewer/UI/frmViewer.cs:7762-7766 | ArkViewer/UI/frmViewer.cs:7771-7775 | ArkViewer/UI/frmViewer.cs:7780-7784 | ArkViewer/UI/frmViewer.cs:7789-7793 | ArkViewer/UI/frmViewer.cs:7798-7802 — there are 35 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 35 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmBreedingLines.cs:145` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (5 lines × 30) · ×1
  • Duplicated block (5 lines × 30) ArkViewer/UI/frmBreedingLines.cs:137 — ArkViewer/UI/frmBreedingLines.cs:137-141 | ArkViewer/UI/frmBreedingLines.cs:146-150 | ArkViewer/UI/frmBreedingLines.cs:155-159 | ArkViewer/UI/frmBreedingLines.cs:164-168 | ArkViewer/UI/frmBreedingLines.cs:173-177 | ArkViewer/UI/frmBreedingLines.cs:182-186 | ArkViewer/UI/frmBreedingLines.cs:316-320 | ArkViewer/UI/frmBreedingLines.cs:325-329 | ArkViewer/UI/frmBreedingLines.cs:334-338 | ArkViewer/UI/frmBreedingLines.cs:343-347 | ArkViewer/UI/frmBreedingLines.cs:352-356 | ArkViewer/UI/frmBreedingLines.cs:361-365 | ArkViewer/UI/frmViewer.cs:6713-6717 | ArkViewer/UI/frmViewer.cs:6722-6726 | ArkViewer/UI/frmViewer.cs:6731-6735 | ArkViewer/UI/frmViewer.cs:6740-6744 | ArkViewer/UI/frmViewer.cs:6749-6753 | ArkViewer/UI/frmViewer.cs:6758-6762 | ArkViewer/UI/frmViewer.cs:7520-7524 | ArkViewer/UI/frmViewer.cs:7529-7533 | ArkViewer/UI/frmViewer.cs:7538-7542 | ArkViewer/UI/frmViewer.cs:7547-7551 | ArkViewer/UI/frmViewer.cs:7556-7560 | ArkViewer/UI/frmViewer.cs:7565-7569 | ArkViewer/UI/frmViewer.cs:7754-7758 | ArkViewer/UI/frmViewer.cs:7763-7767 | ArkViewer/UI/frmViewer.cs:7772-7776 | ArkViewer/UI/frmViewer.cs:7781-7785 | ArkViewer/UI/frmViewer.cs:7790-7794 | ArkViewer/UI/frmViewer.cs:7799-7803 — there are 30 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 30 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmBreedingLines.cs:137` it does not close everything it opens, so those 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 (5 lines × 12) · ×1
  • Duplicated block (5 lines × 12) ArkViewer/UI/frmBreedingLines.cs:566 — ArkViewer/UI/frmBreedingLines.cs:566-570 | ArkViewer/UI/frmBreedingLines.cs:575-579 | ArkViewer/UI/frmBreedingLines.cs:584-588 | ArkViewer/UI/frmBreedingLines.cs:593-597 | ArkViewer/UI/frmBreedingLines.cs:602-606 | ArkViewer/UI/frmBreedingLines.cs:610-614 | ArkViewer/UI/frmBreedingLines.cs:823-827 | ArkViewer/UI/frmBreedingLines.cs:832-836 | ArkViewer/UI/frmBreedingLines.cs:841-845 | ArkViewer/UI/frmBreedingLines.cs:850-854 | ArkViewer/UI/frmBreedingLines.cs:859-863 | ArkViewer/UI/frmBreedingLines.cs:867-871 — all 12 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmBreedingLines.cs:566` it does not close everything it opens, so those 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 (5 lines × 8) · ×1
  • Duplicated block (5 lines × 8) ASVExport/Program.cs:395 — ASVExport/Program.cs:395-399 | ASVExport/Program.cs:404-408 | ASVExport/Program.cs:413-417 | ASVExport/Program.cs:425-429 | ArkViewer/Program.cs:513-517 | ArkViewer/Program.cs:522-526 | ArkViewer/Program.cs:531-535 | ArkViewer/Program.cs:543-547 — `ASVExport/Program.cs` and `ArkViewer/Program.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 198 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `ASVExport/Program.cs:395` it does not close everything it opens, so those 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, `ASVExport/Program.cs:400` calls `Property`, `ToString` and `ASVExport/Program.cs:410` 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 (5 lines × 7) · ×1
  • Duplicated block (5 lines × 7) ArkViewer/UI/frmBreedingLines.cs:136 — ArkViewer/UI/frmBreedingLines.cs:136-140 | ArkViewer/UI/frmBreedingLines.cs:315-319 | ArkViewer/UI/frmBreedingLines.cs:565-569 | ArkViewer/UI/frmBreedingLines.cs:822-826 | ArkViewer/UI/frmViewer.cs:6712-6716 | ArkViewer/UI/frmViewer.cs:7519-7523 | ArkViewer/UI/frmViewer.cs:7753-7757 — there are 7 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 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `ArkViewer/UI/frmBreedingLines.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. 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–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) ArkViewer/UI/frmViewer.cs:2002 — ArkViewer/UI/frmViewer.cs:2002-2009 | ArkViewer/UI/frmViewer.cs:2199-2207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: SavegameToolkit ArkSavegameToolkit/SavegameToolkit/SavegameToolkit.csproj:1 — SavegameToolkit: abstractness 0.13, instability 0.00, distance 0.87 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
IC1 · Incompleteness & stubs · Skeleton type · ×1
  • Skeleton type — most members are unfinished ArkSavegameToolkit/SavegameToolkit/Arrays/ArkArrayUnknown.cs:8 — `ArkArrayUnknown` has 2 unfinished members out of 4 declared members (methods, properties, indexers and events, whether or not each carries a body) — a scaffolded type that was never implemented.
IC1 · Incompleteness & stubs · Both branches open with the same statements · ×1
  • Both branches open with the same statements — the condition does not decide them ArkViewer/UI/frmFtpFileBrowser.cs:354 — 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.
P1 · CI/CD gates · No CI pipeline · ×1
  • No CI pipeline — No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
S1 · Cryptographic Hygiene · Ciphertext is encrypted but not authenticated · ×1
  • Ciphertext is encrypted but not authenticated ArkViewer/Models/ViewerEncryption.cs:30 — This type encrypts through `SymmetricAlgorithm`, whose every cipher mode (CBC/ECB/OFB/CFB/CTS) is unauthenticated, and no keyed MAC or AEAD cipher appears anywhere in it — so nothing establishes that the ciphertext it produced is the ciphertext it later reads back. Encryption alone provides confidentiality, not integrity: unauthenticated CBC is MALLEABLE, and an attacker who can modify stored or transmitted ciphertext can flip chosen plaintext bits in the following block by flipping ciphertext bits in the preceding one, without ever knowing the key. Where the decrypt path reports failure differently for a padding error than for a downstream one — a broad `catch` that returns null is the usual spelling — the same construction also answers the attacker's questions, which is the padding-oracle shape that recovers plaintext outright. Prefer an AEAD cipher: `AesGcm` or `ChaCha20Poly1305` authenticate the ciphertext as part of encrypting it, and give you an associated-data slot for the surrounding context. Where the format cannot change, MAC it with encrypt-then-MAC — HMAC-SHA256 over the IV and the ciphertext together, with a key derived separately from the encryption key — and verify that tag with `CryptographicOperations.FixedTimeEquals` BEFORE decrypting anything.
X18 · Disposal-pattern correctness · Owned disposable field overwritten without releasing the previous instance · ×1
  • Owned disposable field overwritten without releasing the previous instance ArkViewer/UI/ChartControl.cs:233 — `punchOutPath` is a `GraphicsPath` this type creates itself, and here (line 233) a new instance is written over it — but `ChartControl` creates `punchOutPath` when it is constructed, so every later call finds an instance there, and nothing earlier in `DrawChart` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`punchOutPath?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back.
Minor — 182 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×81
  • Orphaned file ArkViewer/Models/ASVDataManager.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ArkViewer/UI/frmSettings.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ArkViewer/UI/frmBreedingLines.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ArkViewer/UI/frmPlayerInventoryViewer.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ASVBot/Commands/PlayerCommands.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ArkViewer/Program.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ArkViewer/UI/frmMapToolboxStructures.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ASVBot/Commands/AdminCommands.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ASVExport/Program.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ArkViewer/Configuration/ViewerConfiguration.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegame.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ASVPack/Models/ContentPlayer.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ArkViewer/UI/frmFtpFileBrowser.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ASVPack/Models/ContentTamedCreature.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ArkViewer/UI/frmMapView.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file AsaSavegameToolkit/AsaSavegameToolkit/AsaPropertyRegistry.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ArkViewer/UI/frmMapToolboxMarkers.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ArkSavegameToolkit/SavegameToolkitAdditions/ObjectCollector.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ASVPack/Models/ContentCreature.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ArkViewer/UI/ChartControl.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ASVPack/Models/DrawingContainer.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ArkViewer/UI/frmBreedingFindOptions.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ArkSavegameToolkit/SavegameToolkit/ArkArchive.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file ArkViewer/UI/frmTribeLog.cs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 56 more in this group — see findings.md.
IC1 · Incompleteness & stubs · Commented-out code · ×32
  • Commented-out code ASVBot/Commands/PlayerCommands.cs:153 — 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 ASVExport/Program.cs:51 — 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 ASVExport/Program.cs:62 — 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 ASVExport/Program.cs:68 — 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 ASVExport/Program.cs:100 — 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 ASVExport/Program.cs:117 — 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 ASVExport/Program.cs:126 — 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 ASVExport/Program.cs:142 — 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 ASVExport/Program.cs:154 — 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 ASVExport/Program.cs:160 — 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 ASVExport/Program.cs:167 — 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 ASVExport/Program.cs:174 — 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 ASVExport/Program.cs:181 — 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 ASVExport/Program.cs:188 — 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 ASVExport/Program.cs:198 — 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 ASVExport/Program.cs:210 — 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 ASVExport/Program.cs:218 — 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 ASVExport/Program.cs:224 — 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 ASVExport/Program.cs:247 — 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 ASVExport/Program.cs:272 — 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 ASVExport/Program.cs:291 — 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 ASVExport/Program.cs:295 — 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 ASVExport/Program.cs:298 — 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 ASVExport/Program.cs:303 — 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 ASVExport/Program.cs:308 — 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.
X10 · Duplicated predicate · Duplicated predicate · ×26
  • Duplicated predicate ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs:149 — `!(other is null) && (ReferenceEquals(this, other) || string.Equals(content, other.content))` appears character-identically in 2 files — ArkSavegameToolkit/SavegameToolkit/Types/ArkName.cs, AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.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 ASVPack/Models/ContentContainer.cs:261 — `!string.IsNullOrEmpty(clusterFolder) && Directory.Exists(clusterFolder)` appears character-identically in 2 files — ASVPack/Models/ContentContainer.cs, ASVPack/Models/ContentPack.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 ArkViewer/UI/frmViewer.cs:3895 — `(Math.Abs(w.Latitude.GetValueOrDefault(0) - fromLat) <= fromRadius) && (Math.Abs(w.Longitude.GetValueOrDefault(0) - fromLon) <= fromRadius)` appears character-identically in 2 files — ASVBot/Commands/PlayerCommands.cs, ArkViewer/UI/frmViewer.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 ArkViewer/UI/frmGenericClassMap.cs:152 — `ClassMap.ClassName != null && ClassMap.ClassName.Length > 0` appears character-identically in 2 files — ArkViewer/UI/frmGenericClassMap.cs, ArkViewer/UI/frmItemClassMap.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 ArkViewer/UI/frmDinoInventoryViewer.cs:92 — `classMap != null && classMap.FriendlyName.Length > 0` appears character-identically in 2 files — ArkViewer/UI/frmDinoInventoryViewer.cs, ArkViewer/UI/frmStructureInventoryViewer.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 ASVExport/Program.cs:35 — `commandArguments != null && commandArguments.Length > 1` appears character-identically in 2 files — ASVExport/Program.cs, ArkViewer/Program.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 ASVPack/Models/ContentContainer.cs:381 — `creatureObject.GetPropertyValue<string>("TribeName")?.Length == 0 && creatureObject.GetPropertyValue<string>("TamerString")?.Length > 0` appears character-identically in 4 files — ASVPack/Models/ContentContainer.cs, ASVPack/Models/ContentLocalProfile.cs, ASVPack/Models/ContentPack.cs, 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 ASVPack/Models/ContentContainer.cs:340 — `dinoList != null && dinoList.Value != null` appears character-identically in 2 files — ASVPack/Models/ContentContainer.cs, ASVPack/Models/ContentPack.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 ASVPack/Extensions/AsaExtensions.cs:84 — `gameObject.ClassString == "MotorRaft_BP_C" || gameObject.ClassString == "Raft_BP_C" || gameObject.ClassString == "TekHoverSkiff_Character_BP…` appears character-identically in 2 files — ASVPack/Extensions/AsaExtensions.cs, ArkSavegameToolkit/SavegameToolkitAdditions/GameObjectExtensions.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 ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs:66 — `gameObject.ClassString == "PrimalPlayerData" || gameObject.ClassString == "PrimalPlayerDataBP_C"` appears character-identically in 2 files — ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs, ArkSavegameToolkit/SavegameToolkit/ArkStoreProfile.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 ArkViewer/UI/frmDeathCacheViewer.cs:123 — `itemMap != null && itemMap.ClassName != ""` appears character-identically in 4 files — ArkViewer/UI/frmDeathCacheViewer.cs, ArkViewer/UI/frmDinoInventoryViewer.cs, ArkViewer/UI/frmPlayerInventoryViewer.cs, ArkViewer/UI/frmStructureInventoryViewer.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 ArkViewer/UI/frmStructureExclusionFilter.cs:94 — `itemMap != null && itemMap.FriendlyName.Length > 0` appears character-identically in 2 files — ArkViewer/UI/frmStructureExclusionFilter.cs, ArkViewer/UI/frmViewer.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 ArkViewer/UI/frmDeathCacheViewer.cs:132 — `itemName.ToLower().Contains(txtFilter.Text.ToLower()) || categoryName.ToLower().Contains(txtFilter.Text.ToLower())` appears character-identically in 2 files — ArkViewer/UI/frmDeathCacheViewer.cs, ArkViewer/UI/frmStructureInventoryViewer.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 ArkViewer/Models/ASVDataManager.cs:1511 — `player.Latitude.GetValueOrDefault(0) == 0 && player.Longitude.GetValueOrDefault(0) == 0` appears character-identically in 2 files — ArkViewer/Models/ASVDataManager.cs, ArkViewer/UI/frmViewer.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 ArkViewer/Models/ASVDataManager.cs:453 — `player.Z >= selectedRegion.ZStart && player.Z <= selectedRegion.ZEnd && player.Latitude >= selectedRegion.LatitudeStart && player.Latitude <…` appears character-identically in 2 files — ArkViewer/Models/ASVDataManager.cs, ArkViewer/UI/frmViewer.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 ArkViewer/Models/ASVDataManager.cs:403 — `playerStructure.Z >= selectedRegion.ZStart && playerStructure.Z <= selectedRegion.ZEnd && playerStructure.Latitude >= selectedRegion.Latitud…` appears character-identically in 2 files — ArkViewer/Models/ASVDataManager.cs, ArkViewer/UI/frmViewer.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 ASVPack/Extensions/AsaExtensions.cs:25 — `prop.Position == index && prop.Name == name` appears character-identically in 2 files — ASVPack/Extensions/AsaExtensions.cs, AsaSavegameToolkit/AsaSavegameToolkit/AsaGameObject.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 ArkViewer/UI/frmBreedingLines.cs:138 — `selectedColor != null && selectedColor.Hex.Length > 0` appears character-identically in 2 files — ArkViewer/UI/frmBreedingLines.cs, ArkViewer/UI/frmViewer.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 ArkViewer/UI/frmAddLocalARK.cs:33 — `targetScreen.DeviceName == null || targetScreen.DeviceName == savedWindow.Monitor` appears character-identically in 19 files — ArkViewer/UI/frmAddLocalARK.cs, ArkViewer/UI/frmBreedingFindOptions.cs, ArkViewer/UI/frmBreedingLines.cs, ArkViewer/UI/frmColourEditor.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 ArkViewer/Models/ASVDataManager.cs:667 — `tribe.Players != null && tribe.Players.Count > 0` appears character-identically in 2 files — ArkViewer/Models/ASVDataManager.cs, ArkViewer/UI/frmViewer.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 ArkViewer/Models/ASVDataManager.cs:536 — `tribe.Structures != null && tribe.Structures.Count > 0` appears character-identically in 2 files — ArkViewer/Models/ASVDataManager.cs, ArkViewer/UI/frmViewer.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 ArkViewer/Models/ASVDataManager.cs:608 — `tribe.Tames != null && tribe.Tames.Count > 0` appears character-identically in 2 files — ArkViewer/Models/ASVDataManager.cs, ArkViewer/UI/frmViewer.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 ASVPack/Models/DrawingContainer.cs:171 — `tribePlayers != null && tribePlayers.Count > 0` appears character-identically in 2 files — ASVBot/Commands/PlayerCommands.cs, ASVPack/Models/DrawingContainer.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 ASVPack/Models/DrawingContainer.cs:130 — `tribeStructures != null && tribeStructures.Count > 0` appears character-identically in 2 files — ASVBot/Commands/PlayerCommands.cs, ASVPack/Models/DrawingContainer.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 ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs:28 — `value != null && Objects.IndexOf(value) == -1` appears character-identically in 4 files — ArkSavegameToolkit/SavegameToolkit/ArkCloudInventory.cs, ArkSavegameToolkit/SavegameToolkit/ArkLocalProfile.cs, ArkSavegameToolkit/SavegameToolkit/ArkProfile.cs, ArkSavegameToolkit/SavegameToolkit/ArkStoreProfile.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.
  • + 1 more in this group — see findings.md.
D24 · Comment Value · redundant comment · ×21
  • redundant comment ASVBot/Commands/AdminCommands.cs:243 — 6 comments in this file only repeat the code they sit on (lines 243, 298, 354, 430, 431, 540), for example "ark-tribes <filterText> <tribeId | tribeName | discordUser>". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ASVBot/Commands/GeneralCommands.cs:75 — "already associated with another discord user" repeats the code it sits on: 4 of its 4 words (already, associated, discord, user) are already in `responseString = $"ARK player is already associated with another discord user: {otherAssociate.DiscordUsername}";`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ASVBot/Program.cs:58 — "check cluster folder exists" repeats the code it sits on: 4 of its 4 words (check, cluster, folder, exists) are already in `if (Directory.Exists(clusterFolderProvided))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ASVExport/Program.cs:288 — "create pack and export" repeats the code it sits on: 3 of its 3 words (create, pack, export) are already in `ContentContainer exportPack = new ContentContainer();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ASVPack/Models/ContentContainer.cs:969 — 6 comments in this file only repeat the code they sit on (lines 969, 1456, 2370, 2598, 2702, 2957), for example "Parallel.ForEach(objectContainer.Objects.Where(x=>x.IsWild()), x=>". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ASVPack/Models/ContentPlayer.cs:444 — "NumChibiLevelUpsData" repeats the code it sits on: 5 of its 5 words (num, chibi, level, ups, data) are already in `var chibiLevels = gameObject.GetPropertyValue<int>("NumChibiLevelUpsData", 0, 0);//NumChibiLevelUpsData`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:173 — "get parent of cryopod owner inventory" repeats the code it sits on: 4 of its 5 words (get, parent, owner, inventory) are already in `var podParentRef = storedPod.GetPropertyValue<ObjectReference>("OwnerInventory");`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:396 — "get parent of cryopod owner inventory" repeats the code it sits on: 4 of its 5 words (get, parent, owner, inventory) are already in `var podParentRef = cryoObject.GetPropertyValue<ObjectReference>("OwnerInventory");`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ArkViewer/Models/ASVDataManager.cs:1931 — "oil veins (OilVein_)" repeats the code it sits on: 3 of its 3 words (oil, veins, vein) are already in `if (structureOptions.OilVeins)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ArkViewer/Models/ASVDataManager.cs:1953 — "water veins (WaterVein_)" repeats the code it sits on: 3 of its 3 words (water, veins, vein) are already in `if (structureOptions.WaterVeins)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ArkViewer/Models/ASVDataManager.cs:1976 — "gas veins (GasVein_)" repeats the code it sits on: 3 of its 3 words (gas, veins, vein) are already in `if (structureOptions.GasVeins)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ArkViewer/Models/ListViewComparer.cs:25 — "Get the objects as ListViewItems." repeats the code it sits on: 4 of its 5 words (objects, list, view, items) are already in `ListViewItem item_x = object_x as ListViewItem;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ArkViewer/Program.cs:424 — "create pack and export" repeats the code it sits on: 3 of its 3 words (create, pack, export) are already in `ContentContainer exportPack = new ContentContainer();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ArkViewer/Properties/AssemblyInfo.cs:4 — "General Information about an assembly is controlled through the following set of attributes. Change these attribute values to modify the information associated …" is Visual Studio AssemblyInfo template text, left in place. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ArkViewer/Properties/AssemblyInfo.cs:16 — "Setting ComVisible to false makes the types in this assembly not visible to COM components. If you need to access a type in this assembly from COM, set the ComV …" is Visual Studio AssemblyInfo template text, left in place. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ArkViewer/Properties/AssemblyInfo.cs:21 — "The following GUID is for the ID of the typelib if this project is exposed to COM" is Visual Studio AssemblyInfo template text, left in place. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ArkViewer/Properties/AssemblyInfo.cs:24 — "Version information for an assembly consists of the following four values: Major Version Minor Version Build Number Revision You can specify all the values or y …" is Visual Studio AssemblyInfo template text, left in place. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ArkViewer/UI/frmViewer.cs:4377 — "check for .tmp file" repeats the code it sits on: 3 of its 3 words (check, tmp, file) are already in `var serverTempFile = serverFiles.Where(f => f.Name.ToLower() == selectedServer.Map.ToLower().Replace(".ark", ".tmp")).Fi …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ArkViewer/UI/frmViewer.cs:7110 — "get tribe/player" repeats the code it sits on: 3 of its 3 words (get, tribe, player) are already in `var playerTribe = cm.GetPlayerTribe(playerCache.DroppedByPlayerId);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ArkViewer/UI/frmViewer.cs:7154 — "get tribe/player" repeats the code it sits on: 3 of its 3 words (get, tribe, player) are already in `var playerTribe = cm.GetPlayerTribe(droppedItem.DroppedByPlayerId);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegame.cs:148 — "Parallel.ForEach(childObject.ParentNames, parentName =>" repeats the code it sits on: 5 of its 6 words (child, object, parent, names, name) are already in `foreach (var parentName in childObject.ParentNames)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
X7 · Silent fallback defaults · Silent fallback default in catch · ×5
  • Silent fallback default in catch ArkSavegameToolkit/SavegameToolkit/ArkArchive.cs:230 — `readNameFromTable` swallows every exception into `return ArkName.NameNone;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch ArkSavegameToolkit/SavegameToolkit/Structs/StructPropertyList.cs:32 — `Init` swallows every exception and sets `property = null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch ArkViewer/UI/frmTribeLog.cs:176 — `LoadLog` swallows every exception and sets `standardTextColour = Color.WhiteSmoke;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch ArkViewer/UI/frmViewer.cs:308 — `StartRCON` swallows every exception and sets `isRconConnected = false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegame.cs:53 — `GetObjectByGuid` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
D12 · Dependency Hygiene · Outdated · ×3
  • Outdated: FluentFTP ArkViewer/ArkViewer.csproj:4329 — FluentFTP 50.0.0 → 55.1.0 available (referenced by ArkViewer).
  • Outdated: Microsoft.Extensions.DependencyInjection ASVBot/ASVBot.csproj:34 — Microsoft.Extensions.DependencyInjection 8.0.0 → 11.0.0 available (referenced by ASVBot).
  • Outdated: Microsoft.Data.Sqlite AsaSavegameToolkit/AsaSavegameToolkit/AsaSavegameToolkit.csproj:10 — Microsoft.Data.Sqlite 8.0.8 → 11.0.0 available (referenced by AsaSavegameToolkit).
D34 · Knowledge Freshness · Most significant orphaned file · ×3
  • Most significant orphaned file ArkViewer/UI/frmViewer.cs:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file ASVPack/Models/ContentContainer.cs:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file ASVPack/Models/ContentPack.cs:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
D18 · Solution Shape · Duplicate project file · ×1
  • Duplicate project file: ASVBot - Backup ASVBot/ASVBot - Backup.csproj — `ASVBot/ASVBot - Backup.csproj` sits beside `ASVBot/ASVBot.csproj` and compiles the same sources, but no solution in the repository lists it. It is a second build of the same code that nobody builds with the rest: it drifts from the original unseen, and the two share one `obj/` folder, so restoring one overwrites the other's assets. Delete it; if it builds a variant on purpose (another target framework, a strong-named package), make that variant a `<TargetFrameworks>` entry or a property of the original, or list it in the solution so it is built and kept in step.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found ASVBot/ASVBot - Backup.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 `ASVBot/ASVBot - Backup.csproj` makes this repository a deployable product (line 4).
D27 · Navigability · Scattered collaborators · ×1
  • Scattered collaborators — 87 % of calls cross a namespace and only 44 % of collaborators are co-located — group each feature's code into a vertical slice so a call's collaborators sit together.
D34 · Knowledge Freshness · Dormant codebase · ×1
  • Dormant codebase — 84 of 84 significant files have no living knowledge — the codebase as a whole is dormant, not 84 separate risks. Counted over 84 of the 241 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change.
M1 · Documentation (README) · Thin README · ×1
  • Thin README README.md:1 — The root README is 25 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, in the README and in the repository documents it links, it found no a build/run or getting-started section, no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers.
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 — 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) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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 · No dependency-update automation · ×1
  • No dependency-update automation ASVBot/ASVBot - Backup.csproj:21 — `ASVBot/ASVBot - Backup.csproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
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.)
X23 · Unguarded diagnostic materialisation · Diagnostic log message is built whether or not it is wanted · ×1
  • Diagnostic log message is built whether or not it is wanted ArkViewer/UI/frmViewer.cs:4168 — `Debug` at line 4168 is called with an argument built by `files.ToList()` (line 4168), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because Debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Minor — 14 finding(s)
D12 · Dependency Hygiene · Outdated · ×11
  • Outdated: Microsoft.IO.RecyclableMemoryStream — Microsoft.IO.RecyclableMemoryStream 3.0.1 → 4.0.1 available (referenced by ASVPack).
  • Outdated: Newtonsoft.Json — Newtonsoft.Json 13.0.3 → 13.0.4 available (referenced by ASVPack).
  • Outdated: NLog — NLog 5.3.3 → 6.2.2 available (referenced by ASVPack).
  • Outdated: SkiaSharp — SkiaSharp 2.88.8 → 4.156.1 available (referenced by ASVPack).
  • Outdated: CoreRCON — CoreRCON 5.4.1 → 5.4.2 available (referenced by ArkViewer).
  • Outdated: SkiaSharp.Views.Desktop.Common — SkiaSharp.Views.Desktop.Common 2.88.8 → 4.156.1 available (referenced by ArkViewer).
  • Outdated: SSH.NET — SSH.NET 2024.1.0 → 2026.0.1 available (referenced by ArkViewer).
  • Outdated: DSharpPlus — DSharpPlus 4.5.0 → 4.5.3 available (referenced by ASVBot).
  • Outdated: DSharpPlus.CommandsNext — DSharpPlus.CommandsNext 4.5.0 → 4.5.3 available (referenced by ASVBot).
  • Outdated: DSharpPlus.Interactivity — DSharpPlus.Interactivity 4.5.0 → 4.5.3 available (referenced by ASVBot).
  • Outdated: DSharpPlus.SlashCommands — DSharpPlus.SlashCommands 4.5.0 → 4.5.3 available (referenced by ASVBot).
D24 · Comment Value · doc comments repeat the names · ×3
  • doc comments repeat the names AsaSavegameToolkit/AsaSavegameToolkit/Types/AsaName.cs:61 — 0 of 8 documented parameters and 0 of 6 summaries in `AsaSavegameToolkit` only repeat the member or parameter name (e.g. "" for `name`). 8 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names ArkSavegameToolkit/SavegameToolkit/BaseOptions.cs:35 — 0 of 27 documented parameters and 0 of 41 summaries in `SavegameToolkit` only repeat the member or parameter name (e.g. "" for `memoryMapping`). 15 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names ArkSavegameToolkit/SavegameToolkitAdditions/ObjectCollector.cs:195 — 0 of 2 documented parameters and 0 of 2 summaries in `SavegameToolkitAdditions` only repeat the member or parameter name (e.g. "" for `remappedList`). 2 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-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-3375bce5b79d46f98309ed3a30d45899/tree.json --exit-code 0 --source .0—
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 .2artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnuget—nuget: not applicable — nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan0—
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 3 file(s) — `ArkViewer/UI/frmSettings.Designer.cs`, `ArkViewer/UI/frmViewer.Designer.cs`, `ArkViewer/UI/frmViewer.cs` — so the PII/GDPR sweep did not cover them at all.0—
D36 · Supply-chain Provenance & Signingprovenance—provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.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-a9b29c5f18ed4ba98d47718bf467407c0artifacts/raw/osv-scanner.json

Run 01a1e609-2159-7db2-bae0-fc2d63778898 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Appendix C — Personal-data map

Every field, property and record parameter whose name is conventional personal data — 1 field(s) across 1 category, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier — the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it — that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational — it feeds no score.

Name — 1 field(s)
  • ASVFtpItem.FullName ArkViewer/Models/ASVFtpItem.cs:12

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